aokolnychyi commented on code in PR #52764:
URL: https://github.com/apache/spark/pull/52764#discussion_r2470629263
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RelationResolution.scala:
##########
@@ -129,6 +131,32 @@ class RelationResolution(override val catalogManager:
CatalogManager)
}
.getOrElse(cachedRelation)
}
+ .orElse {
+ if (u.options.get(UnresolvedRelation.REQUIRED_WRITE_PRIVILEGES)
== null) {
+ val qualifiedNameParts = ident.toQualifiedNameParts(catalog)
+ sharedRelationCache.lookup(qualifiedNameParts,
finalTimeTravelSpec) match {
+ case Some(cache) =>
+ val cachedRelation = cache.transform {
+ case multi: MultiInstanceRelation =>
+ val newRelation = multi.newInstance()
+ newRelation.copyTagsFrom(multi)
+ newRelation
+ }
+ val r = u.getTagValue(LogicalPlan.PLAN_ID_TAG)
Review Comment:
I have a separate PR that refactors this rule a bit, I'll rebase before
merging.
There is a bit of duplicated logic here now.
--
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]