Skip to content

Commit d478d2e

Browse files
authored
Fix typo in InternalTable (#720)
1 parent 3dd2f4b commit d478d2e

9 files changed

Lines changed: 13 additions & 13 deletions

File tree

xtable-api/src/main/java/org/apache/xtable/model/InternalTable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ public class InternalTable {
5151
// latest commit(write) on the table.
5252
Instant latestCommitTime;
5353
// Path to latest metadata
54-
String latestMetdataPath;
54+
String latestMetadataPath;
5555
}

xtable-core/src/main/java/org/apache/xtable/delta/DeltaTableExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public InternalTable table(DeltaLog deltaLog, String tableName, Long version) {
6262
.partitioningFields(partitionFields)
6363
.readSchema(schema)
6464
.latestCommitTime(Instant.ofEpochMilli(snapshot.timestamp()))
65-
.latestMetdataPath(snapshot.deltaLog().logPath().toString())
65+
.latestMetadataPath(snapshot.deltaLog().logPath().toString())
6666
.build();
6767
}
6868
}

xtable-core/src/main/java/org/apache/xtable/hudi/HudiTableExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public InternalTable table(HoodieTableMetaClient metaClient, HoodieInstant commi
8787
.partitioningFields(partitionFields)
8888
.readSchema(canonicalSchema)
8989
.latestCommitTime(HudiInstantUtils.parseFromInstantTime(commit.getTimestamp()))
90-
.latestMetdataPath(metaClient.getMetaPath().toString())
90+
.latestMetadataPath(metaClient.getMetaPath().toString())
9191
.build();
9292
}
9393

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public InternalTable getTable(Snapshot snapshot) {
131131
.latestCommitTime(Instant.ofEpochMilli(snapshot.timestampMillis()))
132132
.readSchema(irSchema)
133133
.layoutStrategy(dataLayoutStrategy)
134-
.latestMetdataPath(iceOps.current().metadataFileLocation())
134+
.latestMetadataPath(iceOps.current().metadataFileLocation())
135135
.build();
136136
}
137137

xtable-core/src/test/java/org/apache/xtable/delta/ITDeltaConversionSource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void getCurrentSnapshotNonPartitionedTest() throws URISyntaxException {
188188
.build(),
189189
DataLayoutStrategy.FLAT,
190190
"file:" + basePath,
191-
snapshot.getTable().getLatestMetdataPath(),
191+
snapshot.getTable().getLatestMetadataPath(),
192192
Collections.emptyList());
193193
// Validate data files
194194
List<ColumnStat> columnStats = Arrays.asList(COL1_COLUMN_STAT, COL2_COLUMN_STAT);
@@ -245,7 +245,7 @@ void getCurrentTableTest() {
245245
.build(),
246246
DataLayoutStrategy.FLAT,
247247
"file:" + basePath,
248-
internalTable.getLatestMetdataPath(),
248+
internalTable.getLatestMetadataPath(),
249249
Collections.emptyList());
250250
}
251251

@@ -297,7 +297,7 @@ void getCurrentSnapshotPartitionedTest() throws URISyntaxException {
297297
.build(),
298298
DataLayoutStrategy.HIVE_STYLE_PARTITION,
299299
"file:" + basePath,
300-
snapshot.getTable().getLatestMetdataPath(),
300+
snapshot.getTable().getLatestMetadataPath(),
301301
Collections.singletonList(
302302
InternalPartitionField.builder()
303303
.sourceField(partCol)

xtable-core/src/test/java/org/apache/xtable/hudi/ITHudiConversionSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void getCurrentTableTest() {
219219
internalSchema,
220220
DataLayoutStrategy.FLAT,
221221
"file:" + basePath + "_v1",
222-
internalTable.getLatestMetdataPath(),
222+
internalTable.getLatestMetadataPath(),
223223
Collections.emptyList());
224224
}
225225
}

xtable-core/src/test/java/org/apache/xtable/testutil/ITTestUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static void validateTable(
5353
Assertions.assertEquals(readSchema, internalTable.getReadSchema());
5454
Assertions.assertEquals(dataLayoutStrategy, internalTable.getLayoutStrategy());
5555
Assertions.assertEquals(basePath, internalTable.getBasePath());
56-
Assertions.assertEquals(latestMetadataPath, internalTable.getLatestMetdataPath());
56+
Assertions.assertEquals(latestMetadataPath, internalTable.getLatestMetadataPath());
5757
Assertions.assertEquals(partitioningFields, internalTable.getPartitioningFields());
5858
}
5959

xtable-service/src/main/java/org/apache/xtable/service/ConversionService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public ConvertTableResponse convertTable(ConvertTableRequest convertTableRequest
238238
ConvertedTable.builder()
239239
.targetFormat(internalTable.getTableFormat())
240240
.targetSchema(schemaString)
241-
.targetMetadataPath(internalTable.getLatestMetdataPath())
241+
.targetMetadataPath(internalTable.getLatestMetadataPath())
242242
.build());
243243
}
244244
return new ConvertTableResponse(convertedTables);

xtable-service/src/test/java/org/apache/xtable/service/TestConversionService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void convertToTargetHudi() {
123123
when(conversionSrc.getCurrentTable()).thenReturn(internalTbl);
124124

125125
when(internalTbl.getTableFormat()).thenReturn(TableFormat.HUDI);
126-
when(internalTbl.getLatestMetdataPath()).thenReturn(HUDI_META_PATH);
126+
when(internalTbl.getLatestMetadataPath()).thenReturn(HUDI_META_PATH);
127127
when(internalTbl.getReadSchema()).thenReturn(internalSchema);
128128

129129
AvroSchemaConverter converter = mock(AvroSchemaConverter.class);
@@ -161,7 +161,7 @@ void convertToTargetIceberg() {
161161
when(conversionSrc.getCurrentTable()).thenReturn(internalTbl);
162162

163163
when(internalTbl.getTableFormat()).thenReturn(TableFormat.ICEBERG);
164-
when(internalTbl.getLatestMetdataPath()).thenReturn(ICEBERG_META_PATH);
164+
when(internalTbl.getLatestMetadataPath()).thenReturn(ICEBERG_META_PATH);
165165
when(internalTbl.getReadSchema()).thenReturn(internalSchema);
166166

167167
IcebergSchemaExtractor extractor = mock(IcebergSchemaExtractor.class);
@@ -199,7 +199,7 @@ void convertToTargetDelta() {
199199
when(conversionSrc.getCurrentTable()).thenReturn(internalTbl);
200200

201201
when(internalTbl.getTableFormat()).thenReturn(TableFormat.DELTA);
202-
when(internalTbl.getLatestMetdataPath()).thenReturn(DELTA_META_PATH);
202+
when(internalTbl.getLatestMetadataPath()).thenReturn(DELTA_META_PATH);
203203
when(internalTbl.getReadSchema()).thenReturn(internalSchema);
204204

205205
SparkSchemaExtractor extractor = mock(SparkSchemaExtractor.class);

0 commit comments

Comments
 (0)