msamirkhan commented on a change in pull request #29354:
URL: https://github.com/apache/spark/pull/29354#discussion_r465983317



##########
File path: 
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala
##########
@@ -182,19 +182,21 @@ class AvroDeserializer(
         updater.setDecimal(ordinal, decimal)
 
       case (RECORD, st: StructType) =>
+        val createRow = getRowCreator(st)
         // Avro datasource doesn't accept filters with nested attributes. See 
SPARK-32328.
         // We can always return `false` from `applyFilters` for nested records.
         val writeRecord = getRecordWriter(avroType, st, path, applyFilters = _ 
=> false)
         (updater, ordinal, value) =>
-          val row = new SpecificInternalRow(st)
+          val row = createRow()

Review comment:
       Please see Comment on lines +386 to +413




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to