Coverage Report

Created: 2026-09-03 07:14

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.77M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.77M
    if (_parent->nereids_id() == -1) {
122
922k
        return fmt::format("(id={})", _parent->node_id());
123
922k
    } else {
124
847k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
847k
    }
126
1.77M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
66.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
66.6k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
66.6k
    } else {
124
66.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
66.6k
    }
126
66.6k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
187k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
187k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
187k
    } else {
124
187k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
187k
    }
126
187k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
32
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
32
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
32
    } else {
124
32
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
32
    }
126
32
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.03k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.03k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
6.03k
    } else {
124
6.03k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
6.03k
    }
126
6.03k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.14k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.14k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
8.13k
    } else {
124
8.13k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
8.13k
    }
126
8.14k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
85.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
85.7k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
85.7k
    } else {
124
85.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
85.7k
    }
126
85.7k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
38.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
38.7k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
38.7k
    } else {
124
38.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
38.7k
    }
126
38.7k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
100
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
100
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
100
    } else {
124
100
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
100
    }
126
100
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
700k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
700k
    if (_parent->nereids_id() == -1) {
122
300k
        return fmt::format("(id={})", _parent->node_id());
123
399k
    } else {
124
399k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
399k
    }
126
700k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
50.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
50.5k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
50.5k
    } else {
124
50.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
50.5k
    }
126
50.5k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
26
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.11k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.11k
    if (_parent->nereids_id() == -1) {
122
4.11k
        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
4.11k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
537
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
537
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
435
    } else {
124
435
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
435
    }
126
537
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.09k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.09k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
5.07k
    } else {
124
5.07k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.07k
    }
126
5.09k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
616k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
617k
    if (_parent->nereids_id() == -1) {
122
617k
        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
616k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
164
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
164
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
164
    } else {
124
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
164
    }
126
164
}
127
128
template <typename SharedStateArg>
129
1.11M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.11M
    if (_parent->nereids_id() == -1) {
131
668k
        return fmt::format("(id={})", _parent->node_id());
132
668k
    } else {
133
450k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
450k
    }
135
1.11M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
114k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
114k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
114k
    } else {
133
114k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
114k
    }
135
114k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
190k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
190k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
190k
    } else {
133
190k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
190k
    }
135
190k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
42
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
42
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
42
    } else {
133
42
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
42
    }
135
42
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.05k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.05k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
6.05k
    } else {
133
6.05k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.05k
    }
135
6.05k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.17k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.17k
    if (_parent->nereids_id() == -1) {
131
12
        return fmt::format("(id={})", _parent->node_id());
132
8.15k
    } else {
133
8.15k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.15k
    }
135
8.17k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
86.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
86.2k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
86.1k
    } else {
133
86.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
86.1k
    }
135
86.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
38.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
38.6k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
38.6k
    } else {
133
38.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
38.6k
    }
135
38.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
110
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
110
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
110
    } else {
133
110
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
110
    }
135
110
}
_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
4.46k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
4.46k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
4.46k
    } else {
133
4.46k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
4.46k
    }
135
4.46k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
549
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
549
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
447
    } else {
133
447
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
447
    }
135
549
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.3k
    if (_parent->nereids_id() == -1) {
131
12.3k
        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.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
247k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
247k
    if (_parent->nereids_id() == -1) {
131
247k
        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
247k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
408k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
408k
    if (_parent->nereids_id() == -1) {
131
408k
        return fmt::format("(id={})", _parent->node_id());
132
408k
    } else {
133
553
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
553
    }
135
408k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
25
    if (_parent->nereids_id() == -1) {
131
25
        return fmt::format("(id={})", _parent->node_id());
132
25
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
328
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
328
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
328
    } else {
133
328
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
328
    }
135
328
}
136
137
template <typename SharedStateArg>
138
28.6k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
28.6k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
28.6k
    _terminated = true;
143
28.6k
    return Status::OK();
144
28.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.0k
    _terminated = true;
143
24.0k
    return Status::OK();
144
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.12k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.12k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.12k
    _terminated = true;
143
1.12k
    return Status::OK();
144
1.12k
}
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
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1
    _terminated = true;
143
1
    return Status::OK();
144
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.54k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.54k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.54k
    _terminated = true;
143
1.54k
    return Status::OK();
144
1.54k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
932
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
932
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
932
    _terminated = true;
143
932
    return Status::OK();
144
932
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
356
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
356
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
356
    _terminated = true;
143
356
    return Status::OK();
144
356
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
59
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
59
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
59
    _terminated = true;
143
59
    return Status::OK();
144
59
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
194
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
194
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
194
    _terminated = true;
143
194
    return Status::OK();
144
194
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
5
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
5
    _terminated = true;
143
5
    return Status::OK();
144
5
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
201
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
201
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
201
    _terminated = true;
143
201
    return Status::OK();
144
201
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
132
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
132
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
132
    _terminated = true;
143
132
    return Status::OK();
144
132
}
145
146
287k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
287k
    return _child && _child->is_serial_operator() && !is_source()
148
287k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
287k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
287k
}
151
152
26.3k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
26.3k
    if (!_child) {
154
25.3k
        return false;
155
25.3k
    }
156
994
    if (_child->is_serial_operator()) {
157
102
        return true;
158
102
    }
159
892
    const auto child_distribution = _child->required_data_distribution(state);
160
892
    return child_distribution.need_local_exchange() &&
161
892
           !is_shuffled_exchange(child_distribution.distribution_type);
162
994
}
163
164
template <typename SharedStateArg>
165
19.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
19.6k
    fmt::memory_buffer debug_string_buffer;
167
19.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
19.6k
    return fmt::to_string(debug_string_buffer);
169
19.6k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
3
    fmt::memory_buffer debug_string_buffer;
167
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
3
    return fmt::to_string(debug_string_buffer);
169
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
4
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
4
    fmt::memory_buffer debug_string_buffer;
167
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
4
    return fmt::to_string(debug_string_buffer);
169
4
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
4
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
4
    fmt::memory_buffer debug_string_buffer;
167
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
4
    return fmt::to_string(debug_string_buffer);
169
4
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
19.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
19.6k
    fmt::memory_buffer debug_string_buffer;
167
19.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
19.6k
    return fmt::to_string(debug_string_buffer);
169
19.6k
}
_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
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
8
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
8
    fmt::memory_buffer debug_string_buffer;
167
8
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
8
    return fmt::to_string(debug_string_buffer);
169
8
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
19.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19.6k
    fmt::memory_buffer debug_string_buffer;
174
19.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19.6k
    return fmt::to_string(debug_string_buffer);
176
19.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
4
    fmt::memory_buffer debug_string_buffer;
174
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
4
    return fmt::to_string(debug_string_buffer);
176
4
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
4
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
4
    fmt::memory_buffer debug_string_buffer;
174
4
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
4
    return fmt::to_string(debug_string_buffer);
176
4
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
9
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
9
    fmt::memory_buffer debug_string_buffer;
174
9
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
9
    return fmt::to_string(debug_string_buffer);
176
9
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
5
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
5
    fmt::memory_buffer debug_string_buffer;
174
5
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
5
    return fmt::to_string(debug_string_buffer);
176
5
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
19.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19.6k
    fmt::memory_buffer debug_string_buffer;
174
19.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19.6k
    return fmt::to_string(debug_string_buffer);
176
19.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
19.6k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
19.6k
    fmt::memory_buffer debug_string_buffer;
180
19.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
19.6k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
19.6k
                   _is_serial_operator);
183
19.6k
    return fmt::to_string(debug_string_buffer);
184
19.6k
}
185
186
19.6k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
19.6k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
19.6k
}
189
190
611k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
611k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
611k
    _nereids_id = tnode.nereids_id;
193
611k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.21k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.21k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.21k
            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.21k
    }
206
611k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
611k
    _op_name = substr + "_OPERATOR";
208
209
611k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
611k
    } else if (tnode.__isset.conjuncts) {
212
253k
        for (const auto& conjunct : tnode.conjuncts) {
213
253k
            VExprContextSPtr context;
214
253k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
253k
            _conjuncts.emplace_back(context);
216
253k
        }
217
86.4k
    }
218
219
    // create the projections expr
220
611k
    if (tnode.__isset.projections) {
221
235k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
235k
    }
223
611k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.21k
        DCHECK(has_projection()) << "no final projections";
225
3.21k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
4.31k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
4.31k
            VExprContextSPtrs projections;
228
4.31k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
4.31k
            _projection->intermediate_projections.push_back(projections);
230
4.31k
        }
231
3.21k
    }
232
611k
    return Status::OK();
233
611k
}
234
235
637k
Status OperatorXBase::prepare(RuntimeState* state) {
236
637k
    for (auto& conjunct : _conjuncts) {
237
252k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
252k
    }
239
637k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
587k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
326k
            return a->execute_cost() < b->execute_cost();
242
326k
        });
243
587k
    };
244
245
637k
    if (has_projection()) {
246
235k
        auto& projection = *_projection;
247
239k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
4.31k
            const auto& input_row_desc =
249
4.31k
                    i == 0 ? operator_row_desc_before_projection()
250
4.31k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
4.31k
            RETURN_IF_ERROR(
252
4.31k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
4.31k
        }
254
235k
        const auto& final_projection_input_row_desc =
255
235k
                projection.intermediate_output_row_descriptors.empty()
256
235k
                        ? operator_row_desc_before_projection()
257
235k
                        : projection.intermediate_output_row_descriptors.back();
258
235k
        RETURN_IF_ERROR(
259
235k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
235k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
235k
                                                      projection.output_row_descriptor));
262
235k
    }
263
264
637k
    for (auto& conjunct : _conjuncts) {
265
253k
        RETURN_IF_ERROR(conjunct->open(state));
266
253k
    }
267
637k
    if (has_projection()) {
268
235k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
235k
        for (auto& projections : _projection->intermediate_projections) {
270
4.31k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
4.31k
        }
272
235k
    }
273
637k
    if (_child && !is_source()) {
274
101k
        RETURN_IF_ERROR(_child->prepare(state));
275
101k
    }
276
277
637k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
637k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
637k
    return Status::OK();
