FANNG1 commented on code in PR #6396: URL: https://github.com/apache/gravitino/pull/6396#discussion_r1945889037
########## iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ops/IcebergCatalogWrapper.java: ########## @@ -215,6 +216,11 @@ public LoadViewResponse updateView(TableIdentifier viewIdentifier, UpdateTableRe } public LoadViewResponse loadView(TableIdentifier viewIdentifier) { + // Trino Analyzer try to get view from Iceberg catalog, return NoSuchViewException to keep + // the compatibility with Trino. + if (!(catalog instanceof ViewCatalog)) { + throw new NoSuchViewException("Catalog %s doesn't support view", catalog.name()); Review Comment: This will cause the simple SQL to fail in Trino like `select * from xx`. The latest Trino code adds a configuration to enable compatibility with REST server that does not support view operations. But for the old trino releases, it couldn't work with Gravitino. This PR moves the compatibility work from client to server, I agree that this is a workaround solution, is more general solution is https://github.com/apache/gravitino/issues/6395 but it benefits the cooperation with Trino and Gravitino IRS. -- 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: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org