Coverage Report

Created: 2026-10-09 17:36

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