283
637k
}
284
285
5.23k
Status OperatorXBase::terminate(RuntimeState* state) {
286
5.23k
    if (_child && !is_source()) {
287
623
        RETURN_IF_ERROR(_child->terminate(state));
288
623
    }
289
5.23k
    auto result = state->get_local_state_result(operator_id());
290
5.23k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
5.23k
    return result.value()->terminate(state);
294
5.23k
}
295
296
4.95M
Status OperatorXBase::close(RuntimeState* state) {
297
4.95M
    if (_child && !is_source()) {
298
936k
        RETURN_IF_ERROR(_child->close(state));
299
936k
    }
300
4.95M
    auto result = state->get_local_state_result(operator_id());
301
4.95M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
4.95M
    return result.value()->close(state);
305
4.95M
}
306
307
268k
void PipelineXLocalStateBase::clear_origin_block() {
308
268k
    _origin_block.clear_column_data(
309
268k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
268k
}
311
312
631k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
631k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
631k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
631k
    return Status::OK();
317
631k
}
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
268k
                                     Block* output_block) const {
326
268k
    auto* local_state = state->get_local_state(operator_id());
327
268k
    SCOPED_TIMER(local_state->exec_time_counter());
328
268k
    SCOPED_TIMER(local_state->_projection_timer);
329
268k
    const size_t rows = origin_block->rows();
330
268k
    if (rows == 0) {
331
144k
        return Status::OK();
332
144k
    }
333
124k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
124k
    {
336
124k
        Block input_block = *origin_block;
337
338
124k
        ColumnsWithTypeAndName new_columns;
339
124k
        for (const auto& projections : local_state->_intermediate_projections) {
340
1.44k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
1.44k
            new_columns.resize(projections.size());
345
8.80k
            for (int i = 0; i < projections.size(); i++) {
346
7.35k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
7.35k
                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
7.35k
            }
355
1.44k
            Block tmp_block {new_columns};
356
1.44k
            input_block.swap(tmp_block);
357
1.44k
        }
358
359
124k
        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
124k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
124k
                output_block, _projection->output_row_descriptor);
368
124k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
124k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
124k
        Columns shared_columns(mutable_columns.size());
371
372
685k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
561k
            ColumnPtr column_ptr;
374
561k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
561k
            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
561k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
561k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
561k
            if (column_ptr->is_exclusive()) {
386
196k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
365k
            } else {
388
365k
                shared_columns[i] = std::move(column_ptr);
389
365k
            }
390
561k
        }
391
392
124k
        scoped_mutable_block.restore();
393
685k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
561k
            if (shared_columns[i]) {
395
365k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
365k
            }
397
561k
        }
398
124k
    }
399
400
0
    origin_block->clear_column_data(
401
124k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
124k
    DCHECK_EQ(output_block->rows(), rows);
403
404
124k
    return Status::OK();
405
124k
}
406
407
4.29M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.29M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.29M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.29M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.29M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.29M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.29M
            if (_debug_point_count++ % 2 == 0) {
414
4.29M
                return Status::OK();
415
4.29M
            }
416
4.29M
        }
417
4.29M
    });
418
419
4.29M
    Status status;
420
4.29M
    auto* local_state = state->get_local_state(operator_id());
421
4.29M
    Defer defer([&]() {
422
4.29M
        if (status.ok()) {
423
4.29M
            local_state->update_output_block_counters(*block);
424
4.29M
        }
425
4.29M
    });
426
4.29M
    if (has_projection()) {
427
268k
        local_state->clear_origin_block();
428
268k
        status = get_block(state, &local_state->_origin_block, eos);
429
268k
        if (UNLIKELY(!status.ok())) {
430
23
            return status;
431
23
        }
432
268k
        status = do_projections(state, &local_state->_origin_block, block);
433
268k
        return status;
434
268k
    }
435
4.02M
    status = get_block(state, block, eos);
436
4.02M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.02M
    return status;
438
4.02M
}
439
440
2.49M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.49M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
3.68k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
3.68k
        *eos = true;
444
3.68k
    }
445
446
2.49M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.49M
        auto op_name = to_lower(_parent->_op_name);
448
2.49M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.49M
        arg_op_name = to_lower(arg_op_name);
450
451
2.49M
        if (op_name == arg_op_name) {
452
2.49M
            *eos = true;
453
2.49M
        }
454
2.49M
    });
455
456
2.49M
    if (auto rows = block->rows()) {
457
712k
        _num_rows_returned += rows;
458
712k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
712k
    }
460
2.49M
}
461
462
28.6k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
28.6k
    auto result = state->get_sink_local_state_result();
464
28.6k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
28.6k
    return result.value()->terminate(state);
468
28.6k
}
469
470
19.6k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
19.6k
    fmt::memory_buffer debug_string_buffer;
472
473
19.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
19.6k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
19.6k
    return fmt::to_string(debug_string_buffer);
476
19.6k
}
477
478
19.6k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
19.6k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
19.6k
}
481
482
316k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
316k
    std::string op_name = "UNKNOWN_SINK";
484
316k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
317k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
317k
        op_name = it->second;
488
317k
    }
489
316k
    _name = op_name + "_OPERATOR";
490
316k
    return Status::OK();
491
316k
}
492
493
266k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
266k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
266k
    _nereids_id = tnode.nereids_id;
496
266k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
266k
    _name = substr + "_SINK_OPERATOR";
498
266k
    return Status::OK();
499
266k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.62M
                                                            LocalSinkStateInfo& info) {
504
1.62M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.62M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.62M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.62M
    return Status::OK();
508
1.62M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
114k
                                                            LocalSinkStateInfo& info) {
504
114k
    auto local_state = LocalStateType::create_unique(this, state);
505
114k
    RETURN_IF_ERROR(local_state->init(state, info));
506
114k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
114k
    return Status::OK();
508
114k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
368k
                                                            LocalSinkStateInfo& info) {
504
368k
    auto local_state = LocalStateType::create_unique(this, state);
505
368k
    RETURN_IF_ERROR(local_state->init(state, info));
506
368k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
368k
    return Status::OK();
508
368k
}
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
379
                                                            LocalSinkStateInfo& info) {
504
379
    auto local_state = LocalStateType::create_unique(this, state);
505
379
    RETURN_IF_ERROR(local_state->init(state, info));
506
379
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
379
    return Status::OK();
508
379
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
41.9k
                                                            LocalSinkStateInfo& info) {
504
41.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
41.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
41.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
41.9k
    return Status::OK();
508
41.9k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4
                                                            LocalSinkStateInfo& info) {
504
4
    auto local_state = LocalStateType::create_unique(this, state);
505
4
    RETURN_IF_ERROR(local_state->init(state, info));
506
4
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4
    return Status::OK();
508
4
}
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
8.17k
                                                            LocalSinkStateInfo& info) {
504
8.17k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.17k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.17k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.17k
    return Status::OK();
508
8.17k
}
_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
191k
                                                            LocalSinkStateInfo& info) {
504
191k
    auto local_state = LocalStateType::create_unique(this, state);
505
191k
    RETURN_IF_ERROR(local_state->init(state, info));
506
191k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
191k
    return Status::OK();
508
191k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
42
                                                            LocalSinkStateInfo& info) {
504
42
    auto local_state = LocalStateType::create_unique(this, state);
505
42
    RETURN_IF_ERROR(local_state->init(state, info));
506
42
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
42
    return Status::OK();
508
42
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
247k
                                                            LocalSinkStateInfo& info) {
504
247k
    auto local_state = LocalStateType::create_unique(this, state);
505
247k
    RETURN_IF_ERROR(local_state->init(state, info));
506
247k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
247k
    return Status::OK();
508
247k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
86.4k
                                                            LocalSinkStateInfo& info) {
504
86.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
86.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
86.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
86.4k
    return Status::OK();
508
86.4k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
38.7k
                                                            LocalSinkStateInfo& info) {
504
38.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
38.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
38.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
38.7k
    return Status::OK();
508
38.7k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
110
                                                            LocalSinkStateInfo& info) {
504
110
    auto local_state = LocalStateType::create_unique(this, state);
505
110
    RETURN_IF_ERROR(local_state->init(state, info));
506
110
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
110
    return Status::OK();
508
110
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
504k
                                                            LocalSinkStateInfo& info) {
504
504k
    auto local_state = LocalStateType::create_unique(this, state);
505
504k
    RETURN_IF_ERROR(local_state->init(state, info));
506
504k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
504k
    return Status::OK();
508
504k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.06k
                                                            LocalSinkStateInfo& info) {
504
6.06k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.06k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.06k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.06k
    return Status::OK();
508
6.06k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.46k
                                                            LocalSinkStateInfo& info) {
504
4.46k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.46k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.46k
    return Status::OK();
508
4.46k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.64k
                                                            LocalSinkStateInfo& info) {
504
1.64k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.64k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.64k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.64k
    return Status::OK();
508
1.64k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
446
                                                            LocalSinkStateInfo& info) {
504
446
    auto local_state = LocalStateType::create_unique(this, state);
505
446
    RETURN_IF_ERROR(local_state->init(state, info));
506
446
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
446
    return Status::OK();
508
446
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.70k
                                                            LocalSinkStateInfo& info) {
504
4.70k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.70k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.70k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.70k
    return Status::OK();
508
4.70k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.51k
                                                            LocalSinkStateInfo& info) {
504
2.51k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.51k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.51k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.51k
    return Status::OK();
508
2.51k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.57k
                                                            LocalSinkStateInfo& info) {
504
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.57k
    return Status::OK();
508
2.57k
}
_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
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
565
                                                            LocalSinkStateInfo& info) {
504
565
    auto local_state = LocalStateType::create_unique(this, state);
505
565
    RETURN_IF_ERROR(local_state->init(state, info));
506
565
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
565
    return Status::OK();
508
565
}
_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
73
                                                            LocalSinkStateInfo& info) {
504
73
    auto local_state = LocalStateType::create_unique(this, state);
505
73
    RETURN_IF_ERROR(local_state->init(state, info));
506
73
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
73
    return Status::OK();
508
73
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
509
510
template <typename LocalStateType>
511
1.31M
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.31M
    } else {
519
1.31M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.31M
        ss->id = operator_id();
521
1.31M
        for (auto& dest : dests_id()) {
522
1.29M
            ss->related_op_ids.insert(dest);
523
1.29M
        }
524
1.31M
        return ss;
525
1.31M
    }
526
1.31M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
97.9k
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
97.9k
    } else {
519
97.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
97.9k
        ss->id = operator_id();
521
97.9k
        for (auto& dest : dests_id()) {
522
97.8k
            ss->related_op_ids.insert(dest);
523
97.8k
        }
524
97.9k
        return ss;
525
97.9k
    }
526
97.9k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
368k
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
368k
    } else {
519
368k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
368k
        ss->id = operator_id();
521
368k
        for (auto& dest : dests_id()) {
522
366k
            ss->related_op_ids.insert(dest);
523
366k
        }
524
368k
        return ss;
525
368k
    }
526
368k
}
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
379
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
379
    } else {
519
379
        auto ss = LocalStateType::SharedStateType::create_shared();
520
379
        ss->id = operator_id();
521
379
        for (auto& dest : dests_id()) {
522
379
            ss->related_op_ids.insert(dest);
523
379
        }
524
379
        return ss;
525
379
    }
526
379
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
41.9k
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
41.9k
    } else {
519
41.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
41.9k
        ss->id = operator_id();
521
41.9k
        for (auto& dest : dests_id()) {
522
41.5k
            ss->related_op_ids.insert(dest);
523
41.5k
        }
524
41.9k
        return ss;
525
41.9k
    }
