deniskuzZ commented on code in PR #5748: URL: https://github.com/apache/hive/pull/5748#discussion_r2046457934
########## 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: @okumin, could we use `equals` here? ```` public boolean isPartitioned(org.apache.hadoop.hive.ql.metadata.Table hmsTable) { if (!hmsTable.getTTable().isSetId()) { return false; } Table table = IcebergTableUtil.getTable(conf, hmsTable.getTTable()); Snapshot snapshot = IcebergTableUtil.getTableSnapshot(table, hmsTable); boolean isTimeTravelOrBranch = snapshot != null && snapshot.equals(table.currentSnapshot()); if (isTimeTravelOrBranch && hasUndergonePartitionEvolution(hmsTable)) { return false; } return table.spec().isPartitioned(); } ```` -- 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