wzx140 commented on code in PR #7769:
URL: https://github.com/apache/hudi/pull/7769#discussion_r1089871282


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/common/model/HoodieSparkRecord.java:
##########
@@ -206,9 +211,10 @@ public HoodieRecord rewriteRecordWithNewSchema(Schema 
recordSchema, Properties p
     StructType structType = 
HoodieInternalRowUtils.getCachedSchema(recordSchema);
     StructType newStructType = 
HoodieInternalRowUtils.getCachedSchema(newSchema);
 
-    // TODO HUDI-5281 Rewrite HoodieSparkRecord with UnsafeRowWriter
-    InternalRow rewriteRecord = 
HoodieInternalRowUtils.rewriteRecordWithNewSchema(this.data, structType, 
newStructType, renameCols);
-    UnsafeRow unsafeRow = 
HoodieInternalRowUtils.getCachedUnsafeProjection(newStructType, 
newStructType).apply(rewriteRecord);
+    Function1<InternalRow, UnsafeRow> unsafeRowWriter =
+        HoodieInternalRowUtils.getCachedUnsafeRowWriter(structType, 
newStructType, Collections.emptyMap());

Review Comment:
   miss renameCols



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