yyanyy commented on code in PR #57865:
URL: https://github.com/apache/spark/pull/57865#discussion_r3786761950
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RelationResolution.scala:
##########
@@ -548,7 +548,15 @@ class RelationResolution(
*/
private def loadRelation(ref: V2TableReference): LogicalPlan = {
val resolvedCatalog =
catalogManager.catalog(ref.catalog.name).asTableCatalog
- val table = resolvedCatalog.loadTable(ref.identifier)
+ val table = ref.context match {
+ case V2TableReference.WriteTargetContext =>
+ // WriteTargetContext is currently used by transactional streaming
writes and does not
+ // retain required write privileges. Keep the legacy load unchanged;
options and
+ // privileges must be handled together in a follow-up.
+ resolvedCatalog.loadTable(ref.identifier)
+ case _ =>
+ CatalogV2Util.getTable(resolvedCatalog, ref.identifier, options =
ref.options)
Review Comment:
I should have taken rebase into consideration before addressing the original
comment too, thanks for the catch!
--
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]