okumin commented on code in PR #5748: URL: https://github.com/apache/hive/pull/5748#discussion_r2046867206
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java: ########## @@ -2149,12 +2149,16 @@ public List<Partition> getPartitions(org.apache.hadoop.hive.ql.metadata.Table hm } public boolean isPartitioned(org.apache.hadoop.hive.ql.metadata.Table hmsTable) { - if ((hmsTable.getAsOfVersion() != null || hmsTable.getAsOfTimestamp() != null) && - hasUndergonePartitionEvolution(hmsTable) || - !hmsTable.getTTable().isSetId()) { + if (!hmsTable.getTTable().isSetId()) { return false; } Table table = IcebergTableUtil.getTable(conf, hmsTable.getTTable()); + Snapshot snapshot = IcebergTableUtil.getTableSnapshot(table, hmsTable); + boolean isTimeTravel = snapshot != null && table.currentSnapshot() != null && Review Comment: I agree that it is simpler and tolerant with unexpected snapshots, such as having the same snapshot id but different timestamps. https://github.com/apache/iceberg/blob/c338323b2e9cd8a862fdf328ceacc1b59ea6275a/core/src/main/java/org/apache/iceberg/BaseSnapshot.java#L320-L332 I updated it. I kept the variable name, isTimeTravel, assuming reading a different snapshot using tag/branch sounds like a time-travel query. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org