Coverage Report

Created: 2026-10-29 06:59

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
1.79M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
1.79M
    if (_parent->nereids_id() == -1) {
123
933k
        return fmt::format("(id={})", _parent->node_id());
124
933k
    } else {
125
860k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
860k
    }
127
1.79M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
73.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
73.1k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
73.1k
    } else {
125
73.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
73.1k
    }
127
73.1k
}
_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
237k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
237k
    if (_parent->nereids_id() == -1) {
123
12
        return fmt::format("(id={})", _parent->node_id());
124
237k
    } else {
125
237k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
237k
    }
127
237k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
156
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
156
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
156
    } else {
125
156
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
156
    }
127
156
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.95k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.95k
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
5.95k
    } else {
125
5.95k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.95k
    }
127
5.95k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
9.57k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
9.57k
    if (_parent->nereids_id() == -1) {
123
59
        return fmt::format("(id={})", _parent->node_id());
124
9.51k
    } else {
125
9.51k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
9.51k
    }
127
9.57k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
105k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
105k
    if (_parent->nereids_id() == -1) {
123
29
        return fmt::format("(id={})", _parent->node_id());
124
104k
    } else {
125
104k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
104k
    }
127
105k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
83.2k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
83.2k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
83.1k
    } else {
125
83.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
83.1k
    }
127
83.2k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
120
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
120
    if (_parent->nereids_id() == -1) {
123
0
        return fmt::format("(id={})", _parent->node_id());
124
120
    } else {
125
120
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
120
    }
127
120
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
555k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
555k
    if (_parent->nereids_id() == -1) {
123
270k
        return fmt::format("(id={})", _parent->node_id());
124
284k
    } else {
125
284k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
284k
    }
127
555k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
56.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
56.1k
    if (_parent->nereids_id() == -1) {
123
2
        return fmt::format("(id={})", _parent->node_id());
124
56.1k
    } else {
125
56.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
56.1k
    }
127
56.1k
}
_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
5.02k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.03k
    if (_parent->nereids_id() == -1) {
123
5.03k
        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
5.02k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
446
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
446
    if (_parent->nereids_id() == -1) {
123
102
        return fmt::format("(id={})", _parent->node_id());
124
344
    } else {
125
344
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
344
    }
127
446
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
5.12k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
5.12k
    if (_parent->nereids_id() == -1) {
123
13
        return fmt::format("(id={})", _parent->node_id());
124
5.11k
    } else {
125
5.11k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
126
5.11k
    }
127
5.12k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
121
656k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
122
656k
    if (_parent->nereids_id() == -1) {
123
656k
        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
656k
}
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.26M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
1.26M
    if (_parent->nereids_id() == -1) {
132
690k
        return fmt::format("(id={})", _parent->node_id());
133
690k
    } else {
134
576k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
576k
    }
136
1.26M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
121k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
121k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
121k
    } else {
134
121k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
121k
    }
136
121k
}
_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
240k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
240k
    if (_parent->nereids_id() == -1) {
132
9
        return fmt::format("(id={})", _parent->node_id());
133
240k
    } else {
134
240k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
240k
    }
136
240k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
163
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
163
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
163
    } else {
134
163
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
163
    }
136
163
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
5.97k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
5.97k
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
5.97k
    } else {
134
5.97k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
5.97k
    }
136
5.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.61k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.61k
    if (_parent->nereids_id() == -1) {
132
59
        return fmt::format("(id={})", _parent->node_id());
133
9.56k
    } else {
134
9.56k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.56k
    }
136
9.61k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
106k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
106k
    if (_parent->nereids_id() == -1) {
132
29
        return fmt::format("(id={})", _parent->node_id());
133
106k
    } else {
134
106k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
106k
    }
136
106k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
82.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
82.9k
    if (_parent->nereids_id() == -1) {
132
4
        return fmt::format("(id={})", _parent->node_id());
133
82.9k
    } else {
134
82.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
82.9k
    }
136
82.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
130
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
130
    if (_parent->nereids_id() == -1) {
132
0
        return fmt::format("(id={})", _parent->node_id());
133
130
    } else {
134
130
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
130
    }
136
130
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
28
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
28
    if (_parent->nereids_id() == -1) {
132
28
        return fmt::format("(id={})", _parent->node_id());
133
28
    } else {
134
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
0
    }
136
28
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
9.81k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
9.81k
    if (_parent->nereids_id() == -1) {
132
3
        return fmt::format("(id={})", _parent->node_id());
133
9.81k
    } else {
134
9.81k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
9.81k
    }
136
9.81k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
446
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
446
    if (_parent->nereids_id() == -1) {
132
102
        return fmt::format("(id={})", _parent->node_id());
133
344
    } else {
134
344
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
135
344
    }
136
446
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
12.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
12.7k
    if (_parent->nereids_id() == -1) {
132
12.7k
        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
12.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
251k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
251k
    if (_parent->nereids_id() == -1) {
132
251k
        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
251k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
130
425k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
131
425k
    if (_parent->nereids_id() == -1) {
132
425k
        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
425k
}
_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
30.3k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
30.3k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
30.3k
    _terminated = true;
144
30.3k
    return Status::OK();
145
30.3k
}
_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
1.76k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.76k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.76k
    _terminated = true;
144
1.76k
    return Status::OK();
145
1.76k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.62k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.62k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.62k
    _terminated = true;
144
1.62k
    return Status::OK();
145
1.62k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
1.19k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
1.19k
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
1.19k
    _terminated = true;
144
1.19k
    return Status::OK();
145
1.19k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
538
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
538
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
538
    _terminated = true;
144
538
    return Status::OK();
145
538
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
497
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
497
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
497
    _terminated = true;
144
497
    return Status::OK();
145
497
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
3
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
3
    _terminated = true;
144
3
    return Status::OK();
145
3
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
93
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
93
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
93
    _terminated = true;
144
93
    return Status::OK();
145
93
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
2
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
2
    _terminated = true;
144
2
    return Status::OK();
145
2
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
438
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
438
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
438
    _terminated = true;
144
438
    return Status::OK();
145
438
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
139
132
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
140
132
    if (_terminated) {
141
0
        return Status::OK();
142
0
    }
143
132
    _terminated = true;
144
132
    return Status::OK();
145
132
}
146
147
317k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
148
317k
    return _child && _child->is_serial_operator() && !is_source()
149
317k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
150
317k
                   : DataDistribution(TLocalPartitionType::NOOP);
151
317k
}
152
153
23.1k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
154
23.1k
    if (!_child) {
155
22.4k
        return false;
156
22.4k
    }
157
728
    if (_child->is_serial_operator()) {
158
36
        return true;
159
36
    }
160
692
    const auto child_distribution = _child->required_data_distribution(state);
161
692
    return child_distribution.need_local_exchange() &&
162
692
           !is_shuffled_exchange(child_distribution.distribution_type);
163
728
}
164
165
template <typename SharedStateArg>
166
13.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.7k
    fmt::memory_buffer debug_string_buffer;
168
13.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.7k
    return fmt::to_string(debug_string_buffer);
170
13.7k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_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
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_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_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_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
166
13.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
167
13.7k
    fmt::memory_buffer debug_string_buffer;
168
13.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
169
13.7k
    return fmt::to_string(debug_string_buffer);
170
13.7k
}
_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
13.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.7k
    fmt::memory_buffer debug_string_buffer;
175
13.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.7k
    return fmt::to_string(debug_string_buffer);
177
13.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
1
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
1
    fmt::memory_buffer debug_string_buffer;
175
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
1
    return fmt::to_string(debug_string_buffer);
177
1
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
1
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
1
    fmt::memory_buffer debug_string_buffer;
175
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
1
    return fmt::to_string(debug_string_buffer);
177
1
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
173
2
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
2
    fmt::memory_buffer debug_string_buffer;
175
2
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
2
    return fmt::to_string(debug_string_buffer);
177
2
}
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
13.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
174
13.7k
    fmt::memory_buffer debug_string_buffer;
175
13.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
176
13.7k
    return fmt::to_string(debug_string_buffer);
177
13.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
178
179
13.7k
std::string OperatorXBase::debug_string(int indentation_level) const {
180
13.7k
    fmt::memory_buffer debug_string_buffer;
181
13.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
182
13.7k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
183
13.7k
                   _is_serial_operator);
184
13.7k
    return fmt::to_string(debug_string_buffer);
185
13.7k
}
186
187
13.7k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
188
13.7k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
189
13.7k
}
190
191
705k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
192
705k
    std::string node_name = print_plan_node_type(tnode.node_type);
193
705k
    _nereids_id = tnode.nereids_id;
194
705k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
195
6.80k
        if (!has_projection()) {
196
0
            return Status::InternalError("no final output tuple id");
197
0
        }
198
6.80k
        if (tnode.intermediate_output_tuple_id_list.size() !=
199
6.80k
            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.80k
    }
207
705k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
208
705k
    _op_name = substr + "_OPERATOR";
209
210
705k
    if (tnode.__isset.vconjunct) {
211
0
        return Status::InternalError("vconjunct is not supported yet");
212
705k
    } else if (tnode.__isset.conjuncts) {
213
284k
        for (const auto& conjunct : tnode.conjuncts) {
214
284k
            VExprContextSPtr context;
215
284k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
216
284k
            _conjuncts.emplace_back(context);
217
284k
        }
218
106k
    }
219
220
    // create the projections expr
221
705k
    if (tnode.__isset.projections) {
222
276k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
223
276k
    }
224
705k
    if (!tnode.intermediate_projections_list.empty()) {
225
6.80k
        DCHECK(has_projection()) << "no final projections";
226
6.80k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
227
12.2k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
228
12.2k
            VExprContextSPtrs projections;
229
12.2k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
230
12.2k
            _projection->intermediate_projections.push_back(projections);
231
12.2k
        }
232
6.80k
    }
233
705k
    return Status::OK();
234
705k
}
235
236
731k
Status OperatorXBase::prepare(RuntimeState* state) {
237
731k
    for (auto& conjunct : _conjuncts) {
238
284k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
239
284k
    }
240
731k
    if (state->enable_adjust_conjunct_order_by_cost()) {
241
681k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
242
347k
            return a->execute_cost() < b->execute_cost();
243
347k
        });
244
681k
    };
245
246
731k
    if (has_projection()) {
247
276k
        auto& projection = *_projection;
248
288k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
249
12.2k
            const auto& input_row_desc =
250
12.2k
                    i == 0 ? operator_row_desc_before_projection()
251
12.2k
                           : projection.intermediate_output_row_descriptors[i - 1];
252
12.2k
            RETURN_IF_ERROR(
253
12.2k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
254
12.2k
        }
255
276k
        const auto& final_projection_input_row_desc =
256
276k
                projection.intermediate_output_row_descriptors.empty()
257
276k
                        ? operator_row_desc_before_projection()
258
276k
                        : projection.intermediate_output_row_descriptors.back();
259
276k
        RETURN_IF_ERROR(
260
276k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
261
276k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
262
276k
                                                      projection.output_row_descriptor));
