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