You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2018/08/03 05:19:12 UTC

[GitHub] spark pull request #21952: [SPARK-24993] [SQL] Make Avro Fast Again

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-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org