github-actions[bot] commented on code in PR #64920:
URL: https://github.com/apache/doris/pull/64920#discussion_r3489115297


##########
be/src/exprs/vexpr_context.cpp:
##########
@@ -399,7 +406,12 @@ Status VExprContext::get_output_block_after_execute_exprs(
         const auto& name = vexpr_ctx->expr_name();
 
         vexpr_ctx->_memory_usage += result_column->allocated_bytes();
-        result_columns.emplace_back(result_column, type, name);
+        if (do_projection) {
+            result_columns.emplace_back(result_column->clone_resized(rows), 
type, name);

Review Comment:
   This new `do_projection` path needs a focused regression test. The branch 
exists because a multi-cast source can project the same output column more than 
once and then hand the block back to a reuse/clear path, where shared aliases 
trip the COW ownership check in `Block::clear_column_data`. This PR changes 
only production files, and the existing multi-cast tests exercise 
`MultiCastDataStreamer` directly rather than 
`MultiCastDataStreamerSourceOperatorX::get_block_impl()` with duplicate 
`_output_expr_contexts`, so CI would not catch a future change that removes 
this detach again. Please add a BE UT or regression that runs the multi-cast 
source projection with duplicated output expressions and verifies the reused 
block can be cleared/reused without sharing the same column object.



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