Coverage Report

Created: 2026-07-08 07:22

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