danny0405 commented on code in PR #13313:
URL: https://github.com/apache/hudi/pull/13313#discussion_r2105693729
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/common/model/HoodieSparkRecord.java:
##########
@@ -307,7 +309,12 @@ public Option<Map<String, String>> getMetadata() {
@Override
public Option<HoodieAvroIndexedRecord> toIndexedRecord(Schema recordSchema,
Properties prop) {
- throw new UnsupportedOperationException();
+ if (data == null) {
+ return Option.empty();
+ }
+ StructType structType = schema == null ?
AvroConversionUtils.convertAvroSchemaToStructType(recordSchema) : schema;
Review Comment:
I see `HoodieSparkParquetReader#getRecordIterator` always set up the
`schema` as null, does it mean we execute the avro -> sruct type conversion
per-row, the cache may help here BTW.
--
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]