Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7981#discussion_r36536582
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/Exchange.scala ---
    @@ -39,21 +40,34 @@ import org.apache.spark.{HashPartitioner, Partitioner, 
RangePartitioner, SparkEn
     @DeveloperApi
     case class Exchange(newPartitioning: Partitioning, child: SparkPlan) 
extends UnaryNode {
     
    -  override def outputPartitioning: Partitioning = newPartitioning
    -
    -  override def output: Seq[Attribute] = child.output
    -
    -  override def outputsUnsafeRows: Boolean = child.outputsUnsafeRows
    +  override def nodeName: String = if (tungstenMode) "TungstenExchange" 
else "Exchange"
     
    -  override def canProcessSafeRows: Boolean = true
    -
    -  override def canProcessUnsafeRows: Boolean = {
    +  /**
    +   * Returns true iff the children outputs aggregate UDTs that are not 
part of the SQL type.
    +   * This only happens with the old aggregate implementation and should be 
removed in 1.6.
    +   */
    +  private lazy val tungstenMode: Boolean = {
    +    val unserializableUDT = child.schema.exists(_.dataType match {
    --- End diff --
    
    Should we check the UDT existence deeply? just in case it exists in the 
complex data type.


---
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