Skip to content

Commit

Permalink
cr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jalpan-randeri committed Feb 8, 2025
1 parent 03b0766 commit 578a2f1
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

import org.apache.hadoop.conf.Configuration;

import org.apache.iceberg.BaseTable;
import org.apache.iceberg.DataFile;
import org.apache.iceberg.FileScanTask;
import org.apache.iceberg.PartitionSpec;
Expand Down Expand Up @@ -98,9 +97,6 @@ private Table initSourceTable() {
(IcebergCatalogConfig) sourceTableConfig.getCatalogConfig(),
tableIdentifier,
sourceTableConfig.getBasePath());
if (sourceTableConfig.getCatalogConfig() == null && table instanceof BaseTable) {
table = new BaseTable(((BaseTable) table).operations(), tableIdentifier.name());
}

return table;
}
Expand Down Expand Up @@ -129,7 +125,7 @@ public InternalTable getTable(Snapshot snapshot) {
return InternalTable.builder()
.tableFormat(TableFormat.ICEBERG)
.basePath(iceTable.location())
.name(iceTable.name())
.name(iceTable.name().contains(iceTable.location()) ? sourceTableConfig.getName() : iceTable.name())
.partitioningFields(irPartitionFields)
.latestCommitTime(Instant.ofEpochMilli(snapshot.timestampMillis()))
.readSchema(irSchema)
Expand Down

0 comments on commit 578a2f1

Please sign in to comment.