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

    https://github.com/apache/spark/pull/20984#discussion_r180420612
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ArrayData.scala 
---
    @@ -164,3 +167,46 @@ abstract class ArrayData extends SpecializedGetters 
with Serializable {
         }
       }
     }
    +
    +/**
    + * Implements an `IndexedSeq` interface for `ArrayData`. Notice that if 
the original `ArrayData`
    + * is a primitive array and contains null elements, it is better to ask 
for `IndexedSeq[Any]`,
    + * instead of `IndexedSeq[Int]`, in order to keep the null elements.
    + */
    +class ArrayDataIndexedSeq[T](arrayData: ArrayData, dataType: DataType) 
extends IndexedSeq[T] {
    +
    +  private def getAccessor(dataType: DataType): (Int) => Any = dataType 
match {
    --- End diff --
    
    Ok. I will also want to reuse the accessor getter in #20981 too.


---

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

Reply via email to