singhpk234 commented on code in PR #9830: URL: https://github.com/apache/iceberg/pull/9830#discussion_r1573359207
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java: ########## @@ -746,11 +839,26 @@ private static void checkNotPathIdentifier(Identifier identifier, String method) } } + // TODO Remove @SuppressWarnings + @SuppressWarnings("checkstyle:CyclomaticComplexity") private Table load(Identifier ident) { if (isPathIdentifier(ident)) { return loadFromPathIdentifier((PathIdentifier) ident); } + // Check if materialized view. If fresh, return the SparkMaterializedView. + if (null != asViewCatalog) { + try { + org.apache.iceberg.view.View view = asViewCatalog.loadView(buildIdentifier(ident)); + if (isMaterializedView(view) && isFresh(view)) { Review Comment: QQ: was wondering if auto-refresh of MV should be an opt-in feature ? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org