File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
xtable-core/src/main/java/org/apache/xtable/iceberg Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change 3535
3636import org .apache .hadoop .conf .Configuration ;
3737
38- import org .apache .iceberg .BaseTable ;
3938import org .apache .iceberg .DataFile ;
4039import org .apache .iceberg .FileScanTask ;
4140import 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 )
You can’t perform that action at this time.
0 commit comments