Coverage Report

Created: 2026-10-22 00:25

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