aokolnychyi commented on code in PR #55278:
URL: https://github.com/apache/spark/pull/55278#discussion_r3164968993


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statements.scala:
##########
@@ -188,7 +188,11 @@ case class InsertIntoStatement(
     byName: Boolean = false,
     replaceCriteriaOpt: Option[InsertReplaceCriteria] = None,
     withSchemaEvolution: Boolean = false)
-  extends UnaryParsedStatement {
+  // Extends TransactionalWrite so that QueryExecution can detect a potential 
transaction on the
+  // unresolved logical plan before analysis runs. InsertIntoStatement is 
shared between V1 and V2
+  // inserts, but the LookupCatalog.TransactionalWrite extractor only matches 
when the target
+  // catalog implements TransactionalCatalogPlugin, so V1 inserts are never 
assigned a transaction.
+  extends UnaryParsedStatement with TransactionalWrite {

Review Comment:
   Let's tackle this separately.



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

Reply via email to