roryqi commented on code in PR #9988:
URL: https://github.com/apache/gravitino/pull/9988#discussion_r2822704740
##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/dispatcher/IcebergTableOperationExecutor.java:
##########
@@ -122,13 +123,39 @@ public void dropTable(
@Override
public LoadTableResponse loadTable(
IcebergRequestContext context, TableIdentifier tableIdentifier) {
+ String catalogName = context.catalogName();
+
+ // Per Iceberg REST spec, /tables/ endpoint should only serve tables, not
views.
+ // Check if the identifier is a view and throw NoSuchTableException to
trigger
+ // Spark's fallback logic to use /views/ endpoint instead.
+ if
(icebergCatalogWrapperManager.getCatalogWrapper(catalogName).viewExists(tableIdentifier))
{
Review Comment:
We can fix this in the next pull request.
--
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]