the-other-tim-brown commented on code in PR #728:
URL: https://github.com/apache/incubator-xtable/pull/728#discussion_r2347499514
##########
xtable-core/src/main/java/org/apache/xtable/parquet/ParquetSchemaExtractor.java:
##########
@@ -295,15 +302,30 @@ public InternalSchema toInternalSchema(Type schema,
String parentPath) {
.fieldId(fieldId == null ? null : fieldId.intValue())
.build());
}
- if (currentRepetition != Repetition.REPEATED
- && schema.asGroupType().getName() != "list"
+ // RECORD Type (non-nullable elements)
+ if (schema.asGroupType().getName() != "list"
&& !Arrays.asList("key_value",
"map").contains(schema.asGroupType().getName())) {
+ boolean isNullable =
+ subFields.stream()
+ .filter(ele -> ele.getSchema().isNullable())
+ .collect(Collectors.toList())
+ .size()
+ == 0
+ ? false
+ : isNullable(schema.asGroupType());
return InternalSchema.builder()
.name(schema.getName())
.comment(null)
+ // .recordKeyFields(subFields) // necessary for Hudi metadata
.dataType(InternalType.RECORD)
.fields(subFields)
- .isNullable(isNullable(schema.asGroupType()))
+ .isNullable(isNullable) // false
isNullable(schema.asGroupType()) (TODO causing
Review Comment:
@unical1988 is this done now? I see it is working in the integration test.
--
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]