Coverage Report

Created: 2026-08-07 18:25

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