Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

Commit 8c941b5

Browse files
author
Xinyi Jiang
committed
add check for WriteRecordBatch
1 parent fb6ba75 commit 8c941b5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

internal/storagev2/packed/packed_writer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ func NewPackedWriter(filePaths []string, schema *arrow.Schema, bufferSize int64,
128128
}
129129

130130
func (pw *PackedWriter) WriteRecordBatch(recordBatch arrow.Record) error {
131+
if recordBatch.NumCols() == 0 {
132+
return nil
133+
}
134+
131135
cArrays := make([]CArrowArray, recordBatch.NumCols())
132136
cSchemas := make([]CArrowSchema, recordBatch.NumCols())
133137

0 commit comments

Comments
 (0)