cloud-fan commented on code in PR #53646:
URL: https://github.com/apache/spark/pull/53646#discussion_r2666984652
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1123,21 +1125,17 @@ class Analyzer(
case u: UnresolvedCatalogRelation =>
throw QueryCompilationErrors.writeIntoV1TableNotAllowedError(
u.tableMeta.identifier, write)
- case plan =>
- resolveAsV2Relation(plan).map(write.withNewTable).getOrElse {
- throw
QueryCompilationErrors.writeIntoTempViewNotAllowedError(
- u.multipartIdentifier.quoted)
- }
+ case r: DataSourceV2Relation => write.withNewTable(r)
+ case _ =>
+ throw QueryCompilationErrors.writeIntoTempViewNotAllowedError(
+ u.multipartIdentifier.quoted)
}.getOrElse(write)
case _ => write
}
case u: UnresolvedRelation =>
resolveRelation(u).map(resolveViews(_, u.options)).getOrElse(u)
- case r: V2TableReference =>
Review Comment:
@aokolnychyi if I keep this resolution here, it should work for the future
DML changes?
--
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]