Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/20831#discussion_r174969959
--- 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 --
`statsOfPlanToCache` and `sizeInBytesStats`, too? For instance,
`ResolveHint` drops hints in canonicalization:
https://github.com/apache/spark/blob/3675af7247e841e9a689666dc20891ba55c612b3/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/hints.scala#L44
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]