Coverage Report

Created: 2026-06-25 06:13

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