aokolnychyi commented on code in PR #60229:
URL: https://github.com/apache/spark/pull/60229#discussion_r4508301274


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala:
##########
@@ -474,39 +466,31 @@ class CacheManager extends Logging with 
AdaptiveSparkPlanHelper {
       catalog: CatalogPlugin,
       ident: Identifier,
       tableId: Option[String],
-      stateOptions: CaseInsensitiveStringMap,
-      resolver: Resolver): Option[LogicalPlan] = {
-    val name = ident.toQualifiedNameParts(catalog)
-    val cachedRelations = findCachedRelations(name, resolver)
-    // Changelog loads have their own context and state options, so they 
cannot supply an

Review Comment:
   Previously, we had some checks outside of findCachedRelations and some 
inside, which made it somewhat hard to reason about these two methods. On top, 
we had redundant isSameName check because we already had 
r.catalog.contains(catalog) && r.identifier.contains(ident) checks before. So 
restructured this.



-- 
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]

Reply via email to