526
41.9k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
4
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
4
    } else {
519
4
        auto ss = LocalStateType::SharedStateType::create_shared();
520
4
        ss->id = operator_id();
521
4
        for (auto& dest : dests_id()) {
522
4
            ss->related_op_ids.insert(dest);
523
4
        }
524
4
        return ss;
525
4
    }
526
4
}
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
8.22k
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
8.22k
    } else {
519
8.22k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.22k
        ss->id = operator_id();
521
8.22k
        for (auto& dest : dests_id()) {
522
8.22k
            ss->related_op_ids.insert(dest);
523
8.22k
        }
524
8.22k
        return ss;
525
8.22k
    }
526
8.22k
}
_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
192k
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
192k
    } else {
519
192k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
192k
        ss->id = operator_id();
521
192k
        for (auto& dest : dests_id()) {
522
192k
            ss->related_op_ids.insert(dest);
523
192k
        }
524
192k
        return ss;
525
192k
    }
526
192k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
43
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
43
    } else {
519
43
        auto ss = LocalStateType::SharedStateType::create_shared();
520
43
        ss->id = operator_id();
521
44
        for (auto& dest : dests_id()) {
522
44
            ss->related_op_ids.insert(dest);
523
44
        }
524
43
        return ss;
525
43
    }
526
43
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
86.7k
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
86.7k
    } else {
519
86.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
86.7k
        ss->id = operator_id();
521
86.7k
        for (auto& dest : dests_id()) {
522
86.7k
            ss->related_op_ids.insert(dest);
523
86.7k
        }
524
86.7k
        return ss;
525
86.7k
    }
526
86.7k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
109
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
109
    } else {
519
109
        auto ss = LocalStateType::SharedStateType::create_shared();
520
109
        ss->id = operator_id();
521
109
        for (auto& dest : dests_id()) {
522
109
            ss->related_op_ids.insert(dest);
523
109
        }
524
109
        return ss;
525
109
    }
526
109
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
505k
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
505k
    } else {
519
505k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
505k
        ss->id = operator_id();
521
505k
        for (auto& dest : dests_id()) {
522
493k
            ss->related_op_ids.insert(dest);
523
493k
        }
524
505k
        return ss;
525
505k
    }
526
505k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.07k
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
6.07k
    } else {
519
6.07k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.07k
        ss->id = operator_id();
521
6.07k
        for (auto& dest : dests_id()) {
522
6.06k
            ss->related_op_ids.insert(dest);
523
6.06k
        }
524
6.07k
        return ss;
525
6.07k
    }
526
6.07k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
547
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
547
    } else {
519
547
        auto ss = LocalStateType::SharedStateType::create_shared();
520
547
        ss->id = operator_id();
521
547
        for (auto& dest : dests_id()) {
522
543
            ss->related_op_ids.insert(dest);
523
543
        }
524
547
        return ss;
525
547
    }
526
547
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.55k
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.55k
    } else {
519
2.55k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.55k
        ss->id = operator_id();
521
2.55k
        for (auto& dest : dests_id()) {
522
2.55k
            ss->related_op_ids.insert(dest);
523
2.55k
        }
524
2.55k
        return ss;
525
2.55k
    }
526
2.55k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.45k
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.45k
    } else {
519
2.45k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.45k
        ss->id = operator_id();
521
2.45k
        for (auto& dest : dests_id()) {
522
2.45k
            ss->related_op_ids.insert(dest);
523
2.45k
        }
524
2.45k
        return ss;
525
2.45k
    }
526
2.45k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
561
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
561
    } else {
519
561
        auto ss = LocalStateType::SharedStateType::create_shared();
520
561
        ss->id = operator_id();
521
561
        for (auto& dest : dests_id()) {
522
559
            ss->related_op_ids.insert(dest);
523
559
        }
524
561
        return ss;
525
561
    }
526
561
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
73
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
73
    } else {
519
73
        auto ss = LocalStateType::SharedStateType::create_shared();
520
73
        ss->id = operator_id();
521
73
        for (auto& dest : dests_id()) {
522
73
            ss->related_op_ids.insert(dest);
523
73
        }
524
73
        return ss;
525
73
    }
526
73
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.02M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.02M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.02M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.02M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.02M
    return Status::OK();
534
2.02M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
66.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
66.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
66.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
66.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
66.8k
    return Status::OK();
534
66.8k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
231k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
231k
    auto local_state = LocalStateType::create_unique(state, this);
531
231k
    RETURN_IF_ERROR(local_state->init(state, info));
532
231k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
231k
    return Status::OK();
534
231k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
147
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
147
    auto local_state = LocalStateType::create_unique(state, this);
531
147
    RETURN_IF_ERROR(local_state->init(state, info));
532
147
    state->emplace_local_state(operator_id(), std::move(local_state));
533
147
    return Status::OK();
534
147
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.08k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.08k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.08k
    return Status::OK();
534
3.08k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.19k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.19k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.19k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.19k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.19k
    return Status::OK();
534
8.19k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.99k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.99k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.99k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.99k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.99k
    return Status::OK();
534
7.99k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
35
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
35
    auto local_state = LocalStateType::create_unique(state, this);
531
35
    RETURN_IF_ERROR(local_state->init(state, info));
532
35
    state->emplace_local_state(operator_id(), std::move(local_state));
533
35
    return Status::OK();
534
35
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
183k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
183k
    auto local_state = LocalStateType::create_unique(state, this);
531
183k
    RETURN_IF_ERROR(local_state->init(state, info));
532
183k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
183k
    return Status::OK();
534
183k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
86.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
86.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
86.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
86.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
86.4k
    return Status::OK();
534
86.4k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
38.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
38.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
38.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
38.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
38.8k
    return Status::OK();
534
38.8k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
99
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
99
    auto local_state = LocalStateType::create_unique(state, this);
531
99
    RETURN_IF_ERROR(local_state->init(state, info));
532
99
    state->emplace_local_state(operator_id(), std::move(local_state));
533
99
    return Status::OK();
534
99
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.60k
    return Status::OK();
534
3.60k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
303k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
303k
    auto local_state = LocalStateType::create_unique(state, this);
531
303k
    RETURN_IF_ERROR(local_state->init(state, info));
532
303k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
303k
    return Status::OK();
534
303k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.13k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.13k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.13k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.13k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.13k
    return Status::OK();
534
1.13k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.05k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.05k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.05k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.05k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.05k
    return Status::OK();
534
6.05k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.52k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.52k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.52k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.52k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.52k
    return Status::OK();
534
1.52k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
50.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
50.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
50.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
50.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
50.7k
    return Status::OK();
534
50.7k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.11k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.11k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.11k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.11k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.11k
    return Status::OK();
534
4.11k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
443
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
443
    auto local_state = LocalStateType::create_unique(state, this);
531
443
    RETURN_IF_ERROR(local_state->init(state, info));
532
443
    state->emplace_local_state(operator_id(), std::move(local_state));
533
443
    return Status::OK();
534
443
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.61k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.61k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.61k
    return Status::OK();
534
2.61k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.49k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.49k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.49k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.49k
    return Status::OK();
534
2.49k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
291
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
291
    auto local_state = LocalStateType::create_unique(state, this);
531
291
    RETURN_IF_ERROR(local_state->init(state, info));
532
291
    state->emplace_local_state(operator_id(), std::move(local_state));
533
291
    return Status::OK();
534
291
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.57k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.57k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.57k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.57k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.57k
    return Status::OK();
534
1.57k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.45k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.45k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.45k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.45k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.45k
    return Status::OK();
534
4.45k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
626k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
626k
    auto local_state = LocalStateType::create_unique(state, this);
531
626k
    RETURN_IF_ERROR(local_state->init(state, info));
532
626k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
626k
    return Status::OK();
534
626k
}
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
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
164
    auto local_state = LocalStateType::create_unique(state, this);
531
164
    RETURN_IF_ERROR(local_state->init(state, info));
532
164
    state->emplace_local_state(operator_id(), std::move(local_state));
533
164
    return Status::OK();
534
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.18k
    return Status::OK();
534
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
781
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
781
    auto local_state = LocalStateType::create_unique(state, this);
531
781
    RETURN_IF_ERROR(local_state->init(state, info));
532
781
    state->emplace_local_state(operator_id(), std::move(local_state));
533
781
    return Status::OK();
534
781
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
853
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
853
    auto local_state = LocalStateType::create_unique(state, this);
531
853
    RETURN_IF_ERROR(local_state->init(state, info));
532
853
    state->emplace_local_state(operator_id(), std::move(local_state));
533
853
    return Status::OK();
534
853
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.35k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.35k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.35k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.35k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.35k
    return Status::OK();
534
4.35k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
380k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
380k
    auto local_state = LocalStateType::create_unique(state, this);
531
380k
    RETURN_IF_ERROR(local_state->init(state, info));
532
380k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
380k
    return Status::OK();
534
380k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.62M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.00M
        : _num_rows_returned(0),
542
2.00M
          _rows_returned_counter(nullptr),
543
2.00M
          _parent(parent),
544
2.00M
          _state(state),
545
2.00M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.02M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.02M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.02M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.02M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.02M
    _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.02M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.02M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.02M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.02M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.02M
    if constexpr (!is_fake_shared) {
560
1.08M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
674k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
674k
                                    .first.get()
563
674k
                                    ->template cast<SharedStateArg>();
564
565
674k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
674k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
674k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
674k
        } else if (info.shared_state) {
569
341k
            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
341k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
341k
            _dependency = _shared_state->create_source_dependency(
576
341k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
341k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
341k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
341k
        } else {
580
72.1k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
10.3k
                DCHECK(false);
582
10.3k
            }
583
72.1k
        }
584
1.08M
    }
585
586
2.02M
    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.02M
    _rows_returned_counter =
591
2.02M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.02M
    _blocks_returned_counter =
593
2.02M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.02M
    _output_block_bytes_counter =
595
2.02M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.02M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.02M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.02M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.02M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.02M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.02M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.02M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.02M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.02M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.02M
    _memory_used_counter =
