Skip to content

Commit ad11a79

Browse files
committed
Fixed the other bug
1 parent f989572 commit ad11a79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ trait SimpleMetricsCachedBatch extends CachedBatch {
123123
/**
124124
* Holds the same as ColumnStats.
125125
* upperBound (optional), lowerBound (Optional), nullCount: Int, rowCount: Int, sizeInBytes: Long
126+
* Which is repeated for each column in the original data.
126127
*/
127128
val stats: InternalRow
128-
override def sizeInBytes: Long = stats.getLong(4)
129+
override def sizeInBytes: Long =
130+
Range.apply(4, stats.numFields, 5).map(stats.getLong).sum
129131
}
130132

131133
// Currently, only use statistics from atomic types except binary type only.

0 commit comments

Comments
 (0)