huaxingao commented on code in PR #19001:
URL: https://github.com/apache/iceberg/pull/19001#discussion_r4733615754


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java:
##########
@@ -487,15 +525,39 @@ public boolean viewExists(Identifier ident) {
 
   @Override
   public View loadView(Identifier ident) throws NoSuchViewException {
-    if (null != asViewCatalog && asViewCatalog.viewExists(ident)) {
+    return loadView(ident, LoadContext.empty());
+  }
+
+  @Override
+  public View loadView(Identifier ident, LoadContext context) throws 
NoSuchViewException {
+    if (null != asViewCatalog && null != asLoadContextCatalog) {

Review Comment:
   I think loadView has the same issue: with the flag off, a SparkCatalog 
subclass that overrides loadView(Identifier) is skipped. Could we add the same 
`!context.referencedBy().isEmpty()` check here?



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