606
2.02M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.02M
    _common_profile->add_info_string("IsColocate",
608
2.02M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.02M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.02M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.02M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.02M
    return Status::OK();
613
2.02M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
67.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
67.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
67.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
67.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
67.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
67.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
67.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
67.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
67.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
67.0k
    if constexpr (!is_fake_shared) {
560
67.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
16.8k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
16.8k
                                    .first.get()
563
16.8k
                                    ->template cast<SharedStateArg>();
564
565
16.8k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
16.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
16.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
50.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
49.4k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
49.4k
            _dependency = _shared_state->create_source_dependency(
576
49.4k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
49.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
49.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
49.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
728
        }
584
67.0k
    }
585
586
67.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
67.0k
    _rows_returned_counter =
591
67.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
67.0k
    _blocks_returned_counter =
593
67.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
67.0k
    _output_block_bytes_counter =
595
67.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
67.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
67.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
67.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
67.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
67.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
67.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
67.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
67.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
67.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
67.0k
    _memory_used_counter =
606
67.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
67.0k
    _common_profile->add_info_string("IsColocate",
608
67.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
67.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
67.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
67.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
67.0k
    return Status::OK();
613
67.0k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
1
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
191k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
191k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
191k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
191k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
191k
    _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
191k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
191k
    _operator_profile->add_child(_common_profile.get(), true);
557
191k
    _operator_profile->add_child(_custom_profile.get(), true);
558
191k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
191k
    if constexpr (!is_fake_shared) {
560
191k
        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
191k
        } 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
180k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
180k
            _dependency = _shared_state->create_source_dependency(
576
180k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
180k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
180k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
180k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
10.5k
        }
584
191k
    }
585
586
191k
    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
191k
    _rows_returned_counter =
591
191k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
191k
    _blocks_returned_counter =
593
191k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
191k
    _output_block_bytes_counter =
595
191k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
191k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
191k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
191k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
191k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
191k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
191k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
191k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
191k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
191k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
191k
    _memory_used_counter =
606
191k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
191k
    _common_profile->add_info_string("IsColocate",
608
191k
                                     std::to_string(_parent->is_colocated_operator()));
609
191k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
191k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
191k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
191k
    return Status::OK();
613
191k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
35
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
35
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
35
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
35
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
35
    _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
35
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
35
    _operator_profile->add_child(_common_profile.get(), true);
557
35
    _operator_profile->add_child(_custom_profile.get(), true);
558
35
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
35
    if constexpr (!is_fake_shared) {
560
35
        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
35
        } 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
35
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
35
            _dependency = _shared_state->create_source_dependency(
576
35
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
35
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
35
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
35
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
35
    }
585
586
35
    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
35
    _rows_returned_counter =
591
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
35
    _blocks_returned_counter =
593
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
35
    _output_block_bytes_counter =
595
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
35
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
35
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
35
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
35
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
35
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
35
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
35
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
35
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
35
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
35
    _memory_used_counter =
606
35
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
35
    _common_profile->add_info_string("IsColocate",
608
35
                                     std::to_string(_parent->is_colocated_operator()));
609
35
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
35
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
35
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
35
    return Status::OK();
613
35
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.08k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.08k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.08k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.08k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.08k
    _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
6.08k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.08k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.08k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.08k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.08k
    if constexpr (!is_fake_shared) {
560
6.08k
        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
6.08k
        } 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
6.01k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.01k
            _dependency = _shared_state->create_source_dependency(
576
6.01k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.01k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.01k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.01k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
72
        }
584
6.08k
    }
585
586
6.08k
    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
6.08k
    _rows_returned_counter =
591
6.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.08k
    _blocks_returned_counter =
593
6.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.08k
    _output_block_bytes_counter =
595
6.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.08k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.08k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.08k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.08k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.08k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.08k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.08k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.08k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.08k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.08k
    _memory_used_counter =
606
6.08k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.08k
    _common_profile->add_info_string("IsColocate",
608
6.08k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.08k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.08k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.08k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.08k
    return Status::OK();
613
6.08k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.25k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.25k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.25k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.25k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.25k
    _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
8.25k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.25k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.25k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.25k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.25k
    if constexpr (!is_fake_shared) {
560
8.25k
        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
8.25k
        } 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
8.11k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.11k
            _dependency = _shared_state->create_source_dependency(
576
8.11k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.11k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.11k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.11k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
146
        }
584
8.25k
    }
585
586
8.25k
    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
8.25k
    _rows_returned_counter =
591
8.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.25k
    _blocks_returned_counter =
593
8.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.25k
    _output_block_bytes_counter =
595
8.25k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.25k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.25k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.25k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.25k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.25k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.25k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.25k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.25k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.25k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.25k
    _memory_used_counter =
606
8.25k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.25k
    _common_profile->add_info_string("IsColocate",
608
8.25k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.25k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.25k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.25k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.25k
    return Status::OK();
613
8.25k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
86.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
86.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
86.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
86.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
86.7k
    _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
86.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
86.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
86.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
86.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
86.7k
    if constexpr (!is_fake_shared) {
560
86.7k
        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
86.7k
        } 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
85.0k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
85.0k
            _dependency = _shared_state->create_source_dependency(
576
85.0k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
85.0k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
85.0k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
85.0k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.78k
        }
584
86.7k
    }
585
586
86.7k
    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
86.7k
    _rows_returned_counter =
591
86.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
86.7k
    _blocks_returned_counter =
593
86.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
86.7k
    _output_block_bytes_counter =
595
86.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
86.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
86.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
86.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
86.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
86.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
86.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
86.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
86.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
86.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
86.7k
    _memory_used_counter =
606
86.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
86.7k
    _common_profile->add_info_string("IsColocate",
608
86.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
86.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
86.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
86.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
86.7k
    return Status::OK();
613
86.7k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
38.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
38.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
38.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
38.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
38.7k
    _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.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
38.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
38.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
38.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
38.7k
    if constexpr (!is_fake_shared) {
560
38.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
38.8k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
38.8k
                                    .first.get()
563
38.8k
                                    ->template cast<SharedStateArg>();
564
565
38.8k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
38.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
38.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } 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
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
38.7k
    }
585
586
38.7k
    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.7k
    _rows_returned_counter =
591
38.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
38.7k
    _blocks_returned_counter =
593
38.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
38.7k
    _output_block_bytes_counter =
595
38.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
38.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
38.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
38.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
38.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
38.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
38.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
38.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
38.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
38.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
38.7k
    _memory_used_counter =
606
38.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
38.7k
    _common_profile->add_info_string("IsColocate",
608
38.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
38.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
38.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
38.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
38.7k
    return Status::OK();
613
38.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
100
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
100
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
100
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
100
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
100
    _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
100
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
100
    _operator_profile->add_child(_common_profile.get(), true);
557
100
    _operator_profile->add_child(_custom_profile.get(), true);
558
100
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
100
    if constexpr (!is_fake_shared) {
560
100
        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
100
        } 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
100
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
100
            _dependency = _shared_state->create_source_dependency(
576
100
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
100
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
100
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
100
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
100
    }
585
586
100
    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
100
    _rows_returned_counter =
591
100
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
100
    _blocks_returned_counter =
593
100
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
100
    _output_block_bytes_counter =
595
100
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
100
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
100
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
100
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
100
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
100
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
100
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
100
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
100
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
100
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
100
    _memory_used_counter =
606
100
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
100
    _common_profile->add_info_string("IsColocate",
608
100
                                     std::to_string(_parent->is_colocated_operator()));
609
100
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
100
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
100
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
100
    return Status::OK();
613
100
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
935k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
935k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
935k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
935k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
935k
    _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
935k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
935k
    _operator_profile->add_child(_common_profile.get(), true);
557
935k
    _operator_profile->add_child(_custom_profile.get(), true);
558
935k
    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
935k
    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
935k
    _rows_returned_counter =
591
935k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
935k
    _blocks_returned_counter =
593
935k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
935k
    _output_block_bytes_counter =
595
935k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
935k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
935k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
935k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
935k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
935k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
935k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
935k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
935k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
935k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
935k
    _memory_used_counter =
606
935k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
935k
    _common_profile->add_info_string("IsColocate",
608
935k
                                     std::to_string(_parent->is_colocated_operator()));
609
935k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
935k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
935k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
935k
    return Status::OK();
613
935k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
50.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
50.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
50.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
50.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
50.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
50.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
50.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
50.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
50.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
50.5k
    if constexpr (!is_fake_shared) {
560
50.5k
        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
50.5k
        } 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.10k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
2.10k
            _dependency = _shared_state->create_source_dependency(
576
2.10k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
2.10k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
2.10k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
48.4k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
48.4k
        }
584
50.5k
    }
585
586
50.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
50.5k
    _rows_returned_counter =
591
50.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
50.5k
    _blocks_returned_counter =
593
50.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
50.5k
    _output_block_bytes_counter =
595
50.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
50.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
50.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
50.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
50.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
50.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
50.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
50.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
50.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
50.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
50.5k
    _memory_used_counter =
606
50.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
50.5k
    _common_profile->add_info_string("IsColocate",
608
50.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
50.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
50.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
50.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
50.5k
    return Status::OK();
613
50.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.12k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.12k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.12k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.12k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.12k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4.12k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.12k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.12k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.12k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.12k
    if constexpr (!is_fake_shared) {
560
4.12k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4.12k
        } 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.10k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.10k
            _dependency = _shared_state->create_source_dependency(
576
4.10k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.10k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.10k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.10k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
19
        }
584
4.12k
    }
585
586
4.12k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4.12k
    _rows_returned_counter =
591
4.12k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.12k
    _blocks_returned_counter =
593
4.12k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.12k
    _output_block_bytes_counter =
595
4.12k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.12k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.12k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.12k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.12k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.12k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.12k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.12k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.12k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.12k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.12k
    _memory_used_counter =
606
4.12k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.12k
    _common_profile->add_info_string("IsColocate",
608
4.12k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.12k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.12k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.12k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.12k
    return Status::OK();
613
4.12k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
548
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
548
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
548
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
548
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
548
    _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
548
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
548
    _operator_profile->add_child(_common_profile.get(), true);
557
548
    _operator_profile->add_child(_custom_profile.get(), true);
558
548
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
548
    if constexpr (!is_fake_shared) {
560
548
        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
548
        } 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
530
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
530
            _dependency = _shared_state->create_source_dependency(
576
530
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
530
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
530
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
530
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18
        }
584
548
    }
585
586
548
    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
548
    _rows_returned_counter =
591
548
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
548
    _blocks_returned_counter =
593
548
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
548
    _output_block_bytes_counter =
595
548
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
548
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
548
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
548
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
548
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
548
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
548
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
548
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
548
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
548
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
548
    _memory_used_counter =
606
548
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
548
    _common_profile->add_info_string("IsColocate",
608
548
                                     std::to_string(_parent->is_colocated_operator()));
609
548
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
548
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
548
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
548
    return Status::OK();
613
548
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.12k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.12k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.12k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.12k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.12k
    _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.12k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.12k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.12k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.12k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.12k
    if constexpr (!is_fake_shared) {
560
5.12k
        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.12k
        } 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.07k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.07k
            _dependency = _shared_state->create_source_dependency(
576
5.07k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.07k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.07k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.07k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
46
        }
584
5.12k
    }
585
586
5.12k
    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.12k
    _rows_returned_counter =
591
5.12k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.12k
    _blocks_returned_counter =
593
5.12k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.12k
    _output_block_bytes_counter =
595
5.12k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.12k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.12k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.12k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.12k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.12k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.12k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.12k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.12k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.12k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.12k
    _memory_used_counter =