263
276k
    }
264
265
731k
    for (auto& conjunct : _conjuncts) {
266
284k
        RETURN_IF_ERROR(conjunct->open(state));
267
284k
    }
268
731k
    if (has_projection()) {
269
276k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
270
276k
        for (auto& projections : _projection->intermediate_projections) {
271
12.2k
            RETURN_IF_ERROR(VExpr::open(projections, state));
272
12.2k
        }
273
276k
    }
274
731k
    if (_child && !is_source()) {
275
96.4k
        RETURN_IF_ERROR(_child->prepare(state));
276
96.4k
    }
277
278
731k
    if (VExpr::contains_blockable_function(_conjuncts) ||
279
731k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
280
0
        _blockable = true;
281
0
    }
282
283
731k
    return Status::OK();
284
731k
}
285
286
6.87k
Status OperatorXBase::terminate(RuntimeState* state) {
287
6.87k
    if (_child && !is_source()) {
288
530
        RETURN_IF_ERROR(_child->terminate(state));
289
530
    }
290
6.87k
    auto result = state->get_local_state_result(operator_id());
291
6.87k
    if (!result) {
292
0
        return result.error();
293
0
    }
294
6.87k
    return result.value()->terminate(state);
295
6.87k
}
296
297
4.79M
Status OperatorXBase::close(RuntimeState* state) {
298
4.79M
    if (_child && !is_source()) {
299
704k
        RETURN_IF_ERROR(_child->close(state));
300
704k
    }
301
4.79M
    auto result = state->get_local_state_result(operator_id());
302
4.79M
    if (!result) {
303
0
        return result.error();
304
0
    }
305
4.79M
    return result.value()->close(state);
306
4.79M
}
307
308
306k
void PipelineXLocalStateBase::clear_origin_block() {
309
306k
    _origin_block.clear_column_data(_parent->operator_row_desc_before_projection().num_slots());
310
306k
}
311
312
849k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
849k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
849k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
849k
    return Status::OK();
317
849k
}
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
305k
                                     Block* output_block) const {
326
305k
    auto* local_state = state->get_local_state(operator_id());
327
305k
    SCOPED_TIMER(local_state->exec_time_counter());
328
305k
    SCOPED_TIMER(local_state->_projection_timer);
329
305k
    const size_t rows = origin_block->rows();
330
305k
    if (rows == 0) {
331
158k
        return Status::OK();
332
158k
    }
333
147k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
147k
    {
336
147k
        Block input_block = *origin_block;
337
338
147k
        ColumnsWithTypeAndName new_columns;
339
147k
        for (const auto& projections : local_state->_intermediate_projections) {
340
5.43k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
5.43k
            new_columns.resize(projections.size());
345
124k
            for (int i = 0; i < projections.size(); i++) {
346
119k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
119k
                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
119k
            }
355
5.42k
            Block tmp_block {new_columns};
356
5.42k
            input_block.swap(tmp_block);
357
5.42k
        }
358
359
147k
        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
147k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
147k
                output_block, _projection->output_row_descriptor);
368
147k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
147k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
147k
        Columns shared_columns(mutable_columns.size());
371
372
833k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
685k
            ColumnPtr column_ptr;
374
685k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
685k
            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
685k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
685k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
685k
            if (column_ptr->is_exclusive()) {
386
239k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
445k
            } else {
388
445k
                shared_columns[i] = std::move(column_ptr);
389
445k
            }
390
685k
        }
391
392
147k
        scoped_mutable_block.restore();
393
833k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
685k
            if (shared_columns[i]) {
395
446k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
446k
            }
397
685k
        }
398
147k
    }
399
400
0
    origin_block->clear_column_data(
401
147k
            local_state->_parent->operator_row_desc_before_projection().num_slots());
402
147k
    DCHECK_EQ(output_block->rows(), rows);
403
404
147k
    return Status::OK();
405
147k
}
406
407
4.25M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.25M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.25M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.25M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.25M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.25M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.25M
            if (_debug_point_count++ % 2 == 0) {
414
4.25M
                return Status::OK();
415
4.25M
            }
416
4.25M
        }
417
4.25M
    });
418
419
4.25M
    Status status;
420
4.25M
    auto* local_state = state->get_local_state(operator_id());
421
4.25M
    Defer defer([&]() {
422
4.25M
        if (status.ok()) {
423
4.25M
            local_state->update_output_block_counters(*block);
424
4.25M
        }
425
4.25M
    });
426
4.25M
    if (has_projection()) {
427
306k
        local_state->clear_origin_block();
428
306k
        status = get_block(state, &local_state->_origin_block, eos);
429
306k
        if (UNLIKELY(!status.ok())) {
430
45
            return status;
431
45
        }
432
305k
        status = do_projections(state, &local_state->_origin_block, block);
433
305k
        return status;
434
306k
    }
435
3.94M
    status = get_block(state, block, eos);
436
3.94M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.94M
    return status;
438
3.94M
}
439
440
2.91M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.91M
    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.91M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.91M
        auto op_name = to_lower(_parent->_op_name);
448
2.91M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.91M
        arg_op_name = to_lower(arg_op_name);
450
451
2.91M
        if (op_name == arg_op_name) {
452
2.91M
            *eos = true;
453
2.91M
        }
454
2.91M
    });
455
456
2.91M
    if (auto rows = block->rows()) {
457
825k
        _num_rows_returned += rows;
458
825k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
825k
    }
460
2.91M
}
461
462
30.3k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
30.3k
    auto result = state->get_sink_local_state_result();
464
30.3k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
30.3k
    return result.value()->terminate(state);
468
30.3k
}
469
470
13.7k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
13.7k
    fmt::memory_buffer debug_string_buffer;
472
473
13.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
13.7k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
13.7k
    return fmt::to_string(debug_string_buffer);
476
13.7k
}
477
478
13.7k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
13.7k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
13.7k
}
481
482
364k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
364k
    std::string op_name = "UNKNOWN_SINK";
484
364k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
365k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
365k
        op_name = it->second;
488
365k
    }
489
364k
    _name = op_name + "_OPERATOR";
490
364k
    return Status::OK();
491
364k
}
492
493
317k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
317k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
317k
    _nereids_id = tnode.nereids_id;
496
317k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
317k
    _name = substr + "_SINK_OPERATOR";
498
317k
    return Status::OK();
499
317k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.79M
                                                            LocalSinkStateInfo& info) {
504
1.79M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.79M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.79M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.79M
    return Status::OK();
508
1.79M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
121k
                                                            LocalSinkStateInfo& info) {
504
121k
    auto local_state = LocalStateType::create_unique(this, state);
505
121k
    RETURN_IF_ERROR(local_state->init(state, info));
506
121k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
121k
    return Status::OK();
508
121k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
373k
                                                            LocalSinkStateInfo& info) {
504
373k
    auto local_state = LocalStateType::create_unique(this, state);
505
373k
    RETURN_IF_ERROR(local_state->init(state, info));
506
373k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
373k
    return Status::OK();
508
373k
}
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
368
                                                            LocalSinkStateInfo& info) {
504
368
    auto local_state = LocalStateType::create_unique(this, state);
505
368
    RETURN_IF_ERROR(local_state->init(state, info));
506
368
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
368
    return Status::OK();
508
368
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
51.0k
                                                            LocalSinkStateInfo& info) {
504
51.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
51.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
51.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
51.0k
    return Status::OK();
508
51.0k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_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
}
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
9.52k
                                                            LocalSinkStateInfo& info) {
504
9.52k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.52k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.52k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.52k
    return Status::OK();
508
9.52k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9
                                                            LocalSinkStateInfo& info) {
504
9
    auto local_state = LocalStateType::create_unique(this, state);
505
9
    RETURN_IF_ERROR(local_state->init(state, info));
506
9
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9
    return Status::OK();
508
9
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
240k
                                                            LocalSinkStateInfo& info) {
504
240k
    auto local_state = LocalStateType::create_unique(this, state);
505
240k
    RETURN_IF_ERROR(local_state->init(state, info));
506
240k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
240k
    return Status::OK();
508
240k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
163
                                                            LocalSinkStateInfo& info) {
504
163
    auto local_state = LocalStateType::create_unique(this, state);
505
163
    RETURN_IF_ERROR(local_state->init(state, info));
506
163
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
163
    return Status::OK();
508
163
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
251k
                                                            LocalSinkStateInfo& info) {
504
251k
    auto local_state = LocalStateType::create_unique(this, state);
505
251k
    RETURN_IF_ERROR(local_state->init(state, info));
506
251k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
251k
    return Status::OK();
508
251k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106k
                                                            LocalSinkStateInfo& info) {
504
106k
    auto local_state = LocalStateType::create_unique(this, state);
505
106k
    RETURN_IF_ERROR(local_state->init(state, info));
506
106k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106k
    return Status::OK();
508
106k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
82.9k
                                                            LocalSinkStateInfo& info) {
504
82.9k
    auto local_state = LocalStateType::create_unique(this, state);
505
82.9k
    RETURN_IF_ERROR(local_state->init(state, info));
506
82.9k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
82.9k
    return Status::OK();
508
82.9k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
130
                                                            LocalSinkStateInfo& info) {
504
130
    auto local_state = LocalStateType::create_unique(this, state);
505
130
    RETURN_IF_ERROR(local_state->init(state, info));
506
130
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
130
    return Status::OK();
508
130
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
521k
                                                            LocalSinkStateInfo& info) {
504
521k
    auto local_state = LocalStateType::create_unique(this, state);
505
521k
    RETURN_IF_ERROR(local_state->init(state, info));
506
521k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
521k
    return Status::OK();
508
521k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.97k
                                                            LocalSinkStateInfo& info) {
504
5.97k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.97k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.97k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.97k
    return Status::OK();
508
5.97k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
9.80k
                                                            LocalSinkStateInfo& info) {
504
9.80k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.80k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.80k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.80k
    return Status::OK();
508
9.80k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.08k
                                                            LocalSinkStateInfo& info) {
504
2.08k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.08k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.08k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.08k
    return Status::OK();
508
2.08k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
344
                                                            LocalSinkStateInfo& info) {
504
344
    auto local_state = LocalStateType::create_unique(this, state);
505
344
    RETURN_IF_ERROR(local_state->init(state, info));
506
344
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
344
    return Status::OK();
508
344
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.84k
                                                            LocalSinkStateInfo& info) {
504
4.84k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.84k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.84k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.84k
    return Status::OK();
508
4.84k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.63k
                                                            LocalSinkStateInfo& info) {
504
2.63k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.63k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.63k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.63k
    return Status::OK();
508
2.63k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.66k
                                                            LocalSinkStateInfo& info) {
504
2.66k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.66k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.66k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.66k
    return Status::OK();
508
2.66k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.53k
                                                            LocalSinkStateInfo& info) {
504
2.53k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.53k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.53k
    return Status::OK();
508
2.53k
}
_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
563
                                                            LocalSinkStateInfo& info) {
504
563
    auto local_state = LocalStateType::create_unique(this, state);
505
563
    RETURN_IF_ERROR(local_state->init(state, info));
506
563
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
563
    return Status::OK();
508
563
}
_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
104
                                                            LocalSinkStateInfo& info) {
504
104
    auto local_state = LocalStateType::create_unique(this, state);
505
104
    RETURN_IF_ERROR(local_state->init(state, info));
506
104
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
104
    return Status::OK();
508
104
}
_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.42M
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.42M
    } else {
519
1.42M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.42M
        ss->id = operator_id();
521
1.42M
        for (auto& dest : dests_id()) {
522
1.41M
            ss->related_op_ids.insert(dest);
523
1.41M
        }
524
1.42M
        return ss;
525
1.42M
    }
