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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]