606
5.12k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.12k
    _common_profile->add_info_string("IsColocate",
608
5.12k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.12k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.12k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.12k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.12k
    return Status::OK();
613
5.12k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
629k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
629k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
629k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
629k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
629k
    _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
629k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
629k
    _operator_profile->add_child(_common_profile.get(), true);
557
629k
    _operator_profile->add_child(_custom_profile.get(), true);
558
629k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
629k
    if constexpr (!is_fake_shared) {
560
629k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
619k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
619k
                                    .first.get()
563
619k
                                    ->template cast<SharedStateArg>();
564
565
619k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
619k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
619k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
619k
        } 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
10.3k
        } else {
580
10.3k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
10.3k
                DCHECK(false);
582
10.3k
            }
583
10.3k
        }
584
629k
    }
585
586
629k
    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
629k
    _rows_returned_counter =
591
629k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
629k
    _blocks_returned_counter =
593
629k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
629k
    _output_block_bytes_counter =
595
629k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
629k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
629k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
629k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
629k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
629k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
629k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
629k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
629k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
629k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
629k
    _memory_used_counter =
606
629k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
629k
    _common_profile->add_info_string("IsColocate",
608
629k
                                     std::to_string(_parent->is_colocated_operator()));
609
629k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
629k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
629k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
629k
    return Status::OK();
613
629k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
164
    _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
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
164
    _operator_profile->add_child(_common_profile.get(), true);
557
164
    _operator_profile->add_child(_custom_profile.get(), true);
558
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
164
    if constexpr (!is_fake_shared) {
560
164
        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
164
        } 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
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
164
            _dependency = _shared_state->create_source_dependency(
576
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
164
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
164
    }
585
586
164
    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
164
    _rows_returned_counter =
591
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
164
    _blocks_returned_counter =
593
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
164
    _output_block_bytes_counter =
595
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
164
    _memory_used_counter =
606
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
164
    _common_profile->add_info_string("IsColocate",
608
164
                                     std::to_string(_parent->is_colocated_operator()));
609
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
164
    return Status::OK();
613
164
}
614
615
template <typename SharedStateArg>
616
2.04M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.04M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.32M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
280k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
280k
    }
621
2.04M
    if (_parent->has_projection()) {
622
347k
        const auto& projection = *_parent->_projection;
623
347k
        _projections.resize(projection.projections.size());
624
2.15M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.80M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.80M
        }
627
347k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
357k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.88k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
58.6k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
48.7k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
48.7k
                        state, _intermediate_projections[i][j]));
633
48.7k
            }
634
9.88k
        }
635
347k
    }
636
2.04M
    return Status::OK();
637
2.04M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
67.2k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
67.2k
    _conjuncts.resize(_parent->_conjuncts.size());
618
68.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
881
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
881
    }
621
67.2k
    if (_parent->has_projection()) {
622
67.2k
        const auto& projection = *_parent->_projection;
623
67.2k
        _projections.resize(projection.projections.size());
624
347k
        for (size_t i = 0; i < _projections.size(); i++) {
625
280k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
280k
        }
627
67.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
67.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
693
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
5.14k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.45k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.45k
                        state, _intermediate_projections[i][j]));
633
4.45k
            }
634
693
        }
635
67.2k
    }
636
67.2k
    return Status::OK();
637
67.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
194k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
194k
    _conjuncts.resize(_parent->_conjuncts.size());
618
194k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
194k
    if (_parent->has_projection()) {
622
78
        const auto& projection = *_parent->_projection;
623
78
        _projections.resize(projection.projections.size());
624
398
        for (size_t i = 0; i < _projections.size(); i++) {
625
320
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
320
        }
627
78
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
78
        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
78
    }
636
194k
    return Status::OK();
637
194k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
35
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
35
    _conjuncts.resize(_parent->_conjuncts.size());
618
35
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
35
    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
35
    return Status::OK();
637
35
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.08k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.08k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.15k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
74
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
74
    }
621
6.08k
    if (_parent->has_projection()) {
622
6.07k
        const auto& projection = *_parent->_projection;
623
6.07k
        _projections.resize(projection.projections.size());
624
27.8k
        for (size_t i = 0; i < _projections.size(); i++) {
625
21.7k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
21.7k
        }
627
6.07k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.09k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
18
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
153
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
135
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
135
                        state, _intermediate_projections[i][j]));
633
135
            }
634
18
        }
635
6.07k
    }
636
6.08k
    return Status::OK();
637
6.08k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.28k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.28k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.10k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
819
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
819
    }
621
8.28k
    if (_parent->has_projection()) {
622
5.26k
        const auto& projection = *_parent->_projection;
623
5.26k
        _projections.resize(projection.projections.size());
624
20.3k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.1k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.1k
        }
627
5.26k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.35k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
91
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
679
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
588
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
588
                        state, _intermediate_projections[i][j]));
633
588
            }
634
91
        }
635
5.26k
    }
636
8.28k
    return Status::OK();
637
8.28k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
86.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
86.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
88.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.46k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.46k
    }
621
86.9k
    if (_parent->has_projection()) {
622
26.7k
        const auto& projection = *_parent->_projection;
623
26.7k
        _projections.resize(projection.projections.size());
624
236k
        for (size_t i = 0; i < _projections.size(); i++) {
625
209k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
209k
        }
627
26.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
26.9k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
173
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.08k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
908
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
908
                        state, _intermediate_projections[i][j]));
633
908
            }
634
173
        }
635
26.7k
    }
636
86.9k
    return Status::OK();
637
86.9k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
38.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
38.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
38.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
11
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
11
    }
621
38.8k
    if (_parent->has_projection()) {
622
99
        const auto& projection = *_parent->_projection;
623
99
        _projections.resize(projection.projections.size());
624
420
        for (size_t i = 0; i < _projections.size(); i++) {
625
321
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
321
        }
627
99
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
99
        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
99
    }
636
38.8k
    return Status::OK();
637
38.8k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
104
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
104
    _conjuncts.resize(_parent->_conjuncts.size());
618
104
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
104
    if (_parent->has_projection()) {
622
58
        const auto& projection = *_parent->_projection;
623
58
        _projections.resize(projection.projections.size());
624
174
        for (size_t i = 0; i < _projections.size(); i++) {
625
116
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
116
        }
627
58
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
58
        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
58
    }
636
104
    return Status::OK();
637
104
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
943k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
943k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.21M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
276k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
276k
    }
621
943k
    if (_parent->has_projection()) {
622
232k
        const auto& projection = *_parent->_projection;
623
232k
        _projections.resize(projection.projections.size());
624
1.42M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.19M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.19M
        }
627
232k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
241k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
8.89k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
51.5k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
42.6k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
42.6k
                        state, _intermediate_projections[i][j]));
633
42.6k
            }
634
8.89k
        }
635
232k
    }
636
943k
    return Status::OK();
637
943k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
50.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
50.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
50.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
50.9k
    if (_parent->has_projection()) {
622
9.73k
        const auto& projection = *_parent->_projection;
623
9.73k
        _projections.resize(projection.projections.size());
624
94.6k
        for (size_t i = 0; i < _projections.size(); i++) {
625
84.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
84.9k
        }
627
9.73k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
9.74k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
7
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
39
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
32
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
32
                        state, _intermediate_projections[i][j]));
633
32
            }
634
7
        }
635
9.73k
    }
636
50.9k
    return Status::OK();
637
50.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.10k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.10k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.72k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
618
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
618
    }
621
4.10k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
4.10k
    return Status::OK();
637
4.10k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
553
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
553
    _conjuncts.resize(_parent->_conjuncts.size());
618
553
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
553
    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
553
    return Status::OK();
637
553
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.12k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.12k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.12k
    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.12k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
228
        for (size_t i = 0; i < _projections.size(); i++) {
625
168
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
168
        }
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.12k
    return Status::OK();
637
5.12k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
636k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
636k
    _conjuncts.resize(_parent->_conjuncts.size());
618
636k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
636k
    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
636k
    return Status::OK();
637
636k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
164
    _conjuncts.resize(_parent->_conjuncts.size());
618
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
164
    if (_parent->has_projection()) {
622
161
        const auto& projection = *_parent->_projection;
623
161
        _projections.resize(projection.projections.size());
624
480
        for (size_t i = 0; i < _projections.size(); i++) {
625
319
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
319
        }
627
161
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
164
        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
161
    }
636
164
    return Status::OK();
637
164
}
638
639
template <typename SharedStateArg>
640
5.23k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5.23k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5.23k
    _terminated = true;
645
5.23k
    return Status::OK();
646
5.23k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
293
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
293
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
293
    _terminated = true;
645
293
    return Status::OK();
646
293
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
12
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
12
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
12
    _terminated = true;
645
12
    return Status::OK();
646
12
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
65
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
65
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
65
    _terminated = true;
645
65
    return Status::OK();
646
65
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
113
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
113
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
113
    _terminated = true;
645
113
    return Status::OK();
646
113
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3.88k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3.88k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3.88k
    _terminated = true;
645
3.88k
    return Status::OK();
646
3.88k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7
    _terminated = true;
645
7
    return Status::OK();
646
7
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
823
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
823
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
823
    _terminated = true;
645
823
    return Status::OK();
646
823
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
33
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
33
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
33
    _terminated = true;
645
33
    return Status::OK();
646
33
}
647
648
template <typename SharedStateArg>
649
2.26M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.26M
    if (_closed) {
651
221k
        return Status::OK();
652
221k
    }
653
2.04M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.09M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.09M
    }
656
2.04M
    _closed = true;
657
2.04M
    return Status::OK();
658
2.26M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
67.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
67.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
67.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
67.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
67.2k
    }
656
67.2k
    _closed = true;
657
67.2k
    return Status::OK();
658
67.2k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
386k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
386k
    if (_closed) {
651
193k
        return Status::OK();
652
193k
    }
653
192k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
192k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
192k
    }
656
192k
    _closed = true;
657
192k
    return Status::OK();
658
386k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
35
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
35
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
35
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
35
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
35
    }
656
35
    _closed = true;
657
35
    return Status::OK();
658
35
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.08k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.08k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.08k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.08k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.08k
    }
656
6.08k
    _closed = true;
657
6.08k
    return Status::OK();
658
6.08k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
16.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
16.6k
    if (_closed) {
651
8.42k
        return Status::OK();
652
8.42k
    }
653
8.24k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.24k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.24k
    }
656
8.24k
    _closed = true;
657
8.24k
    return Status::OK();
658
16.6k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
86.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
86.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
86.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
86.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
86.8k
    }
656
86.8k
    _closed = true;
657
86.8k
    return Status::OK();
658
86.8k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
38.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
38.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
38.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
38.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
38.6k
    }
656
38.6k
    _closed = true;
657
38.6k
    return Status::OK();
658
38.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
99
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
99
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
99
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
99
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
99
    }
656
99
    _closed = true;
657
99
    return Status::OK();
658
99
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
958k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
958k
    if (_closed) {
651
13.5k
        return Status::OK();
652
13.5k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
944k
    _closed = true;
657
944k
    return Status::OK();
658
958k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
50.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
50.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
50.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
50.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
50.9k
    }
