Coverage Report

Created: 2026-06-10 12:03

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