Github user gengliangwang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22094#discussion_r209810119
  
    --- Diff: 
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroSerializer.scala ---
    @@ -212,7 +222,7 @@ class AvroSerializer(rootCatalystType: DataType, 
rootAvroType: Schema, nullable:
       }
     
       private def resolveNullableType(avroType: Schema, nullable: Boolean): 
Schema = {
    -    if (nullable) {
    +    if (nullable && avroType.getType != NULL) {
    --- End diff --
    
    This fixes a trivial bug if `avroType` is NULL type.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to