MCPcopy Create free account
hub / github.com/apache/impala / TopNNode

Method TopNNode

be/src/exec/topn-node.cc:150–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148DummyTupleRowComparator::dummy_codegend_compare_fn_{};
149
150TopNNode::TopNNode(
151 ObjectPool* pool, const TopNPlanNode& pnode, const DescriptorTbl& descs)
152 : ExecNode(pool, pnode, descs),
153 offset_(pnode.offset()),
154 output_tuple_exprs_(pnode.output_tuple_exprs_),
155 output_tuple_desc_(pnode.output_tuple_desc_),
156 order_cmp_(new TupleRowLexicalComparator(*pnode.ordering_comparator_config_)),
157 partition_cmp_(pnode.partition_comparator_config_ == nullptr ?
158 static_cast<TupleRowComparator*>(new DummyTupleRowComparator()) :
159 new TupleRowLexicalComparator(*pnode.partition_comparator_config_)),
160 intra_partition_order_cmp_(pnode.intra_partition_comparator_config_ == nullptr ?
161 nullptr :
162 new TupleRowLexicalComparator(*pnode.intra_partition_comparator_config_)),
163 tuple_pool_(nullptr),
164 codegend_insert_batch_fn_(pnode.codegend_insert_batch_fn_),
165 partition_heaps_(ComparatorWrapper<TupleRowComparator>(*partition_cmp_)) {
166 runtime_profile()->AddInfoString("SortType", "TopN");
167}
168
169Status TopNNode::Prepare(RuntimeState* state) {
170 SCOPED_TIMER(runtime_profile_->total_time_counter());

Callers

nothing calls this directly

Calls 2

AddInfoStringMethod · 0.80
offsetMethod · 0.45

Tested by

no test coverage detected