Skip to content

Commit 2529b76

Browse files
committed
Removes DateType support from SpecificMutableRow
1 parent 9522949 commit 2529b76

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SpecificMutableRow.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ final class SpecificMutableRow(val values: Array[MutableValue]) extends MutableR
202202
case DoubleType => new MutableDouble
203203
case BooleanType => new MutableBoolean
204204
case LongType => new MutableLong
205-
case DateType => new MutableInt
206205
case _ => new MutableAny
207206
}.toArray)
208207

sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetConverter.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ private[parquet] class CatalystRowConverter(
146146
case DateType =>
147147
new PrimitiveConverter {
148148
override def addInt(value: Int): Unit = {
149-
updater.setInt(value.asInstanceOf[DateType#JvmType])
149+
// DateType is not specialized in `SpecificMutableRow`, have to box it here.
150+
updater.set(value.asInstanceOf[DateType#JvmType])
150151
}
151152
}
152153

0 commit comments

Comments
 (0)