You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "osscm (via GitHub)" <gi...@apache.org> on 2026/07/05 21:40:04 UTC
Re: [PR] Views, Spark: Add support for Materialized Views; Integrate with Spark SQL [iceberg]
osscm commented on code in PR #9830:
URL: https://github.com/apache/iceberg/pull/9830#discussion_r3525674504
##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java:
##########
@@ -576,7 +577,14 @@ public View loadView(Identifier ident) throws NoSuchViewException {
if (null != asViewCatalog) {
try {
org.apache.iceberg.view.View view = asViewCatalog.loadView(buildIdentifier(ident));
- return new SparkView(catalogName, view);
+ // Check if the view is a materialized view. If it is, and storage table is fresh, throw
+ // IllegalStateException
+ if (isMaterializedView(view) && isFresh(view)) {
Review Comment:
+1 - to understand why we need to throw Exception if its fresh.
https://github.com/wmoustafa/iceberg-1/pull/2 -> I think, this make sense, as we need to identify MV in the analyze phase.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org