FANNG1 commented on code in PR #6396:
URL: https://github.com/apache/gravitino/pull/6396#discussion_r1944590990
##########
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:
From the side of Gravitino, it's reasonable to throw `unsupported exception`
but this will cause Trino query failed, because it will try to get view from
Iceberg REST server in analyzer, please refer to
https://github.com/trinodb/trino/blob/master/core/trino-main/src/main/java/io/trino/sql/analyzer/StatementAnalyzer.java#L2279
--
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]