Coverage Report

Created: 2026-10-21 17:39

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