Skip to content

Commit e541e04

Browse files
committed
Rebase updates.
1 parent e0d34a5 commit e541e04

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,10 @@ object ScalaReflection extends ScalaReflection {
395395
val externalDataType = dataTypeFor(elementType)
396396
val Schema(catalystType, nullable) = silentSchemaFor(elementType)
397397
if (isNativeType(externalDataType)) {
398-
expressions.If(
399-
IsNull(input),
400-
expressions.Literal.create(null, ArrayType(catalystType, nullable)),
401-
NewInstance(
402-
classOf[GenericArrayData],
403-
input :: Nil,
404-
dataType = ArrayType(catalystType, nullable)))
398+
NewInstance(
399+
classOf[GenericArrayData],
400+
input :: Nil,
401+
dataType = ArrayType(catalystType, nullable))
405402
} else {
406403
val clsName = getClassNameFromType(elementType)
407404
val newPath = s"""- array element class: "$clsName"""" +: walkedTypePath

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/RowEncoder.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ object RowEncoder {
9292
NewInstance(
9393
classOf[GenericArrayData],
9494
inputObject :: Nil,
95-
propagateNull = true,
9695
dataType = t)
9796
case _ => MapObjects(extractorsFor(_, et), inputObject, externalDataTypeFor(et))
9897
}
@@ -115,7 +114,6 @@ object RowEncoder {
115114
NewInstance(
116115
classOf[ArrayBasedMapData],
117116
convertedKeys :: convertedValues :: Nil,
118-
propagateNull = true,
119117
dataType = t)
120118

121119
case StructType(fields) =>

0 commit comments

Comments
 (0)