526
1.42M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
102k
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
102k
    } else {
519
102k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
102k
        ss->id = operator_id();
521
102k
        for (auto& dest : dests_id()) {
522
101k
            ss->related_op_ids.insert(dest);
523
101k
        }
524
102k
        return ss;
525
102k
    }
526
102k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
374k
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
374k
    } else {
519
374k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
374k
        ss->id = operator_id();
521
374k
        for (auto& dest : dests_id()) {
522
372k
            ss->related_op_ids.insert(dest);
523
372k
        }
524
374k
        return ss;
525
374k
    }
526
374k
}
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
368
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
368
    } else {
519
368
        auto ss = LocalStateType::SharedStateType::create_shared();
520
368
        ss->id = operator_id();
521
368
        for (auto& dest : dests_id()) {
522
368
            ss->related_op_ids.insert(dest);
523
368
        }
524
368
        return ss;
525
368
    }
526
368
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
51.1k
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
51.1k
    } else {
519
51.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
51.1k
        ss->id = operator_id();
521
51.1k
        for (auto& dest : dests_id()) {
522
50.8k
            ss->related_op_ids.insert(dest);
523
50.8k
        }
524
51.1k
        return ss;
525
51.1k
    }
526
51.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_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
}
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
}
_ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
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
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25PaimonTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
8
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
    } else {
519
8
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8
        ss->id = operator_id();
521
8
        for (auto& dest : dests_id()) {
522
8
            ss->related_op_ids.insert(dest);
523
8
        }
524
8
        return ss;
525
8
    }
526
8
}
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
9.66k
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
9.66k
    } else {
519
9.66k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.66k
        ss->id = operator_id();
521
9.66k
        for (auto& dest : dests_id()) {
522
9.64k
            ss->related_op_ids.insert(dest);
523
9.64k
        }
524
9.66k
        return ss;
525
9.66k
    }
526
9.66k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
9
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
9
    } else {
519
9
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9
        ss->id = operator_id();
521
9
        for (auto& dest : dests_id()) {
522
9
            ss->related_op_ids.insert(dest);
523
9
        }
524
9
        return ss;
525
9
    }
526
9
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
242k
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
242k
    } else {
519
242k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
242k
        ss->id = operator_id();
521
242k
        for (auto& dest : dests_id()) {
522
242k
            ss->related_op_ids.insert(dest);
523
242k
        }
524
242k
        return ss;
525
242k
    }
526
242k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
165
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
165
    } else {
519
165
        auto ss = LocalStateType::SharedStateType::create_shared();
520
165
        ss->id = operator_id();
521
165
        for (auto& dest : dests_id()) {
522
165
            ss->related_op_ids.insert(dest);
523
165
        }
524
165
        return ss;
525
165
    }
526
165
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106k
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
106k
    } else {
519
106k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106k
        ss->id = operator_id();
521
106k
        for (auto& dest : dests_id()) {
522
106k
            ss->related_op_ids.insert(dest);
523
106k
        }
524
106k
        return ss;
525
106k
    }
526
106k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
129
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
129
    } else {
519
129
        auto ss = LocalStateType::SharedStateType::create_shared();
520
129
        ss->id = operator_id();
521
129
        for (auto& dest : dests_id()) {
522
129
            ss->related_op_ids.insert(dest);
523
129
        }
524
129
        return ss;
525
129
    }
526
129
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
522k
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
522k
    } else {
519
522k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
522k
        ss->id = operator_id();
521
522k
        for (auto& dest : dests_id()) {
522
517k
            ss->related_op_ids.insert(dest);
523
517k
        }
524
522k
        return ss;
525
522k
    }
526
522k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.99k
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
5.99k
    } else {
519
5.99k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.99k
        ss->id = operator_id();
521
5.99k
        for (auto& dest : dests_id()) {
522
5.99k
            ss->related_op_ids.insert(dest);
523
5.99k
        }
524
5.99k
        return ss;
525
5.99k
    }
526
5.99k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
446
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
446
    } else {
519
446
        auto ss = LocalStateType::SharedStateType::create_shared();
520
446
        ss->id = operator_id();
521
446
        for (auto& dest : dests_id()) {
522
445
            ss->related_op_ids.insert(dest);
523
445
        }
524
446
        return ss;
525
446
    }
526
446
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.66k
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.66k
    } else {
519
2.66k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.66k
        ss->id = operator_id();
521
2.66k
        for (auto& dest : dests_id()) {
522
2.66k
            ss->related_op_ids.insert(dest);
523
2.66k
        }
524
2.66k
        return ss;
525
2.66k
    }
526
2.66k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.56k
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.56k
    } else {
519
2.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.56k
        ss->id = operator_id();
521
2.57k
        for (auto& dest : dests_id()) {
522
2.57k
            ss->related_op_ids.insert(dest);
523
2.57k
        }
524
2.56k
        return ss;
525
2.56k
    }
526
2.56k
}
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
561
            ss->related_op_ids.insert(dest);
523
561
        }
524
565
        return ss;
525
565
    }
526
565
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
104
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
104
    } else {
519
104
        auto ss = LocalStateType::SharedStateType::create_shared();
520
104
        ss->id = operator_id();
521
104
        for (auto& dest : dests_id()) {
522
104
            ss->related_op_ids.insert(dest);
523
104
        }
524
104
        return ss;
525
104
    }
526
104
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.06M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.06M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.06M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.06M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.06M
    return Status::OK();
534
2.06M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
73.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
73.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
73.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
73.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
73.3k
    return Status::OK();
534
73.3k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
258k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
258k
    auto local_state = LocalStateType::create_unique(state, this);
531
258k
    RETURN_IF_ERROR(local_state->init(state, info));
532
258k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
258k
    return Status::OK();
534
258k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
119
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
119
    auto local_state = LocalStateType::create_unique(state, this);
531
119
    RETURN_IF_ERROR(local_state->init(state, info));
532
119
    state->emplace_local_state(operator_id(), std::move(local_state));
533
119
    return Status::OK();
534
119
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.26k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.26k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.26k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.26k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.26k
    return Status::OK();
534
3.26k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.54k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.54k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.54k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.54k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.54k
    return Status::OK();
534
9.54k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.83k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.83k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.83k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.83k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.83k
    return Status::OK();
534
8.83k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
156
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
156
    auto local_state = LocalStateType::create_unique(state, this);
531
156
    RETURN_IF_ERROR(local_state->init(state, info));
532
156
    state->emplace_local_state(operator_id(), std::move(local_state));
533
156
    return Status::OK();
534
156
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
230k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
230k
    auto local_state = LocalStateType::create_unique(state, this);
531
230k
    RETURN_IF_ERROR(local_state->init(state, info));
532
230k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
230k
    return Status::OK();
534
230k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
105k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
105k
    auto local_state = LocalStateType::create_unique(state, this);
531
105k
    RETURN_IF_ERROR(local_state->init(state, info));
532
105k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
105k
    return Status::OK();
534
105k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
83.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
83.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
83.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
83.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
83.2k
    return Status::OK();
534
83.2k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
120
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
120
    auto local_state = LocalStateType::create_unique(state, this);
531
120
    RETURN_IF_ERROR(local_state->init(state, info));
532
120
    state->emplace_local_state(operator_id(), std::move(local_state));
533
120
    return Status::OK();
534
120
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.95k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.95k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.95k
    return Status::OK();
534
6.95k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
271k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
271k
    auto local_state = LocalStateType::create_unique(state, this);
531
271k
    RETURN_IF_ERROR(local_state->init(state, info));
532
271k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
271k
    return Status::OK();
534
271k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.35k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.35k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.35k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.35k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.35k
    return Status::OK();
534
1.35k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.97k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.97k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.97k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.97k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.97k
    return Status::OK();
534
5.97k
}
_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
56.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
56.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
56.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
56.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
56.1k
    return Status::OK();
534
56.1k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.04k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.04k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.04k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.04k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.04k
    return Status::OK();
534
5.04k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
345
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
345
    auto local_state = LocalStateType::create_unique(state, this);
531
345
    RETURN_IF_ERROR(local_state->init(state, info));
532
345
    state->emplace_local_state(operator_id(), std::move(local_state));
533
345
    return Status::OK();
534
345
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.64k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.64k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.64k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.64k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.64k
    return Status::OK();
534
2.64k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.53k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.53k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.53k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.53k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.53k
    return Status::OK();
534
2.53k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
606
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
606
    auto local_state = LocalStateType::create_unique(state, this);
531
606
    RETURN_IF_ERROR(local_state->init(state, info));
532
606
    state->emplace_local_state(operator_id(), std::move(local_state));
533
606
    return Status::OK();
534
606
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.72k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.72k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.72k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.72k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.72k
    return Status::OK();
534
1.72k
}
_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
662k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
662k
    auto local_state = LocalStateType::create_unique(state, this);
531
662k
    RETURN_IF_ERROR(local_state->init(state, info));
532
662k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
662k
    return Status::OK();
534
662k
}
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
806
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
806
    auto local_state = LocalStateType::create_unique(state, this);
531
806
    RETURN_IF_ERROR(local_state->init(state, info));
532
806
    state->emplace_local_state(operator_id(), std::move(local_state));
533
806
    return Status::OK();
534
806
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
898
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
898
    auto local_state = LocalStateType::create_unique(state, this);
531
898
    RETURN_IF_ERROR(local_state->init(state, info));
532
898
    state->emplace_local_state(operator_id(), std::move(local_state));
533
898
    return Status::OK();
534
898
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.40k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.40k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.40k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.40k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.40k
    return Status::OK();
534
7.40k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
251k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
251k
    auto local_state = LocalStateType::create_unique(state, this);
531
251k
    RETURN_IF_ERROR(local_state->init(state, info));
532
251k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
251k
    return Status::OK();
