gene-db commented on code in PR #47559: URL: https://github.com/apache/spark/pull/47559#discussion_r1699036405
########## sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/ColumnType.scala: ########## @@ -829,6 +829,12 @@ private[columnar] object VARIANT /** Chosen to match the default size set in `VariantType`. */ override def defaultSize: Int = 2048 + override def actualSize(row: InternalRow, ordinal: Int): Int = { + val v = getField(row, ordinal) + // 4 bytes each for the integers representing the 'value' and 'metadata' lengths. + 8 + v.getValue().length + v.getMetadata().length Review Comment: NIT: ```suggestion 8 + v.getValue().length + v.getMetadata().length ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org