-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: Fix REST catalog handling when the service has no view support #9853
Core: Fix REST catalog handling when the service has no view support #9853
Conversation
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java
Outdated
Show resolved
Hide resolved
Okay, I can confirm that this fixes the problem locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just a bit late to this, but I also verified the behavior before/after this change in Spark. This change looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
LGTM. How can we catch these errors early? |
…pache#9853) * Core: Fix REST catalog handling when the service has no view support. * Fix error message. * Improve the error message.
…pache#9853) * Core: Fix REST catalog handling when the service has no view support. * Fix error message. * Improve the error message.
This is a fix for Spark table loading when a REST catalog does not support view extensions.
The problem is that Spark runs
ResolveViews
beforeResolveTables
in the substitution batch of rules. With view support in the REST catalog, table references will result in aloadView
call to check if the unresolved identifier is a view. If the catalog service does not support views, then a 4XX exception is thrown but not caught and used to indicate the view does not exist.This translates 4XX calls returned by the load view path to
NoSuchViewException
indicating that the service does not support views.