danny0405 commented on code in PR #13998:
URL: https://github.com/apache/hudi/pull/13998#discussion_r2383724357
##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/BaseSparkInternalRowReaderContext.java:
##########
@@ -91,4 +93,15 @@ protected UnaryOperator<InternalRow>
getBootstrapProjection(Schema from, Schema
HoodieInternalRowUtils.getCachedUnsafeRowWriter(getCachedSchema(from),
getCachedSchema(to), Collections.emptyMap(), partitionValuesByIndex);
return row -> (InternalRow) unsafeRowWriter.apply(row);
}
+
+ @Override
+ public void setSchemaHandler(FileGroupReaderSchemaHandler<InternalRow>
schemaHandler) {
+ super.setSchemaHandler(schemaHandler);
+ // init ordering value converter: java -> engine type
+ List<String> orderingFieldNames =
HoodieRecordUtils.getOrderingFieldNames(getMergeMode(), tableConfig);
+ Schema schema = schemaHandler.getRequiredSchema();
+ if (orderingFieldNames.stream().allMatch(f ->
AvroSchemaUtils.findNestedField(schema, f).isPresent())) {
Review Comment:
is the check necessary because there is already existence check in the
`OrderingValueEngineTypeConverter `
--
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]