Coverage Report

Created: 2026-08-24 12:07

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