Skip to content

Commit 14c5bf0

Browse files
committed
Fix ensure for column data batching (#25868)
1 parent 0acef37 commit 14c5bf0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ydb/core/kqp/runtime/kqp_write_table.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,6 @@ class TColumnShardPayloadSerializer : public IPayloadSerializer {
517517
i64 nextRowSize = rowCalculator.GetRowBytesSize(index);
518518

519519
if (toPrepareSize + nextRowSize >= (i64)ColumnShardMaxOperationBytes) {
520-
AFL_ENSURE(index > 0);
521-
522520
toPrepare.push_back(batch->Slice(0, index));
523521
unpreparedBatch.Batches.push_front(batch->Slice(index, batch->num_rows() - index));
524522

@@ -541,6 +539,7 @@ class TColumnShardPayloadSerializer : public IPayloadSerializer {
541539
toPrepare.push_back(batch);
542540
}
543541

542+
AFL_ENSURE(!toPrepare.empty() && toPrepare.front()->num_rows() > 0);
544543
auto batch = MakeIntrusive<TColumnBatch>(NArrow::CombineBatches(toPrepare), Alloc);
545544
Batches[shardId].emplace_back(batch);
546545
Memory += batch->GetMemory();

0 commit comments

Comments
 (0)