danny0405 commented on code in PR #13987:
URL: https://github.com/apache/hudi/pull/13987#discussion_r2390155046


##########
hudi-common/src/main/java/org/apache/hudi/common/model/SerializableIndexedRecord.java:
##########
@@ -46,30 +47,43 @@ public class SerializableIndexedRecord implements 
GenericRecord, KryoSerializabl
   private static final long serialVersionUID = 1L;
 
   private IndexedRecord record;
+  private Schema schema;
   private byte[] recordBytes;
 
-  static SerializableIndexedRecord createInstance(IndexedRecord record) {
+  @VisibleForTesting
+  public static SerializableIndexedRecord createInstance(IndexedRecord record) 
{
     return record == null ? null : new SerializableIndexedRecord(record);
   }
 
   private SerializableIndexedRecord(IndexedRecord record) {
     this.record = record;
     this.recordBytes = null; // Initialize recordBytes to null, will be set 
when encodeRecord is called
+    this.schema = null;
+  }
+
+  private SerializableIndexedRecord(Schema schema, byte[] bytes) {
+    this.record = null;
+    this.recordBytes = bytes;
+    this.schema = schema;
+  }
+
+  public static SerializableIndexedRecord withSerializedRecord(Schema schema, 
byte[] bytes) {

Review Comment:
   -> fromAvroBytes ?



-- 
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]

Reply via email to