HappenLee commented on code in PR #30511:
URL: https://github.com/apache/doris/pull/30511#discussion_r1469454963


##########
be/src/vec/exec/vpartition_sort_node.cpp:
##########
@@ -227,19 +258,16 @@ Status VPartitionSortNode::sink(RuntimeState* state, 
vectorized::Block* input_bl
         _partitioned_data.reset(nullptr);
         SCOPED_TIMER(_partition_sort_timer);
         for (int i = 0; i < _value_places.size(); ++i) {
-            auto sorter = PartitionSorter::create_unique(
-                    _vsort_exec_exprs, _limit, 0, _pool, _is_asc_order, 
_nulls_first,
-                    child(0)->row_desc(), state, i == 0 ? 
_runtime_profile.get() : nullptr,
-                    _has_global_limit, _partition_inner_limit, 
_top_n_algorithm,
-                    _previous_row.get());
+            _value_places[i]->create_or_reset_sorter_state();
+            auto sorter = std::move(_value_places[i]->_partition_topn_sorter);

Review Comment:
   why use `std::move` not `std::ref`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to