jonvex commented on code in PR #13967:
URL: https://github.com/apache/hudi/pull/13967#discussion_r2370667110
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/buffer/StreamingFileGroupRecordBufferLoader.java:
##########
@@ -108,4 +108,14 @@ public Pair<HoodieFileGroupRecordBuffer<T>, List<String>>
getRecordBuffer(Hoodie
}
return Pair.of(recordBuffer, Collections.emptyList());
}
+
+ private static <T> Schema getRecordSchema(HoodieReaderContext<T>
readerContext, TypedProperties props) {
+ Option<Pair<String, String>> payloadClasses =
readerContext.getPayloadClasses(props);
+ if (payloadClasses.isPresent() &&
payloadClasses.get().getRight().equals("org.apache.spark.sql.hudi.command.payload.ExpressionPayload"))
{
+ String schemaStr = props.getString("hoodie.payload.record.schema");
Review Comment:
`hoodie.write.schema` is the schema that is used for writing to the file.
This `ExpressionPayload.PAYLOAD_RECORD_AVRO_SCHEMA` is the schema of the
payload. So I think that's exactly what we want.
--
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]