Peng-Lei commented on a change in pull request #32366:
URL: https://github.com/apache/spark/pull/32366#discussion_r621744353
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/ColumnType.scala
##########
@@ -257,6 +257,65 @@ private[columnar] object LONG extends
NativeColumnType(LongType, 8) {
}
}
+private[columnar] object YEAR_MONTH_INTERVAL extends
NativeColumnType(YearMonthIntervalType, 4) {
+ override def append(v: Int, buffer: ByteBuffer): Unit = {
+ buffer.putInt(v)
+ }
+
+ override def append(row: InternalRow, ordinal: Int, buffer: ByteBuffer):
Unit = {
+ buffer.putInt(row.getInt(ordinal))
+ }
+
+ override def extract(buffer: ByteBuffer): Int = {
+ ByteBufferHelper.getInt(buffer)
+ }
+
+ override def extract(buffer: ByteBuffer, row: InternalRow, ordinal: Int):
Unit = {
+ row.setInt(ordinal, ByteBufferHelper.getInt(buffer))
+ }
+
+ override def setField(row: InternalRow, ordinal: Int, value: Int): Unit = {
+ row.setInt(ordinal, value)
+ }
+
+ override def getField(row: InternalRow, ordinal: Int): Int =
row.getInt(ordinal)
+
+
+ override def copyField(from: InternalRow, fromOrdinal: Int,
+ to: InternalRow, toOrdinal: Int): Unit = {
Review comment:
done
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]