marton-bod commented on code in PR #3202:
URL: https://github.com/apache/hive/pull/3202#discussion_r848463614


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -460,6 +461,13 @@ public void validateSinkDesc(FileSinkDesc sinkDesc) throws 
SemanticException {
       if (IcebergTableUtil.isBucketed(table)) {
         throw new SemanticException("Cannot perform insert overwrite query on 
bucket partitioned Iceberg table.");
       }
+      if (table.currentSnapshot() != null) {
+        if 
(table.currentSnapshot().allManifests().parallelStream().map(ManifestFile::partitionSpecId)
+            .filter(id -> id < table.spec().specId()).findAny().isPresent()) {
+          throw new SemanticException(
+              "Cannot perform insert overwrite query on Iceberg table where 
partition evolution happened.");

Review Comment:
   I guess you're right. We can only resolve this using merge + compaction as 
far as I know (neither of which are available in Hive currently). So let's 
leave the message as it is, and then we can later extend it by adding some 
useful tips on how to do the rewrite



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