imback82 commented on a change in pull request #32032:
URL: https://github.com/apache/spark/pull/32032#discussion_r611711956
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
##########
@@ -1022,7 +1022,16 @@ case class CacheTableAsSelect(
plan: LogicalPlan,
originalText: String,
isLazy: Boolean,
- options: Map[String, String]) extends LeafCommand
+ options: Map[String, String],
+ isAnalyzed: Boolean = false) extends AnalysisOnlyCommand {
+ override protected def withNewChildrenInternal(
+ newChildren: IndexedSeq[LogicalPlan]): CacheTableAsSelect =
+ copy(plan = newChildren.head)
Review comment:
This should be called only when there exist children. Maybe an assert is
better `assert(!isAnalyzed)`? WDYT?
https://github.com/apache/spark/blob/e40fce919ab77f5faeb0bbd34dc86c56c04adbaa/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala#L345-L350
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]