voonhous commented on code in PR #17763:
URL: https://github.com/apache/hudi/pull/17763#discussion_r2656143831
##########
hudi-hadoop-common/src/main/java/org/apache/parquet/avro/AvroSchemaConverterWithTimestampNTZ.java:
##########
@@ -267,121 +271,123 @@ private Type convertUnion(String fieldName, Schema
schema, Type.Repetition repet
}
}
- private Type convertUnionToGroupType(String fieldName, Type.Repetition
repetition, List<Schema> nonNullSchemas,
+ private Type convertUnionToGroupType(String fieldName, Type.Repetition
repetition, List<HoodieSchema> nonNullSchemas,
String schemaPath) {
List<Type> unionTypes = new ArrayList<Type>(nonNullSchemas.size());
int index = 0;
- for (Schema childSchema : nonNullSchemas) {
+ for (HoodieSchema childSchema : nonNullSchemas) {
unionTypes.add( convertField("member" + index++, childSchema,
Type.Repetition.OPTIONAL, schemaPath));
}
return new GroupType(repetition, fieldName, unionTypes);
}
- private Type convertField(Schema.Field field, String schemaPath) {
+ private Type convertField(HoodieSchemaField field, String schemaPath) {
return convertField(field.name(), field.schema(), schemaPath);
}
@Override
- public Schema convert(MessageType parquetSchema) {
+ public HoodieSchema convert(MessageType parquetSchema) {
return convertFields(parquetSchema.getName(), parquetSchema.getFields(),
new HashMap<>());
}
- Schema convert(GroupType parquetSchema) {
+ HoodieSchema convert(GroupType parquetSchema) {
return convertFields(parquetSchema.getName(), parquetSchema.getFields(),
new HashMap<>());
}
- private Schema convertFields(String name, List<Type> parquetFields,
Map<String, Integer> names) {
- List<Schema.Field> fields = new ArrayList<Schema.Field>();
+ private HoodieSchema convertFields(String name, List<Type> parquetFields,
Map<String, Integer> names) {
+ List<HoodieSchemaField> fields = new ArrayList<>();
Review Comment:
Done.
--
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]