sparsh-30 commented on code in PR #19855:
URL: https://github.com/apache/hudi/pull/19855#discussion_r4125881270
##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchemaUtils.java:
##########
@@ -506,18 +506,55 @@ public static HoodieSchema
generateProjectionSchema(HoodieSchema originalSchema,
Map<String, HoodieSchemaField> schemaFieldsMap =
originalSchema.getFields().stream()
.map(r -> Pair.of(r.name().toLowerCase(Locale.ROOT), r))
.collect(Collectors.toMap(Pair::getLeft, Pair::getRight));
+
+ return generateProjectionSchema(originalSchema, schemaFieldsMap,
fieldNames);
Review Comment:
Yes, this is intentional. As noted in the earlier review,
`writeSchema.isError()` is always false at the sole realtime-reader caller
because `addPartitionFields` rebuilds the schema using the 4-arg
`createRecord`, which sets `isError=false`. Delegating from the 2-arg overload
therefore does not change behavior for that caller, while preserving `isError`
makes the shared implementation correct for other callers.
--
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]