This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 92fa037e5aa branch-2.1: [enhancement](memoryfailed) throw exception if 
block.serialize meet error status #51335 (#51365)
92fa037e5aa is described below

commit 92fa037e5aad88f673e637734fb5ddd3e1e56b60
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri May 30 09:35:28 2025 +0800

    branch-2.1: [enhancement](memoryfailed) throw exception if block.serialize 
meet error status #51335 (#51365)
    
    Cherry-picked from #51335
    
    Co-authored-by: Pxl <[email protected]>
---
 be/src/vec/aggregate_functions/aggregate_function_sort.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/be/src/vec/aggregate_functions/aggregate_function_sort.h 
b/be/src/vec/aggregate_functions/aggregate_function_sort.h
index e1160554956..6d66c579b35 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_sort.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_sort.h
@@ -75,9 +75,11 @@ struct AggregateFunctionSortData {
         PBlock pblock;
         size_t uncompressed_bytes = 0;
         size_t compressed_bytes = 0;
-        static_cast<void>(block.serialize(state->be_exec_version(), &pblock, 
&uncompressed_bytes,
-                                          &compressed_bytes,
-                                          
segment_v2::CompressionTypePB::NO_COMPRESSION));
+        auto st = block.serialize(state->be_exec_version(), &pblock, 
&uncompressed_bytes,
+                                  &compressed_bytes, 
segment_v2::CompressionTypePB::NO_COMPRESSION);
+        if (!st.ok()) {
+            throw doris::Exception(st);
+        }
 
         write_string_binary(pblock.SerializeAsString(), buf);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to