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


##########
be/src/vec/core/sort_cursor.h:
##########
@@ -130,37 +131,30 @@ struct MergeSortCursorImpl {
     MergeSortCursorImpl() = default;
     virtual ~MergeSortCursorImpl() = default;
 
-    MergeSortCursorImpl(Block& block, const SortDescription& desc_)
-            : desc(desc_), sort_columns_size(desc.size()) {
-        reset(block);
+    MergeSortCursorImpl(std::shared_ptr<Block> block_, const SortDescription& 
desc_)
+            : block(block_), desc(desc_), sort_columns_size(desc.size()) {
+        reset();
     }
 
     MergeSortCursorImpl(const SortDescription& desc_)
-            : desc(desc_), sort_columns_size(desc.size()) {}
+            : block(Block::create_shared()), desc(desc_), 
sort_columns_size(desc.size()) {}
     bool empty() const { return rows == 0; }
 
     /// Set the cursor to the beginning of the new block.
-    void reset(Block& block) {
-        all_columns.clear();
+    void reset() {
         sort_columns.clear();
 
-        auto columns = block.get_columns_and_convert();

Review Comment:
   here do the const convert? can be delete safe?



-- 
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