Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/21952#discussion_r207443196 --- Diff: external/avro/src/main/scala/org/apache/spark/sql/avro/AvroSerializer.scala --- @@ -100,17 +100,20 @@ class AvroSerializer(rootCatalystType: DataType, rootAvroType: Schema, nullable: et, resolveNullableType(avroType.getElementType, containsNull)) (getter, ordinal) => { val arrayData = getter.getArray(ordinal) - val result = new java.util.ArrayList[Any] --- End diff -- can we just `new java.util.ArrayList[Any](len)` here instead of creating an array and wrap it with array list?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org