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


##########
be/src/vec/exec/vpartition_sort_node.cpp:
##########
@@ -79,13 +119,18 @@ Status VPartitionSortNode::prepare(RuntimeState* state) {
     _get_sorted_timer = ADD_TIMER(runtime_profile(), "GetSortedTime");
     _selector_block_timer = ADD_TIMER(runtime_profile(), "SelectorBlockTime");
     _emplace_key_timer = ADD_TIMER(runtime_profile(), "EmplaceKeyTime");
+    runtime_profile()->add_info_string("CurrentTopNPhase", 
std::to_string(_topn_phase));
 
     RETURN_IF_ERROR(ExecNode::prepare(state));
     SCOPED_TIMER(_exec_timer);
     RETURN_IF_ERROR(_vsort_exec_exprs.prepare(state, child(0)->row_desc(), 
_row_descriptor));
     RETURN_IF_ERROR(VExpr::prepare(_partition_expr_ctxs, state, 
child(0)->row_desc()));
     _init_hash_method();
 
+    _partition_sort_info = std::make_shared<PartitionSortInfo>(

Review Comment:
   why use shared_ptr?not unique_ptr?



##########
be/src/vec/exec/vpartition_sort_node.cpp:
##########
@@ -33,10 +33,50 @@
 #include "vec/common/hash_table/hash_map_context_creator.h"
 #include "vec/common/hash_table/hash_set.h"
 #include "vec/common/hash_table/partitioned_hash_map.h"
+#include "vec/core/block.h"
 #include "vec/exprs/vexpr.h"
 #include "vec/exprs/vexpr_context.h"
 
 namespace doris::vectorized {
+Status PartitionBlocks::do_partition_topn_sort() {
+    if (_partition_topn_sorter == nullptr) {

Review Comment:
   why each time need create the new `_partition_topn_sorter`



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to