534
251k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.78M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.05M
        : _num_rows_returned(0),
542
2.05M
          _rows_returned_counter(nullptr),
543
2.05M
          _parent(parent),
544
2.05M
          _state(state),
545
2.05M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.07M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.07M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.07M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.07M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.07M
    _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.07M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.07M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.07M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.07M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.07M
    if constexpr (!is_fake_shared) {
560
1.25M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
760k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
760k
                                    .first.get()
563
760k
                                    ->template cast<SharedStateArg>();
564
565
760k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
760k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
760k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
760k
        } else if (info.shared_state) {
569
420k
            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
420k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
420k
            _dependency = _shared_state->create_source_dependency(
576
420k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
420k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
420k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
420k
        } else {
580
72.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.39k
                DCHECK(false);
582
8.39k
            }
583
72.6k
        }
584
1.25M
    }
585
586
2.07M
    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.07M
    _rows_returned_counter =
591
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.07M
    _blocks_returned_counter =
593
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.07M
    _output_block_bytes_counter =
595
2.07M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.07M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.07M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.07M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.07M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.07M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.07M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.07M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.07M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.07M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.07M
    _memory_used_counter =
606
2.07M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.07M
    _common_profile->add_info_string("IsColocate",
608
2.07M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.07M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.07M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.07M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.07M
    return Status::OK();
613
2.07M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
73.5k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
73.5k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
73.5k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
73.5k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
73.5k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
73.5k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
73.5k
    _operator_profile->add_child(_common_profile.get(), true);
557
73.5k
    _operator_profile->add_child(_custom_profile.get(), true);
558
73.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
73.5k
    if constexpr (!is_fake_shared) {
560
73.5k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
19.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
19.3k
                                    .first.get()
563
19.3k
                                    ->template cast<SharedStateArg>();
564
565
19.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
19.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
19.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
54.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
53.3k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
53.3k
            _dependency = _shared_state->create_source_dependency(
576
53.3k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
53.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
53.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
53.3k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
897
        }
584
73.5k
    }
585
586
73.5k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
73.5k
    _rows_returned_counter =
591
73.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
73.5k
    _blocks_returned_counter =
593
73.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
73.5k
    _output_block_bytes_counter =
595
73.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
73.5k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
73.5k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
73.5k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
73.5k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
73.5k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
73.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
73.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
73.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
73.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
73.5k
    _memory_used_counter =
606
73.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
73.5k
    _common_profile->add_info_string("IsColocate",
608
73.5k
                                     std::to_string(_parent->is_colocated_operator()));
609
73.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
73.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
73.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
73.5k
    return Status::OK();
613
73.5k
}
_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
240k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
240k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
240k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
240k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
240k
    _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
240k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
240k
    _operator_profile->add_child(_common_profile.get(), true);
557
240k
    _operator_profile->add_child(_custom_profile.get(), true);
558
240k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
240k
    if constexpr (!is_fake_shared) {
560
240k
        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
240k
        } 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
231k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
231k
            _dependency = _shared_state->create_source_dependency(
576
231k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
231k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
231k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
231k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
8.98k
        }
584
240k
    }
585
586
240k
    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
240k
    _rows_returned_counter =
591
240k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
240k
    _blocks_returned_counter =
593
240k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
240k
    _output_block_bytes_counter =
595
240k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
240k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
240k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
240k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
240k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
240k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
240k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
240k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
240k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
240k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
240k
    _memory_used_counter =
606
240k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
240k
    _common_profile->add_info_string("IsColocate",
608
240k
                                     std::to_string(_parent->is_colocated_operator()));
609
240k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
240k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
240k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
240k
    return Status::OK();
613
240k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
156
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
156
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
156
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
156
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
156
    _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
156
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
156
    _operator_profile->add_child(_common_profile.get(), true);
557
156
    _operator_profile->add_child(_custom_profile.get(), true);
558
156
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
156
    if constexpr (!is_fake_shared) {
560
156
        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
156
        } 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
156
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
156
            _dependency = _shared_state->create_source_dependency(
576
156
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
156
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
156
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
156
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
156
    }
585
586
156
    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
156
    _rows_returned_counter =
591
156
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
156
    _blocks_returned_counter =
593
156
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
156
    _output_block_bytes_counter =
595
156
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
156
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
156
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
156
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
156
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
156
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
156
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
156
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
156
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
156
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
156
    _memory_used_counter =
606
156
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
156
    _common_profile->add_info_string("IsColocate",
608
156
                                     std::to_string(_parent->is_colocated_operator()));
609
156
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
156
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
156
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
156
    return Status::OK();
613
156
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.00k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.00k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.00k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.00k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.00k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
6.00k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.00k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.00k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.00k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.00k
    if constexpr (!is_fake_shared) {
560
6.00k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
6.00k
        } 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.92k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.92k
            _dependency = _shared_state->create_source_dependency(
576
5.92k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.92k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.92k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.92k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
83
        }
584
6.00k
    }
585
586
6.00k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
6.00k
    _rows_returned_counter =
591
6.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.00k
    _blocks_returned_counter =
593
6.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.00k
    _output_block_bytes_counter =
595
6.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.00k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.00k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.00k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.00k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.00k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.00k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.00k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.00k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.00k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.00k
    _memory_used_counter =
606
6.00k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.00k
    _common_profile->add_info_string("IsColocate",
608
6.00k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.00k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.00k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.00k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.00k
    return Status::OK();
613
6.00k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.65k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.65k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.65k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.65k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.65k
    _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
9.65k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.65k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.65k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.65k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.65k
    if constexpr (!is_fake_shared) {
560
9.65k
        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
9.65k
        } 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
9.53k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.53k
            _dependency = _shared_state->create_source_dependency(
576
9.53k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.53k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.53k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.53k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
123
        }
584
9.65k
    }
585
586
9.65k
    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
9.65k
    _rows_returned_counter =
591
9.65k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.65k
    _blocks_returned_counter =
593
9.65k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.65k
    _output_block_bytes_counter =
595
9.65k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.65k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.65k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.65k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.65k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.65k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.65k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.65k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.65k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.65k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.65k
    _memory_used_counter =
606
9.65k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.65k
    _common_profile->add_info_string("IsColocate",
608
9.65k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.65k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.65k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.65k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.65k
    return Status::OK();
613
9.65k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
106k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
106k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
106k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
106k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
106k
    _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
106k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
106k
    _operator_profile->add_child(_common_profile.get(), true);
557
106k
    _operator_profile->add_child(_custom_profile.get(), true);
558
106k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
106k
    if constexpr (!is_fake_shared) {
560
106k
        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
106k
        } 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
104k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
104k
            _dependency = _shared_state->create_source_dependency(
576
104k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
104k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
104k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
104k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2.08k
        }
584
106k
    }
585
586
106k
    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
106k
    _rows_returned_counter =
591
106k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
106k
    _blocks_returned_counter =
593
106k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
106k
    _output_block_bytes_counter =
595
106k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
106k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
106k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
106k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
106k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
106k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
106k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
106k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
106k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
106k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
106k
    _memory_used_counter =
606
106k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
106k
    _common_profile->add_info_string("IsColocate",
608
106k
                                     std::to_string(_parent->is_colocated_operator()));
609
106k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
106k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
106k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
106k
    return Status::OK();
613
106k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
83.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
83.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
83.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
83.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
83.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
83.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
83.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
83.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
83.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
83.2k
    if constexpr (!is_fake_shared) {
560
83.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
83.3k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
83.3k
                                    .first.get()
563
83.3k
                                    ->template cast<SharedStateArg>();
564
565
83.3k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
83.3k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
83.3k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
18.4E
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
83.2k
    }
585
586
83.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
83.2k
    _rows_returned_counter =
591
83.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
83.2k
    _blocks_returned_counter =
593
83.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
83.2k
    _output_block_bytes_counter =
595
83.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
83.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
83.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
83.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
83.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
83.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
83.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
83.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
83.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
83.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
83.2k
    _memory_used_counter =
606
83.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
83.2k
    _common_profile->add_info_string("IsColocate",
608
83.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
83.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
83.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
83.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
83.2k
    return Status::OK();
613
83.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
120
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
120
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
120
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
120
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
120
    _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
120
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
120
    _operator_profile->add_child(_common_profile.get(), true);
557
120
    _operator_profile->add_child(_custom_profile.get(), true);
558
120
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
120
    if constexpr (!is_fake_shared) {
560
120
        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
120
        } 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
120
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
120
            _dependency = _shared_state->create_source_dependency(
576
120
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
120
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
120
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
120
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
120
    }
585
586
120
    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
120
    _rows_returned_counter =
591
120
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
120
    _blocks_returned_counter =
593
120
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
120
    _output_block_bytes_counter =
595
120
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
120
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
120
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
120
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
120
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
120
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
120
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
120
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
120
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
120
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
120
    _memory_used_counter =
606
120
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
120
    _common_profile->add_info_string("IsColocate",
608
120
                                     std::to_string(_parent->is_colocated_operator()));
609
120
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
120
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
120
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
120
    return Status::OK();
613
120
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
817k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
817k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
817k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
817k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
817k
    _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
817k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
817k
    _operator_profile->add_child(_common_profile.get(), true);
557
817k
    _operator_profile->add_child(_custom_profile.get(), true);
558
817k
    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
817k
    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
817k
    _rows_returned_counter =
591
817k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
817k
    _blocks_returned_counter =
593
817k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
817k
    _output_block_bytes_counter =
595
817k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
817k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
817k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
817k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
817k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
817k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
817k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
817k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
817k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
817k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
817k
    _memory_used_counter =
606
817k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
817k
    _common_profile->add_info_string("IsColocate",
608
817k
                                     std::to_string(_parent->is_colocated_operator()));
609
817k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
817k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
817k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
817k
    return Status::OK();
613
817k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
56.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
56.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
56.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
56.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
56.1k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
56.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
56.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
56.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
56.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
56.1k
    if constexpr (!is_fake_shared) {
560
56.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
56.1k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.34k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.34k
            _dependency = _shared_state->create_source_dependency(
576
4.34k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.34k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.34k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.7k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.7k
        }
584
56.1k
    }
585
586
56.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
56.1k
    _rows_returned_counter =
591
56.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
56.1k
    _blocks_returned_counter =
593
56.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
56.1k
    _output_block_bytes_counter =
595
56.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
56.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
56.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
56.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
56.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
56.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
56.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
56.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
56.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
56.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
56.1k
    _memory_used_counter =
606
56.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
56.1k
    _common_profile->add_info_string("IsColocate",
608
56.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
56.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
56.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
56.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
56.1k
    return Status::OK();
613
56.1k
}
_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
5.05k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.05k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.05k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.05k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.05k
    _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.05k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.05k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.05k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.05k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.05k
    if constexpr (!is_fake_shared) {
560
5.05k
        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.05k
        } 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.01k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.01k
            _dependency = _shared_state->create_source_dependency(
576
5.01k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.01k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.01k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.01k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
34
        }
584
5.05k
    }
