roryqi commented on code in PR #9988:
URL: https://github.com/apache/gravitino/pull/9988#discussion_r2822683767
##########
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:
So I prefer using different expressions with different actions.
--
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]