Skip to content

Commit 578a2f1

Browse files
cr feedback
1 parent 03b0766 commit 578a2f1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

xtable-core/src/main/java/org/apache/xtable/iceberg/IcebergConversionSource.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
import org.apache.hadoop.conf.Configuration;
3737

38-
import org.apache.iceberg.BaseTable;
3938
import org.apache.iceberg.DataFile;
4039
import org.apache.iceberg.FileScanTask;
4140
import org.apache.iceberg.PartitionSpec;
@@ -98,9 +97,6 @@ private Table initSourceTable() {
9897
(IcebergCatalogConfig) sourceTableConfig.getCatalogConfig(),
9998
tableIdentifier,
10099
sourceTableConfig.getBasePath());
101-
if (sourceTableConfig.getCatalogConfig() == null && table instanceof BaseTable) {
102-
table = new BaseTable(((BaseTable) table).operations(), tableIdentifier.name());
103-
}
104100

105101
return table;
106102
}
@@ -129,7 +125,7 @@ public InternalTable getTable(Snapshot snapshot) {
129125
return InternalTable.builder()
130126
.tableFormat(TableFormat.ICEBERG)
131127
.basePath(iceTable.location())
132-
.name(iceTable.name())
128+
.name(iceTable.name().contains(iceTable.location()) ? sourceTableConfig.getName() : iceTable.name())
133129
.partitioningFields(irPartitionFields)
134130
.latestCommitTime(Instant.ofEpochMilli(snapshot.timestampMillis()))
135131
.readSchema(irSchema)

0 commit comments

Comments
 (0)