danny0405 commented on code in PR #13964:
URL: https://github.com/apache/hudi/pull/13964#discussion_r2373843033
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/BufferedRecords.java:
##########
@@ -48,6 +48,21 @@ public static <T> BufferedRecord<T>
fromHoodieRecord(HoodieRecord record, Schema
return new BufferedRecord<>(recordKey,
recordContext.convertOrderingValueToEngineType(orderingValue), data, schemaId,
inferOperation(isDelete, record.getOperation()));
}
+ public static <T> BufferedRecord<T>
fromHoodieRecordWithDeflatedRecord(HoodieRecord record, Schema schema,
RecordContext<T> recordContext, Properties props, String[] orderingFields) {
+ boolean isDelete = record.isDelete(schema, props);
+ return fromHoodieRecordWithDeflatedRecord(record, schema, recordContext,
props, orderingFields, isDelete);
+ }
+
+ public static <T> BufferedRecord<T>
fromHoodieRecordWithDeflatedRecord(HoodieRecord record, Schema schema,
RecordContext<T> recordContext,
+
Properties props, String[] orderingFields, boolean isDelete) {
+ HoodieKey hoodieKey = record.getKey();
+ T data = recordContext.extractDeflatedDataFromRecord(record, schema,
props);
+ String recordKey = hoodieKey == null ? recordContext.getRecordKey(data,
schema) : hoodieKey.getRecordKey();
+ Integer schemaId = recordContext.encodeAvroSchema(schema);
+ Comparable orderingValue = record.getOrderingValue(schema, props,
orderingFields);
+ return new BufferedRecord<>(recordKey,
recordContext.convertOrderingValueToEngineType(orderingValue), data, schemaId,
inferOperation(isDelete, record.getOperation()));
+ }
+
Review Comment:
+1
--
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]