fix: Set correct memory size (#37551)

See also: #37549

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
This commit is contained in:
XuanYang-cn 2024-11-09 01:42:26 +08:00 committed by GitHub
parent ebc3c82761
commit ce2fa3de01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -705,7 +705,7 @@ func (sfw *singleFieldRecordWriter) Write(r Record) error {
sfw.numRows += r.Len()
a := r.Column(sfw.fieldId)
sfw.writtenUncompressed += uint64(a.Data().Buffers()[0].Len())
sfw.writtenUncompressed += uint64(calculateArraySize(a))
rec := array.NewRecord(sfw.schema, []arrow.Array{a}, int64(r.Len()))
defer rec.Release()
return sfw.fw.WriteBuffered(rec)