585
586
5.05k
    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.05k
    _rows_returned_counter =
591
5.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.05k
    _blocks_returned_counter =
593
5.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.05k
    _output_block_bytes_counter =
595
5.05k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.05k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.05k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.05k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.05k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.05k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.05k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.05k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.05k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.05k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.05k
    _memory_used_counter =
606
5.05k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.05k
    _common_profile->add_info_string("IsColocate",
608
5.05k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.05k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.05k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.05k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.05k
    return Status::OK();
613
5.05k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
447
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
447
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
447
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
447
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
447
    _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
447
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
447
    _operator_profile->add_child(_common_profile.get(), true);
557
447
    _operator_profile->add_child(_custom_profile.get(), true);
558
447
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
447
    if constexpr (!is_fake_shared) {
560
447
        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
447
        } 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
445
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
445
            _dependency = _shared_state->create_source_dependency(
576
445
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
445
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
445
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
445
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
2
        }
584
447
    }
585
586
447
    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
447
    _rows_returned_counter =
591
447
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
447
    _blocks_returned_counter =
593
447
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
447
    _output_block_bytes_counter =
595
447
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
447
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
447
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
447
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
447
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
447
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
447
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
447
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
447
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
447
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
447
    _memory_used_counter =
606
447
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
447
    _common_profile->add_info_string("IsColocate",
608
447
                                     std::to_string(_parent->is_colocated_operator()));
609
447
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
447
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
447
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
447
    return Status::OK();
613
447
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.23k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.23k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.23k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.23k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.23k
    _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.23k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.23k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.23k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.23k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.23k
    if constexpr (!is_fake_shared) {
560
5.23k
        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.23k
        } 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.97k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.97k
            _dependency = _shared_state->create_source_dependency(
576
4.97k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.97k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.97k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.97k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
264
        }
584
5.23k
    }
585
586
5.23k
    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.23k
    _rows_returned_counter =
591
5.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.23k
    _blocks_returned_counter =
593
5.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.23k
    _output_block_bytes_counter =
595
5.23k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.23k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.23k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.23k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.23k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.23k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.23k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.23k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.23k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.23k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.23k
    _memory_used_counter =
606
5.23k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.23k
    _common_profile->add_info_string("IsColocate",
608
5.23k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.23k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.23k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.23k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.23k
    return Status::OK();
613
5.23k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
666k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
666k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
666k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
666k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
666k
    _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
666k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
666k
    _operator_profile->add_child(_common_profile.get(), true);
557
666k
    _operator_profile->add_child(_custom_profile.get(), true);
558
666k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
666k
    if constexpr (!is_fake_shared) {
560
666k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
658k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
658k
                                    .first.get()
563
658k
                                    ->template cast<SharedStateArg>();
564
565
658k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
658k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
658k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
658k
        } 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
8.39k
        } else {
580
8.39k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
8.39k
                DCHECK(false);
582
8.39k
            }
583
8.39k
        }
584
666k
    }
585
586
666k
    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
666k
    _rows_returned_counter =
591
666k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
666k
    _blocks_returned_counter =
593
666k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
666k
    _output_block_bytes_counter =
595
666k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
666k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
666k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
666k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
666k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
666k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
666k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
666k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
666k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
666k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
666k
    _memory_used_counter =
606
666k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
666k
    _common_profile->add_info_string("IsColocate",
608
666k
                                     std::to_string(_parent->is_colocated_operator()));
609
666k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
666k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
666k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
666k
    return Status::OK();
613
666k
}
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.08M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.08M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.39M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
315k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
315k
    }
621
2.08M
    if (_parent->has_projection()) {
622
407k
        const auto& projection = *_parent->_projection;
623
407k
        _projections.resize(projection.projections.size());
624
2.50M
        for (size_t i = 0; i < _projections.size(); i++) {
625
2.10M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
2.10M
        }
627
407k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
433k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
26.4k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
429k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
402k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
402k
                        state, _intermediate_projections[i][j]));
633
402k
            }
634
26.4k
        }
635
407k
    }
636
2.08M
    return Status::OK();
637
2.08M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
73.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
73.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
75.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.82k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.82k
    }
621
73.7k
    if (_parent->has_projection()) {
622
73.7k
        const auto& projection = *_parent->_projection;
623
73.7k
        _projections.resize(projection.projections.size());
624
408k
        for (size_t i = 0; i < _projections.size(); i++) {
625
334k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
334k
        }
627
73.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
84.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
11.0k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
338k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
327k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
327k
                        state, _intermediate_projections[i][j]));
633
327k
            }
634
11.0k
        }
635
73.7k
    }
636
73.7k
    return Status::OK();
637
73.7k
}
_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
243k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
243k
    _conjuncts.resize(_parent->_conjuncts.size());
618
243k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
243k
    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
243k
    return Status::OK();
637
243k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
152
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
152
    _conjuncts.resize(_parent->_conjuncts.size());
618
152
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
152
    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
152
    return Status::OK();
637
152
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.00k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.00k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.09k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
90
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
90
    }
621
6.01k
    if (_parent->has_projection()) {
622
6.01k
        const auto& projection = *_parent->_projection;
623
6.01k
        _projections.resize(projection.projections.size());
624
25.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
19.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
19.9k
        }
627
6.01k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.04k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
34
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
253
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
219
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
219
                        state, _intermediate_projections[i][j]));
633
219
            }
634
34
        }
635
6.01k
    }
636
6.00k
    return Status::OK();
637
6.00k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.66k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.66k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.06k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.06k
    }
621
9.66k
    if (_parent->has_projection()) {
622
4.84k
        const auto& projection = *_parent->_projection;
623
4.84k
        _projections.resize(projection.projections.size());
624
21.2k
        for (size_t i = 0; i < _projections.size(); i++) {
625
16.4k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
16.4k
        }
627
4.84k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.92k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
87
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
652
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
565
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
565
                        state, _intermediate_projections[i][j]));
633
565
            }
634
87
        }
635
4.84k
    }
636
9.66k
    return Status::OK();
637
9.66k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
106k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
106k
    _conjuncts.resize(_parent->_conjuncts.size());
618
108k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.50k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.50k
    }
621
106k
    if (_parent->has_projection()) {
622
33.0k
        const auto& projection = *_parent->_projection;
623
33.0k
        _projections.resize(projection.projections.size());
624
296k
        for (size_t i = 0; i < _projections.size(); i++) {
625
263k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
263k
        }
627
33.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
33.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
744
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.64k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.90k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.90k
                        state, _intermediate_projections[i][j]));
633
3.90k
            }
634
744
        }
635
33.0k
    }
636
106k
    return Status::OK();
637
106k
}
_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
22
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
22
    }
621
83.3k
    if (_parent->has_projection()) {
622
351
        const auto& projection = *_parent->_projection;
623
351
        _projections.resize(projection.projections.size());
624
1.55k
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.20k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.20k
        }
627
351
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
352
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
1
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3
                        state, _intermediate_projections[i][j]));
633
3
            }
634
1
        }
635
351
    }
636
83.3k
    return Status::OK();
637
83.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
124
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
124
    _conjuncts.resize(_parent->_conjuncts.size());
618
124
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
124
    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
124
    return Status::OK();
637
124
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
822k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
822k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.13M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
310k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
310k
    }
621
822k
    if (_parent->has_projection()) {
622
276k
        const auto& projection = *_parent->_projection;
623
276k
        _projections.resize(projection.projections.size());
624
1.63M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.36M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.36M
        }
627
276k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
290k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
14.3k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
82.3k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
67.9k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
67.9k
                        state, _intermediate_projections[i][j]));
633
67.9k
            }
634
14.3k
        }
635
276k
    }
636
822k
    return Status::OK();
637
822k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
56.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
56.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
56.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
56.4k
    if (_parent->has_projection()) {
622
12.0k
        const auto& projection = *_parent->_projection;
623
12.0k
        _projections.resize(projection.projections.size());
624
116k
        for (size_t i = 0; i < _projections.size(); i++) {
625
103k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
103k
        }
627
12.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
12.2k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
168
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3.01k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
2.84k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
2.84k
                        state, _intermediate_projections[i][j]));
633
2.84k
            }
634
168
        }
635
12.0k
    }
636
56.4k
    return Status::OK();
637
56.4k
}
_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
5.04k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.04k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.44k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
396
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
396
    }
621
5.04k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
5.04k
    return Status::OK();
637
5.04k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
447
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
447
    _conjuncts.resize(_parent->_conjuncts.size());
618
447
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
447
    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
447
    return Status::OK();
637
447
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.26k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.26k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.26k
    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.26k
    if (_parent->has_projection()) {
622
115
        const auto& projection = *_parent->_projection;
623
115
        _projections.resize(projection.projections.size());
624
341
        for (size_t i = 0; i < _projections.size(); i++) {
625
226
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
226
        }
627
115
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
115
        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
115
    }
636
5.26k
    return Status::OK();
637
5.26k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
671k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
671k
    _conjuncts.resize(_parent->_conjuncts.size());
618
671k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
671k
    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
671k
    return Status::OK();
637
671k
}
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
6.87k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.87k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.87k
    _terminated = true;
645
6.87k
    return Status::OK();
646
6.87k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
330
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
330
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
330
    _terminated = true;
645
330
    return Status::OK();
646
330
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
24
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
24
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
24
    _terminated = true;
645
24
    return Status::OK();
646
24
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
38
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
38
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
38
    _terminated = true;
645
38
    return Status::OK();
646
38
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
57
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
57
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
57
    _terminated = true;
645
57
    return Status::OK();
646
57
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
4.87k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
4.87k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
4.87k
    _terminated = true;
645
4.87k
    return Status::OK();
646
4.87k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
93
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
93
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
93
    _terminated = true;
645
93
    return Status::OK();
646
93
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
203
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
203
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
203
    _terminated = true;
645
203
    return Status::OK();
646
203
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.22k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.22k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.22k
    _terminated = true;
645
1.22k
    return Status::OK();
646
1.22k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
37
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
37
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
37
    _terminated = true;
645
37
    return Status::OK();
646
37
}
647
648
template <typename SharedStateArg>
649
2.34M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.34M
    if (_closed) {
651
265k
        return Status::OK();
652
265k
    }
653
2.08M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.25M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.25M
    }
656
2.08M
    _closed = true;
657
2.08M
    return Status::OK();
658
2.34M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
73.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
73.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
73.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
73.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
73.6k
    }
656
73.6k
    _closed = true;
657
73.6k
    return Status::OK();
658
73.6k
}
_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
480k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
480k
    if (_closed) {
651
241k
        return Status::OK();
652
241k
    }
653
239k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
239k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
239k
    }
