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

    https://github.com/apache/spark/pull/13807#discussion_r67932028
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala
 ---
    @@ -110,16 +110,28 @@ object ExpressionEncoder {
     
         val cls = 
Utils.getContextOrSparkClassLoader.loadClass(s"scala.Tuple${encoders.size}")
     
    -    val serializer = encoders.map {
    -      case e if e.flat => e.serializer.head
    -      case other => CreateStruct(other.serializer)
    -    }.zipWithIndex.map { case (expr, index) =>
    -      expr.transformUp {
    -        case BoundReference(0, t, _) =>
    -          Invoke(
    -            BoundReference(0, ObjectType(cls), nullable = true),
    -            s"_${index + 1}",
    -            t)
    +    val serializer = encoders.zipWithIndex.map { case (enc, index) =>
    +      val originalInputObject = enc.serializer.head.collect { case b: 
BoundReference => b }.head
    --- End diff --
    
    Do we have any assumption at 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