656
50.9k
    _closed = true;
657
50.9k
    return Status::OK();
658
50.9k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.08k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.08k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.08k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.08k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.08k
    }
656
4.08k
    _closed = true;
657
4.08k
    return Status::OK();
658
4.08k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
901
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
901
    if (_closed) {
651
451
        return Status::OK();
652
451
    }
653
450
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
450
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
450
    }
656
450
    _closed = true;
657
450
    return Status::OK();
658
901
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.4k
    if (_closed) {
651
5.37k
        return Status::OK();
652
5.37k
    }
653
5.10k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.10k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.10k
    }
656
5.10k
    _closed = true;
657
5.10k
    return Status::OK();
658
10.4k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
637k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
637k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
637k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
637k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
637k
    }
656
637k
    _closed = true;
657
637k
    return Status::OK();
658
637k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
324
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
324
    if (_closed) {
651
169
        return Status::OK();
652
169
    }
653
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
155
    }
656
155
    _closed = true;
657
155
    return Status::OK();
658
324
}
659
660
template <typename SharedState>
661
1.63M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.63M
    _operator_profile =
664
1.63M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.63M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.63M
    _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.63M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.63M
    _operator_profile->add_child(_common_profile, true);
673
1.63M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.63M
    _operator_profile->set_metadata(_parent->node_id());
676
1.63M
    _wait_for_finish_dependency_timer =
677
1.63M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.63M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.63M
    if constexpr (!is_fake_shared) {
680
1.12M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.12M
            info.shared_state_map.end()) {
682
303k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
247k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
247k
            }
685
303k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
303k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
303k
                                                  ? 0
688
303k
                                                  : info.task_idx]
689
303k
                                  .get();
690
303k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
821k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
821k
            _shared_state = info.shared_state->template cast<SharedState>();
696
821k
            _dependency = _shared_state->create_sink_dependency(
697
821k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
821k
        }
699
1.12M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.12M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.12M
    }
702
703
1.63M
    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.63M
    _rows_input_counter =
708
1.63M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.63M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.63M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.63M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.63M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.63M
    _memory_used_counter =
714
1.63M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.63M
    _common_profile->add_info_string("IsColocate",
716
1.63M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.63M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.63M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.63M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.63M
    return Status::OK();
721
1.63M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
115k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
115k
    _operator_profile =
664
115k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
115k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
115k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
115k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
115k
    _operator_profile->add_child(_common_profile, true);
673
115k
    _operator_profile->add_child(_custom_profile, true);
674
675
115k
    _operator_profile->set_metadata(_parent->node_id());
676
115k
    _wait_for_finish_dependency_timer =
677
115k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
115k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
115k
    if constexpr (!is_fake_shared) {
680
115k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
115k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
17.0k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
17.0k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
17.0k
                                                  ? 0
688
17.0k
                                                  : info.task_idx]
689
17.0k
                                  .get();
690
17.0k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
97.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
97.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
97.9k
            _dependency = _shared_state->create_sink_dependency(
697
97.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
97.9k
        }
699
115k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
115k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
115k
    }
702
703
115k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
115k
    _rows_input_counter =
708
115k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
115k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
115k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
115k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
115k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
115k
    _memory_used_counter =
714
115k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
115k
    _common_profile->add_info_string("IsColocate",
716
115k
                                     std::to_string(_parent->is_colocated_operator()));
717
115k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
115k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
115k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
115k
    return Status::OK();
721
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2
    _operator_profile =
664
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2
    _operator_profile->add_child(_common_profile, true);
673
2
    _operator_profile->add_child(_custom_profile, true);
674
675
2
    _operator_profile->set_metadata(_parent->node_id());
676
2
    _wait_for_finish_dependency_timer =
677
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2
    if constexpr (!is_fake_shared) {
680
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2
            _shared_state = info.shared_state->template cast<SharedState>();
696
2
            _dependency = _shared_state->create_sink_dependency(
697
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2
        }
699
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2
    }
702
703
2
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2
    _rows_input_counter =
708
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2
    _memory_used_counter =
714
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2
    _common_profile->add_info_string("IsColocate",
716
2
                                     std::to_string(_parent->is_colocated_operator()));
717
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2
    return Status::OK();
721
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
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
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
192k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
192k
            _shared_state = info.shared_state->template cast<SharedState>();
696
192k
            _dependency = _shared_state->create_sink_dependency(
697
192k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
192k
        }
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_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
41
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
41
    _operator_profile =
664
41
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
41
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
41
    _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
41
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
41
    _operator_profile->add_child(_common_profile, true);
673
41
    _operator_profile->add_child(_custom_profile, true);
674
675
41
    _operator_profile->set_metadata(_parent->node_id());
676
41
    _wait_for_finish_dependency_timer =
677
41
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
41
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
41
    if constexpr (!is_fake_shared) {
680
41
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
41
            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
41
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
41
            _shared_state = info.shared_state->template cast<SharedState>();
696
41
            _dependency = _shared_state->create_sink_dependency(
697
41
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
41
        }
699
41
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
41
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
41
    }
702
703
42
    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
41
    _rows_input_counter =
708
41
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
41
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
41
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
41
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
41
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
41
    _memory_used_counter =
714
41
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
41
    _common_profile->add_info_string("IsColocate",
716
41
                                     std::to_string(_parent->is_colocated_operator()));
717
41
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
41
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
41
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
41
    return Status::OK();
721
41
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.07k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.07k
    _operator_profile =
664
6.07k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.07k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.07k
    _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
6.07k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.07k
    _operator_profile->add_child(_common_profile, true);
673
6.07k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.07k
    _operator_profile->set_metadata(_parent->node_id());
676
6.07k
    _wait_for_finish_dependency_timer =
677
6.07k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.07k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.07k
    if constexpr (!is_fake_shared) {
680
6.07k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.07k
            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
6.07k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.07k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.07k
            _dependency = _shared_state->create_sink_dependency(
697
6.07k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.07k
        }
699
6.07k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.07k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.07k
    }
702
703
6.07k
    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
6.07k
    _rows_input_counter =
708
6.07k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.07k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.07k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.07k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.07k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.07k
    _memory_used_counter =
