cloud-fan commented on code in PR #52920:
URL: https://github.com/apache/spark/pull/52920#discussion_r2525240819
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala:
##########
@@ -687,7 +688,13 @@ case class ReplaceTableAsSelect(
isAnalyzed: Boolean = false)
extends V2CreateTableAsSelectPlan {
- override def markAsAnalyzed(ac: AnalysisContext): LogicalPlan =
copy(isAnalyzed = true)
+ override def markAsAnalyzed(ac: AnalysisContext): LogicalPlan = {
+ // RTAS may drop and recreate table before query execution, breaking
self-references
+ // refresh and pin versions here to read from correct table versions
Review Comment:
```suggestion
// refresh and pin versions here to read from correct table versions
instead of the newly created empty table.
```
--
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]