cloud-fan commented on a change in pull request #26134: [SPARK-29486][SQL] CalendarInterval should have 3 fields: months, days and microseconds URL: https://github.com/apache/spark/pull/26134#discussion_r339435212
########## File path: sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen/UnsafeWriter.java ########## @@ -132,16 +132,17 @@ private void writeUnalignedBytes( public final void write(int ordinal, CalendarInterval input) { // grow the global buffer before writing data. - grow(16); + grow(24); - // Write the months and microseconds fields of Interval to the variable length portion. + // Write the months, days and microseconds fields of Interval to the variable length portion. Platform.putLong(getBuffer(), cursor(), input.months); Review comment: we write `months` as long to align with word(8 bytes) boundary. Now we have an extra int in the interval, so padding is not needed now. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org