714
6.07k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.07k
    _common_profile->add_info_string("IsColocate",
716
6.07k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.07k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.07k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.07k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.07k
    return Status::OK();
721
6.07k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.22k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.22k
    _operator_profile =
664
8.22k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.22k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.22k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
8.22k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.22k
    _operator_profile->add_child(_common_profile, true);
673
8.22k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.22k
    _operator_profile->set_metadata(_parent->node_id());
676
8.22k
    _wait_for_finish_dependency_timer =
677
8.22k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.22k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.22k
    if constexpr (!is_fake_shared) {
680
8.22k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.22k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
8.22k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.22k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.22k
            _dependency = _shared_state->create_sink_dependency(
697
8.22k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.22k
        }
699
8.22k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.22k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.22k
    }
702
703
8.22k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
8.22k
    _rows_input_counter =
708
8.22k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.22k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.22k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.22k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.22k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.22k
    _memory_used_counter =
714
8.22k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.22k
    _common_profile->add_info_string("IsColocate",
716
8.22k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.22k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.22k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.22k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.22k
    return Status::OK();
721
8.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
86.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
86.7k
    _operator_profile =
664
86.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
86.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
86.7k
    _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
86.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
86.7k
    _operator_profile->add_child(_common_profile, true);
673
86.7k
    _operator_profile->add_child(_custom_profile, true);
674
675
86.7k
    _operator_profile->set_metadata(_parent->node_id());
676
86.7k
    _wait_for_finish_dependency_timer =
677
86.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
86.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
86.7k
    if constexpr (!is_fake_shared) {
680
86.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
86.7k
            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
86.7k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
86.7k
            _shared_state = info.shared_state->template cast<SharedState>();
696
86.7k
            _dependency = _shared_state->create_sink_dependency(
697
86.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
86.7k
        }
699
86.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
86.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
86.7k
    }
702
703
86.7k
    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
86.7k
    _rows_input_counter =
708
86.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
86.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
86.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
86.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
86.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
86.7k
    _memory_used_counter =
714
86.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
86.7k
    _common_profile->add_info_string("IsColocate",
716
86.7k
                                     std::to_string(_parent->is_colocated_operator()));
717
86.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
86.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
86.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
86.7k
    return Status::OK();
721
86.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
38.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
38.7k
    _operator_profile =
664
38.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
38.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
38.7k
    _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
38.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
38.7k
    _operator_profile->add_child(_common_profile, true);
673
38.7k
    _operator_profile->add_child(_custom_profile, true);
674
675
38.7k
    _operator_profile->set_metadata(_parent->node_id());
676
38.7k
    _wait_for_finish_dependency_timer =
677
38.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
38.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
38.7k
    if constexpr (!is_fake_shared) {
680
38.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
38.7k
            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
38.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
38.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
38.7k
                                                  ? 0
688
38.7k
                                                  : info.task_idx]
689
38.7k
                                  .get();
690
38.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
38.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
38.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
38.7k
    }
702
703
38.7k
    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
38.7k
    _rows_input_counter =
708
38.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
38.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
38.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
38.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
38.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
38.7k
    _memory_used_counter =
714
38.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
38.7k
    _common_profile->add_info_string("IsColocate",
716
38.7k
                                     std::to_string(_parent->is_colocated_operator()));
717
38.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
38.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
38.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
38.7k
    return Status::OK();
721
38.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
110
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
110
    _operator_profile =
664
110
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
110
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
110
    _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
110
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
110
    _operator_profile->add_child(_common_profile, true);
673
110
    _operator_profile->add_child(_custom_profile, true);
674
675
110
    _operator_profile->set_metadata(_parent->node_id());
676
110
    _wait_for_finish_dependency_timer =
677
110
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
110
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
110
    if constexpr (!is_fake_shared) {
680
110
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
110
            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
110
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
110
            _shared_state = info.shared_state->template cast<SharedState>();
696
110
            _dependency = _shared_state->create_sink_dependency(
697
110
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
110
        }
699
110
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
110
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
110
    }
702
703
110
    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
110
    _rows_input_counter =
708
110
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
110
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
110
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
110
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
110
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
110
    _memory_used_counter =
714
110
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
110
    _common_profile->add_info_string("IsColocate",
716
110
                                     std::to_string(_parent->is_colocated_operator()));
717
110
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
110
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
110
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
110
    return Status::OK();
721
110
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
506k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
506k
    _operator_profile =
664
506k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
506k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
506k
    _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
506k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
506k
    _operator_profile->add_child(_common_profile, true);
673
506k
    _operator_profile->add_child(_custom_profile, true);
674
675
506k
    _operator_profile->set_metadata(_parent->node_id());
676
506k
    _wait_for_finish_dependency_timer =
677
506k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
506k
    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
506k
    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
506k
    _rows_input_counter =
708
506k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
506k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
506k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
506k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
506k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
506k
    _memory_used_counter =
714
506k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
506k
    _common_profile->add_info_string("IsColocate",
716
506k
                                     std::to_string(_parent->is_colocated_operator()));
717
506k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
506k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
506k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
506k
    return Status::OK();
721
506k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
4.48k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
4.48k
    _operator_profile =
664
4.48k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
4.48k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
4.48k
    _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.48k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
4.48k
    _operator_profile->add_child(_common_profile, true);
673
4.48k
    _operator_profile->add_child(_custom_profile, true);
674
675
4.48k
    _operator_profile->set_metadata(_parent->node_id());
676
4.48k
    _wait_for_finish_dependency_timer =
677
4.48k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
4.48k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
4.48k
    if constexpr (!is_fake_shared) {
680
4.48k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
4.48k
            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.48k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
4.48k
            _shared_state = info.shared_state->template cast<SharedState>();
696
4.48k
            _dependency = _shared_state->create_sink_dependency(
697
4.48k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
4.48k
        }
699
4.48k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
4.48k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
4.48k
    }
702
703
4.48k
    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.48k
    _rows_input_counter =
708
4.48k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
4.48k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
4.48k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
4.48k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
4.48k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
4.48k
    _memory_used_counter =
714
4.48k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
4.48k
    _common_profile->add_info_string("IsColocate",
716
4.48k
                                     std::to_string(_parent->is_colocated_operator()));
717
4.48k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
4.48k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
4.48k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
4.48k
    return Status::OK();
721
4.48k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
551
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
551
    _operator_profile =
664
551
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
551
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
551
    _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
551
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
551
    _operator_profile->add_child(_common_profile, true);
673
551
    _operator_profile->add_child(_custom_profile, true);
674
675
551
    _operator_profile->set_metadata(_parent->node_id());
676
551
    _wait_for_finish_dependency_timer =
677
551
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
551
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
551
    if constexpr (!is_fake_shared) {
680
551
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
551
            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
551
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
551
            _shared_state = info.shared_state->template cast<SharedState>();
696
551
            _dependency = _shared_state->create_sink_dependency(
697
551
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
551
        }
699
551
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
551
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
551
    }
702
703
551
    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
551
    _rows_input_counter =
708
551
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
551
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
551
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
551
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
551
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
551
    _memory_used_counter =
714
551
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
551
    _common_profile->add_info_string("IsColocate",
716
551
                                     std::to_string(_parent->is_colocated_operator()));
717
551
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
551
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
551
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
551
    return Status::OK();
721
551
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.63k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.63k
    _operator_profile =
664
1.63k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.63k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.63k
    _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.63k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.63k
    _operator_profile->add_child(_common_profile, true);
673
1.63k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.63k
    _operator_profile->set_metadata(_parent->node_id());
676
1.63k
    _wait_for_finish_dependency_timer =
677
1.63k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.63k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.63k
    if constexpr (!is_fake_shared) {
680
1.63k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.63k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.63k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.63k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.63k
            _dependency = _shared_state->create_sink_dependency(
697
1.63k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.63k
        }
699
1.63k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.63k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.63k
    }
702
703
1.63k
    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.63k
    _rows_input_counter =
708
1.63k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.63k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.63k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.63k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.63k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.63k
    _memory_used_counter =
714
1.63k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.63k
    _common_profile->add_info_string("IsColocate",
716
1.63k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.63k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.63k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.63k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.63k
    return Status::OK();
721
1.63k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.4k
    _operator_profile =
664
12.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.4k
    _operator_profile->add_child(_common_profile, true);
673
12.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.4k
    _operator_profile->set_metadata(_parent->node_id());
676
12.4k
    _wait_for_finish_dependency_timer =
677
12.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.4k
    if constexpr (!is_fake_shared) {
680
12.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.4k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
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.4k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.4k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.4k
            _dependency = _shared_state->create_sink_dependency(
697
12.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.4k
        }
699
12.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.4k
    }
702
703
12.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.4k
    _rows_input_counter =
708
12.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.4k
    _memory_used_counter =
714
12.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.4k
    _common_profile->add_info_string("IsColocate",
716
12.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.4k
    return Status::OK();
721
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
247k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
247k
    _operator_profile =
664
247k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
247k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
247k
    _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
247k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
247k
    _operator_profile->add_child(_common_profile, true);
673
247k
    _operator_profile->add_child(_custom_profile, true);
674
675
247k
    _operator_profile->set_metadata(_parent->node_id());
676
247k
    _wait_for_finish_dependency_timer =
677
247k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
247k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
247k
    if constexpr (!is_fake_shared) {
680
247k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
247k
            info.shared_state_map.end()) {
682
247k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
247k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
247k
            }
685
247k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
247k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
247k
                                                  ? 0
688
247k
                                                  : info.task_idx]
689
247k
                                  .get();
690
247k
            _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
247k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
247k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
247k
    }
702
703
247k
    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
247k
    _rows_input_counter =
708
247k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
247k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
247k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
247k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
247k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
247k
    _memory_used_counter =
714
247k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
247k
    _common_profile->add_info_string("IsColocate",
716
247k
                                     std::to_string(_parent->is_colocated_operator()));
717
247k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
247k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
247k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
247k
    return Status::OK();
721
247k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
410k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
410k
    _operator_profile =
664
410k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
410k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
410k
    _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
410k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
410k
    _operator_profile->add_child(_common_profile, true);
673
410k
    _operator_profile->add_child(_custom_profile, true);
674
675
410k
    _operator_profile->set_metadata(_parent->node_id());
676
410k
    _wait_for_finish_dependency_timer =
677
410k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
410k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
410k
    if constexpr (!is_fake_shared) {
680
410k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
410k
            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
410k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
410k
            _shared_state = info.shared_state->template cast<SharedState>();
696
410k
            _dependency = _shared_state->create_sink_dependency(
697
410k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
410k
        }
699
410k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
410k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
410k
    }
702
703
410k
    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
410k
    _rows_input_counter =
708
410k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
410k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
410k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
410k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
410k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
410k
    _memory_used_counter =
714
410k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
410k
    _common_profile->add_info_string("IsColocate",
716
410k
                                     std::to_string(_parent->is_colocated_operator()));
717
410k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
410k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
410k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
410k
    return Status::OK();
721
410k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
328
    _operator_profile =
664
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
328
    _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
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
328
    _operator_profile->add_child(_common_profile, true);
673
328
    _operator_profile->add_child(_custom_profile, true);
674
675
328
    _operator_profile->set_metadata(_parent->node_id());
676
328
    _wait_for_finish_dependency_timer =
677
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
328
    if constexpr (!is_fake_shared) {
680
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
328
            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
328
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
328
            _shared_state = info.shared_state->template cast<SharedState>();
696
328
            _dependency = _shared_state->create_sink_dependency(
697
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
328
        }
699
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
328
    }
702
703
328
    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
328
    _rows_input_counter =
708
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
328
    _memory_used_counter =
714
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
328
    _common_profile->add_info_string("IsColocate",
716
328
                                     std::to_string(_parent->is_colocated_operator()));
717
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
328
    return Status::OK();
721
328
}
722
723
template <typename SharedState>
724
1.64M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.64M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.64M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.13M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.13M
    }
731
1.64M
    _closed = true;
732
1.64M
    return Status::OK();
733
1.64M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
115k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
115k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
115k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
115k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
115k
    }
731
115k
    _closed = true;
732
115k
    return Status::OK();
733
115k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
193k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
193k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
193k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
193k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
193k
    }
731
193k
    _closed = true;
732
193k
    return Status::OK();
733
193k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
33
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
33
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
31
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
31
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
31
    }
731
31
    _closed = true;
732
31
    return Status::OK();
733
33
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
6.01k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
6.01k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
6.01k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
6.01k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
6.01k
    }
731
6.01k
    _closed = true;
732
6.01k
    return Status::OK();
733
6.01k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.22k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.22k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.22k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.22k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.22k
    }
731
8.22k
    _closed = true;
732
8.22k
    return Status::OK();
733
8.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
86.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
86.5k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
86.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
86.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
86.5k
    }
731
86.5k
    _closed = true;
732
86.5k
    return Status::OK();
733
86.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
38.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
38.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
38.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
38.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
38.6k
    }
731
38.6k
    _closed = true;
732
38.6k
    return Status::OK();
733
38.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
99
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
99
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
99
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
99
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
99
    }
731
99
    _closed = true;
732
99
    return Status::OK();
733
99
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
513k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
513k
    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
513k
    _closed = true;
732
513k
    return Status::OK();
733
513k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
4.48k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
4.48k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
4.48k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
4.48k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
4.48k
    }
731
4.48k
    _closed = true;
732
4.48k
    return Status::OK();
733
4.48k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
446
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
446
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
446
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
446
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
446
    }
731
446
    _closed = true;
732
446
    return Status::OK();
733
446
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.65k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.65k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.65k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.65k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.65k
    }
731
1.65k
    _closed = true;
732
1.65k
    return Status::OK();
733
1.65k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.4k
    }
731
12.4k
    _closed = true;
732
12.4k
    return Status::OK();
733
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
248k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
248k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
248k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
248k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
248k
    }
731
248k
    _closed = true;
732
248k
    return Status::OK();
733
248k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
415k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
415k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
415k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
415k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
415k
    }
731
415k
    _closed = true;
732
415k
    return Status::OK();
733
415k
}
_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
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
328
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
328
    }
731
328
    _closed = true;
732
328
    return Status::OK();
733
328
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
7.39k
                                                          bool* eos) {
738
7.39k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.39k
    return pull(state, block, eos);
740
7.39k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
38
                                                          bool* eos) {
738
38
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
38
    return pull(state, block, eos);
740
38
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
7.36k
                                                          bool* eos) {
738
7.36k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.35k
    return pull(state, block, eos);
740
7.36k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
610k
                                                         bool* eos) {
745
610k
    auto& local_state = get_local_state(state);
746
610k
    if (need_more_input_data(state)) {
747
582k
        local_state._child_block->clear_column_data(
748
582k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
582k
                        .num_materialized_slots());
750
582k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
582k
                state, local_state._child_block.get(), &local_state._child_eos));
752
582k
        *eos = local_state._child_eos;
753
582k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
60.7k
            return Status::OK();
755
60.7k
        }
756
521k
        {
757
521k
            SCOPED_TIMER(local_state.exec_time_counter());
758
521k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
521k
        }
760
521k
    }
761
762
549k
    if (!need_more_input_data(state)) {
763
521k
        SCOPED_TIMER(local_state.exec_time_counter());
764
521k
        bool new_eos = false;
765
521k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
521k
        if (new_eos) {
767
440k
            *eos = true;
768
440k
        } else if (!need_more_input_data(state)) {
769
22.9k
            *eos = false;
770
22.9k
        }
771
521k
    }
772
549k
    return Status::OK();
