Github user dbtsai commented on a diff in the pull request:
https://github.com/apache/spark/pull/21847#discussion_r205683257
--- Diff:
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroSerializer.scala ---
@@ -148,7 +165,8 @@ class AvroSerializer(rootCatalystType: DataType,
rootAvroType: Schema, nullable:
val avroFields = avroStruct.getFields
assert(avroFields.size() == catalystStruct.length)
val fieldConverters = catalystStruct.zip(avroFields.asScala).map {
- case (f1, f2) => newConverter(f1.dataType,
resolveNullableType(f2.schema(), f1.nullable))
+ case (f1, f2) => newConverter(f1.dataType, resolveNullableType(
+ f2.schema(), f1.dataType, f1.nullable))
--- End diff --
Nit, formating,
```scala
case (f1, f2) =>
newConverter(f1.dataType, resolveNullableType(f2.schema(), f1.dataType,
f1.nullable))
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]