656
239k
    _closed = true;
657
239k
    return Status::OK();
658
480k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
156
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
156
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
156
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
156
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
156
    }
656
156
    _closed = true;
657
156
    return Status::OK();
658
156
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.99k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.99k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.99k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.99k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.99k
    }
656
5.99k
    _closed = true;
657
5.99k
    return Status::OK();
658
5.99k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
9.61k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
9.61k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
9.61k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.61k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.61k
    }
656
9.61k
    _closed = true;
657
9.61k
    return Status::OK();
658
9.61k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
106k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
106k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
106k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
106k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
106k
    }
656
106k
    _closed = true;
657
106k
    return Status::OK();
658
106k
}
_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
119
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
119
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
119
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
119
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
119
    }
656
119
    _closed = true;
657
119
    return Status::OK();
658
119
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
840k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
840k
    if (_closed) {
651
18.3k
        return Status::OK();
652
18.3k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
822k
    _closed = true;
657
822k
    return Status::OK();
658
840k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
56.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
56.4k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
56.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
56.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
56.4k
    }
656
56.4k
    _closed = true;
657
56.4k
    return Status::OK();
658
56.4k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.03k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.03k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.03k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.03k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.03k
    }
656
5.03k
    _closed = true;
657
5.03k
    return Status::OK();
658
5.03k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
681
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
681
    if (_closed) {
651
342
        return Status::OK();
652
342
    }
653
339
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
339
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
339
    }
656
339
    _closed = true;
657
339
    return Status::OK();
658
681
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.7k
    if (_closed) {
651
5.46k
        return Status::OK();
652
5.46k
    }
653
5.26k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.26k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.26k
    }
656
5.26k
    _closed = true;
657
5.26k
    return Status::OK();
658
10.7k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
672k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
672k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
672k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
672k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
672k
    }
656
672k
    _closed = true;
657
672k
    return Status::OK();
658
672k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
338
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
338
    if (_closed) {
651
178
        return Status::OK();
652
178
    }
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
338
}
659
660
template <typename SharedState>
661
1.79M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.79M
    _operator_profile =
664
1.79M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.79M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.79M
    _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.79M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.79M
    _operator_profile->add_child(_common_profile, true);
673
1.79M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.79M
    _operator_profile->set_metadata(_parent->node_id());
676
1.79M
    _wait_for_finish_dependency_timer =
677
1.79M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.79M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.79M
    if constexpr (!is_fake_shared) {
680
1.27M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.27M
            info.shared_state_map.end()) {
682
355k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
252k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
252k
            }
685
355k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
355k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
355k
                                                  ? 0
688
355k
                                                  : info.task_idx]
689
355k
                                  .get();
690
355k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
917k
        } else {
692
917k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
16
                DCHECK(false);
694
16
            }
695
917k
            _shared_state = info.shared_state->template cast<SharedState>();
696
917k
            _dependency = _shared_state->create_sink_dependency(
697
917k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
917k
        }
699
1.27M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.27M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.27M
    }
702
703
1.79M
    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.79M
    _rows_input_counter =
708
1.79M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.79M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.79M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.79M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.79M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.79M
    _memory_used_counter =
714
1.79M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.79M
    _common_profile->add_info_string("IsColocate",
716
1.79M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.79M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.79M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.79M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.79M
    return Status::OK();
721
1.79M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
121k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
121k
    _operator_profile =
664
121k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
121k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
121k
    _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
121k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
121k
    _operator_profile->add_child(_common_profile, true);
673
121k
    _operator_profile->add_child(_custom_profile, true);
674
675
121k
    _operator_profile->set_metadata(_parent->node_id());
676
121k
    _wait_for_finish_dependency_timer =
677
121k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
121k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
121k
    if constexpr (!is_fake_shared) {
680
121k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
121k
            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
19.6k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
19.6k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
19.6k
                                                  ? 0
688
19.6k
                                                  : info.task_idx]
689
19.6k
                                  .get();
690
19.6k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
102k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
102k
            _shared_state = info.shared_state->template cast<SharedState>();
696
102k
            _dependency = _shared_state->create_sink_dependency(
697
102k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
102k
        }
699
121k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
121k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
121k
    }
702
703
121k
    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
121k
    _rows_input_counter =
708
121k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
121k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
121k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
121k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
121k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
121k
    _memory_used_counter =
714
121k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
121k
    _common_profile->add_info_string("IsColocate",
716
121k
                                     std::to_string(_parent->is_colocated_operator()));
717
121k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
121k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
121k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
121k
    return Status::OK();
721
121k
}
_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
241k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
241k
    _operator_profile =
664
241k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
241k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
241k
    _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
241k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
241k
    _operator_profile->add_child(_common_profile, true);
673
241k
    _operator_profile->add_child(_custom_profile, true);
674
675
241k
    _operator_profile->set_metadata(_parent->node_id());
676
241k
    _wait_for_finish_dependency_timer =
677
241k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
241k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
241k
    if constexpr (!is_fake_shared) {
680
241k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
241k
            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
241k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
241k
            _shared_state = info.shared_state->template cast<SharedState>();
696
241k
            _dependency = _shared_state->create_sink_dependency(
697
241k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
241k
        }
699
241k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
241k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
241k
    }
702
703
241k
    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
241k
    _rows_input_counter =
708
241k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
241k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
241k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
241k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
241k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
241k
    _memory_used_counter =
714
241k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
241k
    _common_profile->add_info_string("IsColocate",
716
241k
                                     std::to_string(_parent->is_colocated_operator()));
717
241k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
241k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
241k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
241k
    return Status::OK();
721
241k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
163
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
163
    _operator_profile =
664
163
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
163
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
163
    _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
163
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
163
    _operator_profile->add_child(_common_profile, true);
673
163
    _operator_profile->add_child(_custom_profile, true);
674
675
163
    _operator_profile->set_metadata(_parent->node_id());
676
163
    _wait_for_finish_dependency_timer =
677
163
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
163
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
163
    if constexpr (!is_fake_shared) {
680
163
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
163
            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
163
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
163
            _shared_state = info.shared_state->template cast<SharedState>();
696
163
            _dependency = _shared_state->create_sink_dependency(
697
163
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
163
        }
699
163
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
163
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
163
    }
702
703
163
    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
163
    _rows_input_counter =
708
163
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
163
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
163
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
163
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
163
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
163
    _memory_used_counter =
714
163
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
163
    _common_profile->add_info_string("IsColocate",
716
163
                                     std::to_string(_parent->is_colocated_operator()));
717
163
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
163
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
163
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
163
    return Status::OK();
721
163
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.00k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.00k
    _operator_profile =
664
6.00k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.00k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.00k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
6.00k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.00k
    _operator_profile->add_child(_common_profile, true);
673
6.00k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.00k
    _operator_profile->set_metadata(_parent->node_id());
676
6.00k
    _wait_for_finish_dependency_timer =
677
6.00k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.00k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.00k
    if constexpr (!is_fake_shared) {
680
6.00k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.00k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
6.00k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.00k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.00k
            _dependency = _shared_state->create_sink_dependency(
697
6.00k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.00k
        }
699
6.00k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.00k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.00k
    }
702
703
6.00k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
6.00k
    _rows_input_counter =
708
6.00k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.00k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.00k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.00k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.00k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.00k
    _memory_used_counter =