773
549k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
144k
                                                         bool* eos) {
745
144k
    auto& local_state = get_local_state(state);
746
144k
    if (need_more_input_data(state)) {
747
126k
        local_state._child_block->clear_column_data(
748
126k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
126k
                        .num_materialized_slots());
750
126k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
126k
                state, local_state._child_block.get(), &local_state._child_eos));
752
126k
        *eos = local_state._child_eos;
753
126k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
40.0k
            return Status::OK();
755
40.0k
        }
756
86.8k
        {
757
86.8k
            SCOPED_TIMER(local_state.exec_time_counter());
758
86.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
86.8k
        }
760
86.8k
    }
761
762
104k
    if (!need_more_input_data(state)) {
763
104k
        SCOPED_TIMER(local_state.exec_time_counter());
764
104k
        bool new_eos = false;
765
104k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
104k
        if (new_eos) {
767
42.8k
            *eos = true;
768
61.1k
        } else if (!need_more_input_data(state)) {
769
10.4k
            *eos = false;
770
10.4k
        }
771
104k
    }
772
104k
    return Status::OK();
773
104k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
3.94k
                                                         bool* eos) {
745
3.94k
    auto& local_state = get_local_state(state);
746
3.94k
    if (need_more_input_data(state)) {
747
2.17k
        local_state._child_block->clear_column_data(
748
2.17k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.17k
                        .num_materialized_slots());
750
2.17k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.17k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.17k
        *eos = local_state._child_eos;
753
2.17k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
447
            return Status::OK();
755
447
        }
756
1.72k
        {
757
1.72k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.72k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.72k
        }
760
1.72k
    }
761
762
3.50k
    if (!need_more_input_data(state)) {
763
3.50k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.50k
        bool new_eos = false;
765
3.50k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.50k
        if (new_eos) {
767
1.15k
            *eos = true;
768
2.34k
        } else if (!need_more_input_data(state)) {
769
1.76k
            *eos = false;
770
1.76k
        }
771
3.50k
    }
772
3.49k
    return Status::OK();
773
3.49k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.83k
                                                         bool* eos) {
745
1.83k
    auto& local_state = get_local_state(state);
746
1.83k
    if (need_more_input_data(state)) {
747
1.83k
        local_state._child_block->clear_column_data(
748
1.83k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.83k
                        .num_materialized_slots());
750
1.83k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.83k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.83k
        *eos = local_state._child_eos;
753
1.83k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
758
            return Status::OK();
755
758
        }
756
1.07k
        {
757
1.07k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.07k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.07k
        }
760
1.07k
    }
761
762
1.07k
    if (!need_more_input_data(state)) {
763
1.07k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.07k
        bool new_eos = false;
765
1.07k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.07k
        if (new_eos) {
767
781
            *eos = true;
768
781
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.07k
    }
772
1.07k
    return Status::OK();
773
1.07k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
11.9k
                                                         bool* eos) {
745
11.9k
    auto& local_state = get_local_state(state);
746
11.9k
    if (need_more_input_data(state)) {
747
11.8k
        local_state._child_block->clear_column_data(
748
11.8k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
11.8k
                        .num_materialized_slots());
750
11.8k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
11.8k
                state, local_state._child_block.get(), &local_state._child_eos));
752
11.8k
        *eos = local_state._child_eos;
753
11.8k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
2.36k
            return Status::OK();
755
2.36k
        }
756
9.53k
        {
757
9.53k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.53k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.53k
        }
760
9.53k
    }
761
762
9.54k
    if (!need_more_input_data(state)) {
763
4.36k
        SCOPED_TIMER(local_state.exec_time_counter());
764
4.36k
        bool new_eos = false;
765
4.36k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
4.36k
        if (new_eos) {
767
4.32k
            *eos = true;
768
4.32k
        } else if (!need_more_input_data(state)) {
769
10
            *eos = false;
770
10
        }
771
4.36k
    }
772
9.54k
    return Status::OK();
773
9.54k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
420k
                                                         bool* eos) {
745
420k
    auto& local_state = get_local_state(state);
746
421k
    if (need_more_input_data(state)) {
747
421k
        local_state._child_block->clear_column_data(
748
421k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
421k
                        .num_materialized_slots());
750
421k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
421k
                state, local_state._child_block.get(), &local_state._child_eos));
752
421k
        *eos = local_state._child_eos;
753
421k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
15.3k
            return Status::OK();
755
15.3k
        }
756
405k
        {
757
405k
            SCOPED_TIMER(local_state.exec_time_counter());
758
405k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
405k
        }
760
405k
    }
761
762
404k
    if (!need_more_input_data(state)) {
763
382k
        SCOPED_TIMER(local_state.exec_time_counter());
764
382k
        bool new_eos = false;
765
382k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
382k
        if (new_eos) {
767
381k
            *eos = true;
768
381k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
382k
    }
772
404k
    return Status::OK();
773
404k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.3k
                                                         bool* eos) {
745
22.3k
    auto& local_state = get_local_state(state);
746
22.3k
    if (need_more_input_data(state)) {
747
12.0k
        local_state._child_block->clear_column_data(
748
12.0k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
12.0k
                        .num_materialized_slots());
750
12.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
12.0k
                state, local_state._child_block.get(), &local_state._child_eos));
752
12.0k
        *eos = local_state._child_eos;
753
12.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
894
            return Status::OK();
755
894
        }
756
11.1k
        {
757
11.1k
            SCOPED_TIMER(local_state.exec_time_counter());
758
11.1k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
11.1k
        }
760
11.1k
    }
761
762
21.4k
    if (!need_more_input_data(state)) {
763
20.8k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.8k
        bool new_eos = false;
765
20.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.8k
        if (new_eos) {
767
6.03k
            *eos = true;
768
14.8k
        } else if (!need_more_input_data(state)) {
769
10.3k
            *eos = false;
770
10.3k
        }
771
20.8k
    }
772
21.4k
    return Status::OK();
773
21.4k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
6.53k
                                                         bool* eos) {
745
6.53k
    auto& local_state = get_local_state(state);
746
6.53k
    if (need_more_input_data(state)) {
747
6.17k
        local_state._child_block->clear_column_data(
748
6.17k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.17k
                        .num_materialized_slots());
750
6.17k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.17k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.17k
        *eos = local_state._child_eos;
753
6.17k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
937
            return Status::OK();
755
937
        }
756
5.23k
        {
757
5.23k
            SCOPED_TIMER(local_state.exec_time_counter());
758
5.23k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
5.23k
        }
760
5.23k
    }
761
762
5.59k
    if (!need_more_input_data(state)) {
763
5.59k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.59k
        bool new_eos = false;
765
5.59k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.59k
        if (new_eos) {
767
3.53k
            *eos = true;
768
3.53k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
5.59k
    }
772
5.59k
    return Status::OK();
773
5.59k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
41.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
41.8k
    RETURN_IF_ERROR(Base::init(state, info));
779
41.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
41.8k
                                                         "AsyncWriterDependency", true);
781
41.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
41.8k
                             _finish_dependency));
783
784
41.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
41.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
41.8k
    return Status::OK();
787
41.8k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
379
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
379
    RETURN_IF_ERROR(Base::init(state, info));
779
379
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
379
                                                         "AsyncWriterDependency", true);
781
379
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
379
                             _finish_dependency));
783
784
379
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
379
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
379
    return Status::OK();
787
379
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
41.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
41.4k
    RETURN_IF_ERROR(Base::init(state, info));
779
41.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
41.4k
                                                         "AsyncWriterDependency", true);
781
41.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
41.4k
                             _finish_dependency));
783
784
41.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
41.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
41.4k
    return Status::OK();
787
41.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
4
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
4
    RETURN_IF_ERROR(Base::init(state, info));
779
4
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
4
                                                         "AsyncWriterDependency", true);
781
4
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
4
                             _finish_dependency));
783
784
4
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
4
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
4
    return Status::OK();
787
4
}
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
42.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
42.6k
    RETURN_IF_ERROR(Base::open(state));
793
42.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
330k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
288k
        RETURN_IF_ERROR(
796
288k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
288k
    }
798
42.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
42.6k
    return Status::OK();
800
42.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
379
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
379
    RETURN_IF_ERROR(Base::open(state));
793
379
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.91k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.53k
        RETURN_IF_ERROR(
796
1.53k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.53k
    }
798
379
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
379
    return Status::OK();
800
379
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
42.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
42.2k
    RETURN_IF_ERROR(Base::open(state));
793
42.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
328k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
286k
        RETURN_IF_ERROR(
796
286k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
286k
    }
798
42.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
42.2k
    return Status::OK();
800
42.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
4
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
4
    RETURN_IF_ERROR(Base::open(state));
793
4
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
72
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
68
        RETURN_IF_ERROR(
796
68
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
68
    }
798
4
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
4
    return Status::OK();
800
4
}
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
57.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
57.2k
    return _writer->sink(block, eos);
806
57.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.69k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.69k
    return _writer->sink(block, eos);
806
1.69k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
55.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
55.5k
    return _writer->sink(block, eos);
806
55.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
4
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
4
    return _writer->sink(block, eos);
806
4
}
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
42.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
42.6k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
42.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
42.6k
    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
42.6k
    if (_writer) {
818
42.6k
        Status st = _writer->get_writer_status();
819
42.6k
        if (exec_status.ok()) {
820
42.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
42.6k
                                                       : Status::Cancelled("force close"));
822
42.6k
        } else {
823
62
            _writer->force_close(exec_status);
824
62
        }
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
42.6k
        RETURN_IF_ERROR(st);
829
42.6k
    }
830
42.6k
    return Base::close(state, exec_status);
831
42.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
367
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
367
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
367
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
367
    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
367
    if (_writer) {
818
367
        Status st = _writer->get_writer_status();
819
367
        if (exec_status.ok()) {
820
367
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
367
                                                       : Status::Cancelled("force close"));
822
367
        } 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
367
        RETURN_IF_ERROR(st);
829
367
    }
830
367
    return Base::close(state, exec_status);
831
367
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
42.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
42.2k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
42.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
42.2k
    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
42.3k
    if (_writer) {
818
42.3k
        Status st = _writer->get_writer_status();
819
42.3k
        if (exec_status.ok()) {
820
42.2k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
42.2k
                                                       : Status::Cancelled("force close"));
822
42.2k
        } else {
823
62
            _writer->force_close(exec_status);
824
62
        }
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
42.3k
        RETURN_IF_ERROR(st);
829
42.3k
    }
830
42.2k
    return Base::close(state, exec_status);
831
42.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
4
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
4
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
4
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
4
    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
4
    if (_writer) {
818
4
        Status st = _writer->get_writer_status();
819
4
        if (exec_status.ok()) {
820
4
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
4
                                                       : Status::Cancelled("force close"));
822
4
        } 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
4
        RETURN_IF_ERROR(st);
829
4
    }
830
4
    return Base::close(state, exec_status);
831
4
}
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