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

    https://github.com/apache/spark/pull/20831#discussion_r174994822
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala
 ---
    @@ -68,6 +69,15 @@ case class InMemoryRelation(
     
       override protected def innerChildren: Seq[SparkPlan] = Seq(child)
     
    +  override def doCanonicalize(): logical.LogicalPlan =
    +    copy(output = output.map(QueryPlan.normalizeExprId(_, child.output)),
    +      storageLevel = StorageLevel.NONE,
    +      child = child.canonicalized,
    +      tableName = None)(
    +      _cachedColumnBuffers,
    +      sizeInBytesStats,
    +      statsOfPlanToCache)
    --- End diff --
    
    `cachedColumnBuffers`, `sizeInBytesStats`, `statsOfPlanToCache` won't be 
considered when comparing two `InMemoryRelation`. So instead of create empty 
instances of statistics, I just use the original values.


---

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

Reply via email to