Skip to content

Commit 5472853

Browse files
committed
Fix compilation error
1 parent 2bc369b commit 5472853

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

hudi-common/src/main/java/org/apache/hudi/common/util/LanceUtils.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import org.apache.hudi.storage.HoodieStorage;
3737
import org.apache.hudi.storage.StoragePath;
3838

39-
import org.apache.avro.Schema;
4039
import org.apache.avro.generic.GenericRecord;
4140

4241
import java.io.ByteArrayOutputStream;
@@ -104,15 +103,15 @@ public HoodieKey next() {
104103
}
105104

106105
@Override
107-
public Schema readAvroSchema(HoodieStorage storage, StoragePath filePath) {
106+
public HoodieSchema readSchema(HoodieStorage storage, StoragePath filePath) {
108107
try (HoodieFileReader fileReader =
109108
HoodieIOFactory.getIOFactory(storage)
110109
.getReaderFactory(HoodieRecord.HoodieRecordType.SPARK)
111110
.getFileReader(
112111
ConfigUtils.DEFAULT_HUDI_CONFIG_FOR_READER,
113112
filePath,
114113
HoodieFileFormat.LANCE)) {
115-
return fileReader.getSchema().getAvroSchema();
114+
return fileReader.getSchema();
116115
} catch (IOException e) {
117116
throw new HoodieIOException("Failed to read schema from Lance file", e);
118117
}
@@ -129,7 +128,7 @@ public List<GenericRecord> readAvroRecords(HoodieStorage storage, StoragePath fi
129128
}
130129

131130
@Override
132-
public List<GenericRecord> readAvroRecords(HoodieStorage storage, StoragePath filePath, Schema schema) {
131+
public List<GenericRecord> readAvroRecords(HoodieStorage storage, StoragePath filePath, HoodieSchema schema) {
133132
throw new UnsupportedOperationException("readAvroRecords with schema is not yet supported for Lance format");
134133
}
135134

@@ -195,8 +194,8 @@ public ByteArrayOutputStream serializeRecordsToLogBlock(HoodieStorage storage,
195194
public Pair<ByteArrayOutputStream, Object> serializeRecordsToLogBlock(HoodieStorage storage,
196195
Iterator<HoodieRecord> records,
197196
HoodieRecord.HoodieRecordType recordType,
198-
Schema writerSchema,
199-
Schema readerSchema,
197+
HoodieSchema writerSchema,
198+
HoodieSchema readerSchema,
200199
String keyFieldName,
201200
Map<String, String> paramsMap) throws IOException {
202201
throw new UnsupportedOperationException("serializeRecordsToLogBlock with iterator is not yet supported for Lance format");

0 commit comments

Comments
 (0)