cloud-fan commented on code in PR #58204:
URL: https://github.com/apache/spark/pull/58204#discussion_r3844754215
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statements.scala:
##########
@@ -209,21 +208,15 @@ case class InsertIntoStatement(
require(replaceCriteriaOpt.isEmpty || overwrite,
"REPLACE USING/ON/WHERE requires overwrite to be true")
- override def child: LogicalPlan = query
- override protected def withNewChildInternal(newChild: LogicalPlan):
InsertIntoStatement =
- copy(query = newChild)
+ override def children: Seq[LogicalPlan] = Seq(table, query)
Review Comment:
Thanks, I updated the design so the INSERT target remains a child without
exposing it as a read relation during general analysis.
The parser creates UnresolvedWriteTarget, which remains the intermediate
target representation until ResolveRelations resolves it to a metadata-only
ResolvedTable, ResolvedPersistentView, or ResolvedTempView.
InsertIntoStatement is also intermediate. When write-specific rules convert
it into the actual V1/V2 insert command, they construct the required provider
relation locally and consume it during that conversion. The relation is
therefore never exposed as the target child for generic analyzer traversal.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]