the-other-tim-brown commented on code in PR #14313:
URL: https://github.com/apache/hudi/pull/14313#discussion_r2556931313
##########
hudi-hadoop-common/src/test/java/org/apache/hudi/metadata/TestHoodieTableMetadataUtil.java:
##########
@@ -333,12 +335,14 @@ private static void writeParquetFile(String instant,
path,
metaClient.getStorage(),
metaClient.getTableConfig(),
- HoodieTestDataGenerator.AVRO_SCHEMA_WITH_METADATA_FIELDS,
+ HOODIE_SCHEMA_WITH_METADATA_FIELDS,
engineContext.getTaskContextSupplier(),
HoodieRecord.HoodieRecordType.AVRO);
for (HoodieRecord record : records) {
writer.writeWithMetadata(record.getKey(),
- record.rewriteRecordWithNewSchema(AVRO_SCHEMA,
CollectionUtils.emptyProps(), AVRO_SCHEMA_WITH_METADATA_FIELDS),
HoodieTestDataGenerator.AVRO_SCHEMA_WITH_METADATA_FIELDS);
+ //TODO boundary to revisit in follow up to use HoodieSchema
directly
+ record.rewriteRecordWithNewSchema(AVRO_SCHEMA,
CollectionUtils.emptyProps(), AVRO_SCHEMA_WITH_METADATA_FIELDS),
+
HoodieSchema.fromAvroSchema(HoodieTestDataGenerator.AVRO_SCHEMA_WITH_METADATA_FIELDS));
Review Comment:
Use `HOODIE_SCHEMA_WITH_METADATA_FIELDS` here?
##########
hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieBootstrapFileReader.java:
##########
@@ -100,18 +103,20 @@ public boolean hasNext() {
@Override
public String next() {
+ // TODO boundary for now
HoodieRecord<T> skeletonRecord = skeletonIterator.next();
- return skeletonRecord.getRecordKey(schema,
HoodieRecord.RECORD_KEY_METADATA_FIELD);
+ return skeletonRecord.getRecordKey(schema.getAvroSchema(),
HoodieRecord.RECORD_KEY_METADATA_FIELD);
}
};
}
protected abstract void setPartitionField(int position, Object fieldValue, T
row);
@Override
- public Schema getSchema() {
+ public HoodieSchema getSchema() {
// return merged schema (meta fields + data file schema)
- return HoodieAvroUtils.addMetadataFields(dataFileReader.getSchema());
+ // TODO boundary for now to revisit HoodieAvroUtils in later pr to use
HoodieSchema
Review Comment:
Just a reminder to clean this up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]