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


##########
be/src/core/block/block.cpp:
##########
@@ -1048,9 +1050,11 @@ Status Block::serialize(int be_exec_version, PBlock* 
pblock,
     }
     char* buf = column_values.data();
 
-    for (const auto& c : *this) {
-        buf = c.type->serialize(*(c.column), buf, pblock->be_exec_version());
-    }

Review Comment:
   This fixes the production path, but please add a direct BE unit test for the 
new `Block::serialize` exception-to-`Status` contract. The PR only changes 
`block.cpp`, and the existing Block tests cover successful serialization but 
not the failure path this patch is meant to guarantee. There is already a cheap 
deterministic trigger: a `Block` containing a `DataTypeNothing`/`ColumnNothing` 
column gets past `get_uncompressed_serialized_bytes()` because it returns 0, 
then `DataTypeNothing::serialize()` throws `Exception("serialize not 
support")`. A test in `be/test/core/block/block_test.cpp` that asserts 
`Block::serialize(...)` returns a non-OK `Status` without throwing would lock 
in the no-coredump behavior without needing to construct a multi-GB string 
column.



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