714
6.00k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.00k
    _common_profile->add_info_string("IsColocate",
716
6.00k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.00k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.00k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.00k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.00k
    return Status::OK();
721
6.00k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.65k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.65k
    _operator_profile =
664
9.65k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.65k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.65k
    _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.65k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.65k
    _operator_profile->add_child(_common_profile, true);
673
9.65k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.65k
    _operator_profile->set_metadata(_parent->node_id());
676
9.65k
    _wait_for_finish_dependency_timer =
677
9.65k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.65k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.65k
    if constexpr (!is_fake_shared) {
680
9.65k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.65k
            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.65k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.65k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.65k
            _dependency = _shared_state->create_sink_dependency(
697
9.65k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.65k
        }
699
9.65k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.65k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.65k
    }
702
703
9.65k
    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.65k
    _rows_input_counter =
708
9.65k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.65k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.65k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.65k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.65k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.65k
    _memory_used_counter =
714
9.65k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.65k
    _common_profile->add_info_string("IsColocate",
716
9.65k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.65k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.65k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.65k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.65k
    return Status::OK();
721
9.65k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
106k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
106k
    _operator_profile =
664
106k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
106k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
106k
    _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
106k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
106k
    _operator_profile->add_child(_common_profile, true);
673
106k
    _operator_profile->add_child(_custom_profile, true);
674
675
106k
    _operator_profile->set_metadata(_parent->node_id());
676
106k
    _wait_for_finish_dependency_timer =
677
106k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
106k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
106k
    if constexpr (!is_fake_shared) {
680
106k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
106k
            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
106k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
106k
            _shared_state = info.shared_state->template cast<SharedState>();
696
106k
            _dependency = _shared_state->create_sink_dependency(
697
106k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
106k
        }
699
106k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
106k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
106k
    }
702
703
106k
    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
106k
    _rows_input_counter =
708
106k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
106k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
106k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
106k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
106k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
106k
    _memory_used_counter =
714
106k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
106k
    _common_profile->add_info_string("IsColocate",
716
106k
                                     std::to_string(_parent->is_colocated_operator()));
717
106k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
106k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
106k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
106k
    return Status::OK();
721
106k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
83.2k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
83.2k
    _operator_profile =
664
83.2k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
83.2k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
83.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
83.2k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
83.2k
    _operator_profile->add_child(_common_profile, true);
673
83.2k
    _operator_profile->add_child(_custom_profile, true);
674
675
83.2k
    _operator_profile->set_metadata(_parent->node_id());
676
83.2k
    _wait_for_finish_dependency_timer =
677
83.2k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
83.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
83.2k
    if constexpr (!is_fake_shared) {
680
83.2k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
83.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
83.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
83.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
83.2k
                                                  ? 0
688
83.2k
                                                  : info.task_idx]
689
83.2k
                                  .get();
690
83.2k
            _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
83.2k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
83.2k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
83.2k
    }
702
703
83.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
83.2k
    _rows_input_counter =
708
83.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
83.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
83.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
83.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
83.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
83.2k
    _memory_used_counter =
714
83.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
83.2k
    _common_profile->add_info_string("IsColocate",
716
83.2k
                                     std::to_string(_parent->is_colocated_operator()));
717
83.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
83.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
83.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
83.2k
    return Status::OK();
721
83.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
130
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
130
    _operator_profile =
664
130
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
130
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
130
    _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
130
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
130
    _operator_profile->add_child(_common_profile, true);
673
130
    _operator_profile->add_child(_custom_profile, true);
674
675
130
    _operator_profile->set_metadata(_parent->node_id());
676
130
    _wait_for_finish_dependency_timer =
677
130
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
130
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
130
    if constexpr (!is_fake_shared) {
680
130
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
130
            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
130
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
130
            _shared_state = info.shared_state->template cast<SharedState>();
696
130
            _dependency = _shared_state->create_sink_dependency(
697
130
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
130
        }
699
130
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
130
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
130
    }
702
703
130
    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
130
    _rows_input_counter =
708
130
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
130
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
130
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
130
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
130
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
130
    _memory_used_counter =
714
130
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
130
    _common_profile->add_info_string("IsColocate",
716
130
                                     std::to_string(_parent->is_colocated_operator()));
717
130
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
130
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
130
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
130
    return Status::OK();
721
130
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
522k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
522k
    _operator_profile =
664
522k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
522k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
522k
    _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
522k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
522k
    _operator_profile->add_child(_common_profile, true);
673
522k
    _operator_profile->add_child(_custom_profile, true);
674
675
522k
    _operator_profile->set_metadata(_parent->node_id());
676
522k
    _wait_for_finish_dependency_timer =
677
522k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
522k
    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
522k
    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
522k
    _rows_input_counter =
708
522k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
522k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
522k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
522k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
522k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
522k
    _memory_used_counter =
714
522k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
522k
    _common_profile->add_info_string("IsColocate",
716
522k
                                     std::to_string(_parent->is_colocated_operator()));
717
522k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
522k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
522k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
522k
    return Status::OK();
721
522k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.83k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.83k
    _operator_profile =
664
9.83k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.83k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.83k
    _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.83k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.83k
    _operator_profile->add_child(_common_profile, true);
673
9.83k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.83k
    _operator_profile->set_metadata(_parent->node_id());
676
9.83k
    _wait_for_finish_dependency_timer =
677
9.83k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.83k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.83k
    if constexpr (!is_fake_shared) {
680
9.83k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.83k
            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.83k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.83k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.83k
            _dependency = _shared_state->create_sink_dependency(
697
9.83k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.83k
        }
699
9.83k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.83k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.83k
    }
702
703
9.83k
    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.83k
    _rows_input_counter =
708
9.83k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.83k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.83k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.83k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.83k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.83k
    _memory_used_counter =
714
9.83k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.83k
    _common_profile->add_info_string("IsColocate",
716
9.83k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.83k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.83k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.83k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.83k
    return Status::OK();
721
9.83k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
446
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
446
    _operator_profile =
664
446
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
446
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
446
    _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
446
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
446
    _operator_profile->add_child(_common_profile, true);
673
446
    _operator_profile->add_child(_custom_profile, true);
674
675
446
    _operator_profile->set_metadata(_parent->node_id());
676
446
    _wait_for_finish_dependency_timer =
677
446
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
446
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
446
    if constexpr (!is_fake_shared) {
680
446
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
446
            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
446
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
446
            _shared_state = info.shared_state->template cast<SharedState>();
696
446
            _dependency = _shared_state->create_sink_dependency(
697
446
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
446
        }
699
446
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
446
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
446
    }
702
703
446
    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
446
    _rows_input_counter =
708
446
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
446
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
446
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
446
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
446
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
446
    _memory_used_counter =
714
446
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
446
    _common_profile->add_info_string("IsColocate",
716
446
                                     std::to_string(_parent->is_colocated_operator()));
717
446
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
446
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
446
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
446
    return Status::OK();
721
446
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.08k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.08k
    _operator_profile =
664
2.08k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.08k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.08k
    _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.08k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.08k
    _operator_profile->add_child(_common_profile, true);
673
2.08k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.08k
    _operator_profile->set_metadata(_parent->node_id());
676
2.08k
    _wait_for_finish_dependency_timer =
677
2.08k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.08k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.08k
    if constexpr (!is_fake_shared) {
680
2.08k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.08k
            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.08k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.08k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.08k
            _dependency = _shared_state->create_sink_dependency(
697
2.08k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.08k
        }
699
2.08k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.08k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.08k
    }
702
703
2.08k
    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.08k
    _rows_input_counter =
708
2.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.08k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.08k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.08k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.08k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.08k
    _memory_used_counter =
714
2.08k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.08k
    _common_profile->add_info_string("IsColocate",
716
2.08k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.08k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.08k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.08k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.08k
    return Status::OK();
721
2.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.7k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.7k
    _operator_profile =
664
12.7k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.7k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.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
12.7k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.7k
    _operator_profile->add_child(_common_profile, true);
673
12.7k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.7k
    _operator_profile->set_metadata(_parent->node_id());
676
12.7k
    _wait_for_finish_dependency_timer =
677
12.7k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.7k
    if constexpr (!is_fake_shared) {
680
12.7k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.7k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.7k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.7k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.7k
            _dependency = _shared_state->create_sink_dependency(
697
12.7k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.7k
        }
699
12.7k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.7k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.7k
    }
702
703
12.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
12.7k
    _rows_input_counter =
708
12.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.7k
    _memory_used_counter =
714
12.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.7k
    _common_profile->add_info_string("IsColocate",
716
12.7k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.7k
    return Status::OK();
721
12.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
252k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
252k
    _operator_profile =
664
252k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
252k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
252k
    _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
252k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
252k
    _operator_profile->add_child(_common_profile, true);
673
252k
    _operator_profile->add_child(_custom_profile, true);
674
675
252k
    _operator_profile->set_metadata(_parent->node_id());
676
252k
    _wait_for_finish_dependency_timer =
677
252k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
252k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
252k
    if constexpr (!is_fake_shared) {
680
252k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
252k
            info.shared_state_map.end()) {
682
252k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
252k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
252k
            }
685
252k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
252k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
252k
                                                  ? 0
688
252k
                                                  : info.task_idx]
689
252k
                                  .get();
690
252k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
252k
        } else {
692
16
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
16
                DCHECK(false);
694
16
            }
695
16
            _shared_state = info.shared_state->template cast<SharedState>();
696
16
            _dependency = _shared_state->create_sink_dependency(
697
16
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
16
        }
699
252k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
252k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
252k
    }
702
703
252k
    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
252k
    _rows_input_counter =
708
252k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
252k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
252k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
252k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
252k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
252k
    _memory_used_counter =
714
252k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
252k
    _common_profile->add_info_string("IsColocate",
716
252k
                                     std::to_string(_parent->is_colocated_operator()));
717
252k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
252k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
252k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
252k
    return Status::OK();
721
252k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
425k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
425k
    _operator_profile =
664
425k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
425k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
425k
    _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
425k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
425k
    _operator_profile->add_child(_common_profile, true);
673
425k
    _operator_profile->add_child(_custom_profile, true);
674
675
425k
    _operator_profile->set_metadata(_parent->node_id());
676
425k
    _wait_for_finish_dependency_timer =
677
425k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
425k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
425k
    if constexpr (!is_fake_shared) {
680
425k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
425k
            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
425k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
425k
            _shared_state = info.shared_state->template cast<SharedState>();
696
425k
            _dependency = _shared_state->create_sink_dependency(
697
425k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
425k
        }
699
425k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
425k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
425k
    }
702
703
425k
    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
425k
    _rows_input_counter =
708
425k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
425k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
425k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
425k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
425k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
425k
    _memory_used_counter =
714
425k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
425k
    _common_profile->add_info_string("IsColocate",
716
425k
                                     std::to_string(_parent->is_colocated_operator()));
717
425k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
425k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
425k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
425k
    return Status::OK();
721
425k
}
_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.80M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.80M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.80M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.27M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.27M
    }
731
1.80M
    _closed = true;
732
1.80M
    return Status::OK();
733
1.80M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
121k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
121k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
121k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
121k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
121k
    }
731
121k
    _closed = true;
732
121k
    return Status::OK();
733
121k
}
_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
241k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
241k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
241k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
241k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
241k
    }
731
241k
    _closed = true;
732
241k
    return Status::OK();
733
241k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
154
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
154
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
152
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
152
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
152
    }
731
152
    _closed = true;
732
152
    return Status::OK();
733
154
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.96k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.96k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.96k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.96k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.96k
    }
731
5.96k
    _closed = true;
732
5.96k
    return Status::OK();
733
5.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.60k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.60k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.60k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.60k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.60k
    }
731
9.60k
    _closed = true;
732
9.60k
    return Status::OK();
733
9.60k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
106k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
106k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
106k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
106k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
106k
    }
731
106k
    _closed = true;
732
106k
    return Status::OK();
733
106k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
82.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
82.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
82.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
82.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
82.9k
    }
731
82.9k
    _closed = true;
732
82.9k
    return Status::OK();
733
82.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
118
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
118
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
118
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
118
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
118
    }
731
118
    _closed = true;
732
118
    return Status::OK();
733
118
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
526k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
526k
    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
526k
    _closed = true;
732
526k
    return Status::OK();
733
526k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.83k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.83k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.83k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.83k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.83k
    }
731
9.83k
    _closed = true;
732
9.83k
    return Status::OK();
733
9.83k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
342
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
342
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
342
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
342
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
342
    }
731
342
    _closed = true;
732
342
    return Status::OK();
733
342
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.09k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.09k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.09k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.09k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.09k
    }
731
2.09k
    _closed = true;
732
2.09k
    return Status::OK();
733
2.09k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.8k
    }
731
12.8k
    _closed = true;
732
12.8k
    return Status::OK();
733
12.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
252k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
252k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
252k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
252k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
252k
    }
731
252k
    _closed = true;
732
252k
    return Status::OK();
733
252k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
427k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
427k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
427k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
427k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
427k
    }
731
427k
    _closed = true;
732
427k
    return Status::OK();
733
427k
}
_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.37k
                                                          bool* eos) {
738
1.37k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.37k
    return pull(state, block, eos);
740
1.37k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
39
                                                          bool* eos) {
738
39
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
39
    return pull(state, block, eos);
740
39
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
1.33k
                                                          bool* eos) {
738
1.33k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
1.33k
    return pull(state, block, eos);
740
1.33k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
488k
                                                         bool* eos) {
745
488k
    auto& local_state = get_local_state(state);
746
488k
    if (need_more_input_data(state)) {
747
455k
        local_state._child_block->clear_column_data(
748
455k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
455k
                        .num_slots());
750
455k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
455k
                state, local_state._child_block.get(), &local_state._child_eos));
752
455k
        *eos = local_state._child_eos;
753
455k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
59.5k
            return Status::OK();
755
59.5k
        }
756
396k
        {
757
396k
            SCOPED_TIMER(local_state.exec_time_counter());
758
396k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
396k
        }
760
396k
    }
761
762
429k
    if (!need_more_input_data(state)) {
763
403k
        SCOPED_TIMER(local_state.exec_time_counter());
764
403k
        bool new_eos = false;
765
403k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
403k
        if (new_eos) {
767
323k
            *eos = true;
768
323k
        } else if (!need_more_input_data(state)) {
769
24.3k
            *eos = false;
770
24.3k
        }
771
403k
    }
