Coverage Report

Created: 2026-04-10 05:33

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