rdblue commented on a change in pull request #24798: [SPARK-27724][SQL]
Implement REPLACE TABLE and REPLACE TABLE AS SELECT with V2
URL: https://github.com/apache/spark/pull/24798#discussion_r291407083
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/WriteToDataSourceV2Exec.scala
##########
@@ -76,25 +79,94 @@ case class CreateTableAsSelectExec(
throw new TableAlreadyExistsException(ident)
}
+ catalog match {
+ case txnCatalog: TransactionalTableCatalog =>
Review comment:
Because so little is shared between the two implementations, I think I would
probably separate them into different exec nodes. An added benefit of that is
that the physical plan would tell users whether Spark is going to use an atomic
operation. That way I could check `EXPLAIN` and run if it is atomic or do more
testing if it is not.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]