772
429k
    return Status::OK();
773
429k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
142k
                                                         bool* eos) {
745
142k
    auto& local_state = get_local_state(state);
746
142k
    if (need_more_input_data(state)) {
747
123k
        local_state._child_block->clear_column_data(
748
123k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
123k
                        .num_slots());
750
123k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
123k
                state, local_state._child_block.get(), &local_state._child_eos));
752
123k
        *eos = local_state._child_eos;
753
123k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
34.9k
            return Status::OK();
755
34.9k
        }
756
88.7k
        {
757
88.7k
            SCOPED_TIMER(local_state.exec_time_counter());
758
88.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
88.7k
        }
760
88.7k
    }
761
762
108k
    if (!need_more_input_data(state)) {
763
108k
        SCOPED_TIMER(local_state.exec_time_counter());
764
108k
        bool new_eos = false;
765
108k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
108k
        if (new_eos) {
767
49.2k
            *eos = true;
768
58.7k
        } else if (!need_more_input_data(state)) {
769
10.1k
            *eos = false;
770
10.1k
        }
771
108k
    }
772
107k
    return Status::OK();
773
107k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.10k
                                                         bool* eos) {
745
4.10k
    auto& local_state = get_local_state(state);
746
4.10k
    if (need_more_input_data(state)) {
747
2.12k
        local_state._child_block->clear_column_data(
748
2.12k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.12k
                        .num_slots());
750
2.12k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.12k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.12k
        *eos = local_state._child_eos;
753
2.12k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
246
            return Status::OK();
755
246
        }
756
1.87k
        {
757
1.87k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.87k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.87k
        }
760
1.87k
    }
761
762
3.86k
    if (!need_more_input_data(state)) {
763
3.86k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.86k
        bool new_eos = false;
765
3.86k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.86k
        if (new_eos) {
767
1.35k
            *eos = true;
768
2.51k
        } else if (!need_more_input_data(state)) {
769
1.98k
            *eos = false;
770
1.98k
        }
771
3.86k
    }
772
3.85k
    return Status::OK();
773
3.85k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.96k
                                                         bool* eos) {
745
1.96k
    auto& local_state = get_local_state(state);
746
1.96k
    if (need_more_input_data(state)) {
747
1.96k
        local_state._child_block->clear_column_data(
748
1.96k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.96k
                        .num_slots());
750
1.96k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.96k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.96k
        *eos = local_state._child_eos;
753
1.96k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
795
            return Status::OK();
755
795
        }
756
1.17k
        {
757
1.17k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.17k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.17k
        }
760
1.17k
    }
761
762
1.17k
    if (!need_more_input_data(state)) {
763
1.17k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.17k
        bool new_eos = false;
765
1.17k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.17k
        if (new_eos) {
767
806
            *eos = true;
768
806
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.17k
    }
772
1.17k
    return Status::OK();
773
1.17k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
18.3k
                                                         bool* eos) {
745
18.3k
    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.82k
            return Status::OK();
755
3.82k
        }
756
14.4k
        {
757
14.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
14.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
14.4k
        }
760
14.4k
    }
761
762
14.4k
    if (!need_more_input_data(state)) {
763
7.46k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.46k
        bool new_eos = false;
765
7.46k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.46k
        if (new_eos) {
767
7.33k
            *eos = true;
768
7.33k
        } else if (!need_more_input_data(state)) {
769
16
            *eos = false;
770
16
        }
771
7.46k
    }
772
14.4k
    return Status::OK();
773
14.4k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
290k
                                                         bool* eos) {
745
290k
    auto& local_state = get_local_state(state);
746
290k
    if (need_more_input_data(state)) {
747
290k
        local_state._child_block->clear_column_data(
748
290k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
290k
                        .num_slots());
750
290k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
290k
                state, local_state._child_block.get(), &local_state._child_eos));
752
290k
        *eos = local_state._child_eos;
753
290k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
19.0k
            return Status::OK();
755
19.0k
        }
756
271k
        {
757
271k
            SCOPED_TIMER(local_state.exec_time_counter());
758
271k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
271k
        }
760
271k
    }
761
762
271k
    if (!need_more_input_data(state)) {
763
252k
        SCOPED_TIMER(local_state.exec_time_counter());
764
252k
        bool new_eos = false;
765
252k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
252k
        if (new_eos) {
767
251k
            *eos = true;
768
251k
        } else if (!need_more_input_data(state)) {
769
7
            *eos = false;
770
7
        }
771
252k
    }
772
271k
    return Status::OK();
773
271k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.6k
                                                         bool* eos) {
745
21.6k
    auto& local_state = get_local_state(state);
746
21.6k
    if (need_more_input_data(state)) {
747
9.74k
        local_state._child_block->clear_column_data(
748
9.74k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.74k
                        .num_slots());
750
9.74k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.74k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.74k
        *eos = local_state._child_eos;
753
9.74k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
248
            return Status::OK();
755
248
        }
756
9.49k
        {
757
9.49k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.49k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.49k
        }
760
9.49k
    }
761
762
21.3k
    if (!need_more_input_data(state)) {
763
20.8k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.8k
        bool new_eos = false;
765
20.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.8k
        if (new_eos) {
767
5.96k
            *eos = true;
768
14.8k
        } else if (!need_more_input_data(state)) {
769
11.8k
            *eos = false;
770
11.8k
        }
771
20.8k
    }
772
21.3k
    return Status::OK();
773
21.3k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
9.65k
                                                         bool* eos) {
745
9.65k
    auto& local_state = get_local_state(state);
746
9.65k
    if (need_more_input_data(state)) {
747
9.29k
        local_state._child_block->clear_column_data(
748
9.29k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
9.29k
                        .num_slots());
750
9.29k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
9.29k
                state, local_state._child_block.get(), &local_state._child_eos));
752
9.29k
        *eos = local_state._child_eos;
753
9.29k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
439
            return Status::OK();
755
439
        }
756
8.86k
        {
757
8.86k
            SCOPED_TIMER(local_state.exec_time_counter());
758
8.86k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
8.86k
        }
760
8.86k
    }
761
762
9.22k
    if (!need_more_input_data(state)) {
763
9.22k
        SCOPED_TIMER(local_state.exec_time_counter());
764
9.22k
        bool new_eos = false;
765
9.22k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
9.22k
        if (new_eos) {
767
6.80k
            *eos = true;
768
6.80k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
9.22k
    }
772
9.21k
    return Status::OK();
773
9.21k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
51.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
51.2k
    RETURN_IF_ERROR(Base::init(state, info));
779
51.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
51.2k
                                                         "AsyncWriterDependency", true);
781
51.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
51.2k
                             _finish_dependency));
783
784
51.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
51.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
51.2k
    return Status::OK();
787
51.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
367
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
367
    RETURN_IF_ERROR(Base::init(state, info));
779
367
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
367
                                                         "AsyncWriterDependency", true);
781
367
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
367
                             _finish_dependency));
783
784
367
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
367
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
367
    return Status::OK();
787
367
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
50.8k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
50.8k
    RETURN_IF_ERROR(Base::init(state, info));
779
50.8k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
50.8k
                                                         "AsyncWriterDependency", true);
781
50.8k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
50.8k
                             _finish_dependency));
783
784
50.8k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
50.8k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
50.8k
    return Status::OK();
787
50.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
12
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
12
    RETURN_IF_ERROR(Base::init(state, info));
779
12
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
12
                                                         "AsyncWriterDependency", true);
781
12
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
12
                             _finish_dependency));
783
784
12
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
12
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
12
    return Status::OK();
787
12
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_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
51.7k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
51.7k
    RETURN_IF_ERROR(Base::open(state));
793
51.7k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
400k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
349k
        RETURN_IF_ERROR(
796
349k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
349k
    }
798
51.7k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
51.7k
    return Status::OK();
800
51.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
367
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
367
    RETURN_IF_ERROR(Base::open(state));
793
367
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.85k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
367
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
367
    return Status::OK();
800
367
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
51.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
51.3k
    RETURN_IF_ERROR(Base::open(state));
793
51.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
398k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
347k
        RETURN_IF_ERROR(
796
347k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
347k
    }
798
51.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
51.3k
    return Status::OK();
800
51.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
12
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
12
    RETURN_IF_ERROR(Base::open(state));
793
12
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
216
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
204
        RETURN_IF_ERROR(
796
204
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
204
    }
798
12
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
12
    return Status::OK();
800
12
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_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
66.7k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
66.7k
    return _writer->sink(block, eos);
806
66.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.60k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.60k
    return _writer->sink(block, eos);
806
1.60k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
65.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
65.0k
    return _writer->sink(block, eos);
806
65.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
12
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
12
    return _writer->sink(block, eos);
806
12
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_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
51.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
51.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
51.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
51.7k
    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
51.7k
    if (_writer) {
818
51.7k
        Status st = _writer->get_writer_status();
819
51.7k
        if (exec_status.ok()) {
820
51.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
51.6k
                                                       : Status::Cancelled("force close"));
822
51.6k
        } else {
823
75
            _writer->force_close(exec_status);
824
75
        }
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
51.7k
        RETURN_IF_ERROR(st);
829
51.7k
    }
830
51.6k
    return Base::close(state, exec_status);
831
51.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
357
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
357
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
357
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
357
    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
357
    if (_writer) {
818
357
        Status st = _writer->get_writer_status();
819
357
        if (exec_status.ok()) {
820
357
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
357
                                                       : Status::Cancelled("force close"));
822
357
        } 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
357
        RETURN_IF_ERROR(st);
829
357
    }
830
357
    return Base::close(state, exec_status);
831
357
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
51.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
51.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
51.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
51.3k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
51.3k
    if (_writer) {
818
51.3k
        Status st = _writer->get_writer_status();
819
51.3k
        if (exec_status.ok()) {
820
51.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
51.3k
                                                       : Status::Cancelled("force close"));
822
51.3k
        } else {
823
75
            _writer->force_close(exec_status);
824
75
        }
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
51.3k
        RETURN_IF_ERROR(st);
829
51.3k
    }
830
51.2k
    return Base::close(state, exec_status);
831
51.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
12
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
12
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
12
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
12
    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
12
    if (_writer) {
818
12
        Status st = _writer->get_writer_status();
819
12
        if (exec_status.ok()) {
820
12
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
12
                                                       : Status::Cancelled("force close"));
822
12
        } 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
12
        RETURN_IF_ERROR(st);
829
12
    }
830
12
    return Base::close(state, exec_status);
831
12
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_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::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
976
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
977
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
978
979
#ifdef BE_TEST
980
template class OperatorX<DummyOperatorLocalState>;
981
template class DataSinkOperatorX<DummySinkLocalState>;
982
#endif
983
984
} // namespace doris