Skip to content

Commit

Permalink
infer row size by schema.defaultSize
Browse files Browse the repository at this point in the history
  • Loading branch information
cfmcgrady committed Apr 4, 2023
1 parent 4e7ca54 commit 885cf2c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ object ArrowConvertersHelper extends Logging {
arrowWriter.write(row)
estimatedBatchSize += (row match {
case ur: UnsafeRow => ur.getSizeInBytes
// Trying to estimate the size of the current row, assuming 16 bytes per value.
case ir: InternalRow => ir.numFields * 16
// Trying to estimate the size of the current row
case _: InternalRow => schema.defaultSize
})
rowCountInLastBatch += 1
rowCount += 1
Expand Down

0 comments on commit 885cf2c

Please sign in to comment.