scarlin-cloudera commented on code in PR #3936:
URL: https://github.com/apache/hive/pull/3936#discussion_r1072857383
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/materialized/alter/rewrite/AlterMaterializedViewRewriteAnalyzer.java:
##########
@@ -68,10 +68,12 @@ public void analyzeInternal(ASTNode root) throws
SemanticException {
Table materializedViewTable = getTable(tableName, true);
// One last test: if we are enabling the rewrite, we need to check that
query
- // only uses transactional (MM and ACID) tables
+ // only uses transactional (MM and ACID and Iceberg) tables
if (rewriteEnable) {
for (SourceTable sourceTable :
materializedViewTable.getMVMetadata().getSourceTables()) {
- if (!AcidUtils.isTransactionalTable(sourceTable.getTable())) {
+ Table table = new Table(sourceTable.getTable());
+ if (!AcidUtils.isTransactionalTable(sourceTable.getTable()) &&
+ !(table.isNonNative() &&
table.getStorageHandler().areSnapshotsSupported())) {
Review Comment:
Out of curiosity (and I don't know this code at all), what is the reason for
the "isNonNative()" check? I guess there's a native table where
"areSnapshotsSupported()" returns true? From the name, it sounds like this
alone should have been enough.
--
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]