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

    https://github.com/apache/spark/pull/7673#discussion_r35664015
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/columnar/ColumnType.scala ---
    @@ -434,18 +441,18 @@ private[sql] object BINARY extends 
ByteArrayColumnType[BinaryType.type](11, 16)
     // Used to process generic objects (all types other than those listed 
above). Objects should be
     // serialized first before appending to the column `ByteBuffer`, and is 
also extracted as serialized
     // byte array.
    -private[sql] object GENERIC extends ByteArrayColumnType[DataType](12, 16) {
    +private[sql] case class GENERIC(dataType: DataType) extends 
ByteArrayColumnType(12, 16) {
       override def setField(row: MutableRow, ordinal: Int, value: 
Array[Byte]): Unit = {
    -    row(ordinal) = SparkSqlSerializer.deserialize[Any](value)
    +    row.update(ordinal, SparkSqlSerializer.deserialize[Any](value))
    --- End diff --
    
    Not related to this PR, but it seems that we can replace 
`SparkSqlSerializer` with `SparkSqlSerializer2` here to gain better performance 
and small memory footprint here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to