Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18066#discussion_r120038532
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala
 ---
    @@ -64,6 +88,32 @@ case class InMemoryRelation(
         val batchStats: LongAccumulator = 
child.sqlContext.sparkContext.longAccumulator)
       extends logical.LeafNode with MultiInstanceRelation {
     
    +  /**
    +   * If true, store the input rows using [[CachedColumnarBatch]]es, which 
are generally faster.
    +   * If false, store the input rows using [[CachedBatchBytes]].
    +   */
    +  private def numOfNestedFields(dataType: DataType): Int = dataType match {
    +    case dt: StructType => dt.fields.map(f => 
numOfNestedFields(f.dataType)).sum
    +    case m: MapType => numOfNestedFields(m.keyType) + 
numOfNestedFields(m.valueType)
    +    case a: ArrayType => numOfNestedFields(a.elementType)
    +    case u: UserDefinedType[_] => numOfNestedFields(u.sqlType)
    +    case _ => 1
    +  }
    +
    +  private[columnar] val useColumnarBatches: Boolean = {
    +    // In the initial implementation, for ease of review
    +    // support only integer and double and # of fields is less than 
wholeStageMaxNumFields
    --- End diff --
    
    Oh, I see. Here is the comment about the reason.


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