[enhancement](memory) return error if allocate memory failed during add rows method (#35085)

* return error when add rows failed

* f

---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
This commit is contained in:
yiguolei
2024-05-21 10:53:40 +08:00
committed by yiguolei
parent b11f2ad9f0
commit f38ecd349c
18 changed files with 104 additions and 80 deletions

View File

@ -1132,7 +1132,7 @@ Status AggregationNode::_spill_hash_table(HashTableCtxType& agg_method, HashTabl
for (size_t j = 0; j < partitioned_indices.size(); ++j) {
if (partitioned_indices[j] != i) {
if (length > 0) {
mutable_block.add_rows(&block, begin, length);
RETURN_IF_ERROR(mutable_block.add_rows(&block, begin, length));
}
length = 0;
continue;
@ -1145,7 +1145,7 @@ Status AggregationNode::_spill_hash_table(HashTableCtxType& agg_method, HashTabl
}
if (length > 0) {
mutable_block.add_rows(&block, begin, length);
RETURN_IF_ERROR(mutable_block.add_rows(&block, begin, length));
}
CHECK_EQ(mutable_block.rows(), blocks_rows[i]);