kasakrisz commented on code in PR #5136:
URL: https://github.com/apache/hive/pull/5136#discussion_r1541094290


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -2171,22 +2172,32 @@ private Materialization 
getMaterializationInvalidationInfo(MaterializedViewMetad
         materialization.setSourceTablesCompacted(true);
         return materialization;
       }
-      Boolean b = storageHandler.hasAppendsOnly(
-          table, 
mvSnapshot.getTableSnapshots().get(table.getFullyQualifiedName()));
-      if (b == null) {
+
+      boolean hasAppendsOnly = true;
+      boolean noSnapshots = true;
+      for (SnapshotContext snapshot : storageHandler.getSnapshots(

Review Comment:
   Source table types are checked at MV creation. Also the default 
implementation of getSnapshots returns empty list which means we have to fall 
back to full rebuild. This is also the case when Iceberg table is empty so 
there are no snapshots. But I added a check It doesn't hurt.



-- 
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]

Reply via email to