danny0405 commented on code in PR #13967:
URL: https://github.com/apache/hudi/pull/13967#discussion_r2370894020
##########
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:
can we simplify the check to be just
`props.getString("hoodie.payload.record.schema")` non null or empty?
--
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]