Coverage Report

Created: 2026-06-03 16:17

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