yihua commented on code in PR #12772:
URL: https://github.com/apache/hudi/pull/12772#discussion_r2366141361


##########
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/client/model/TestHoodieInternalRow.java:
##########
@@ -65,11 +66,14 @@ public void testGet() {
     Object[] values = getRandomValue(true);
 
     InternalRow row = new GenericInternalRow(values);
-    HoodieInternalRow hoodieInternalRow = new 
HoodieInternalRow(UTF8String.fromString("commitTime"),
-        UTF8String.fromString("commitSeqNo"),
-        UTF8String.fromString("recordKey"),
-        UTF8String.fromString("partitionPath"),
-        UTF8String.fromString("fileName"),
+    HoodieInternalRow hoodieInternalRow = 
SparkAdapterSupport$.MODULE$.sparkAdapter().createInternalRow(
+        new UTF8String[] {

Review Comment:
   There is no regression as the new array logic is taken out of the 
`HoodieInternalRow` constructor and moved here to keep only one constructor in 
`HoodieInternalRow` (the constructor below is removed).
   ```
   public HoodieInternalRow(UTF8String commitTime,      
                              UTF8String commitSeqNumber,       
                              UTF8String recordKey,     
                              UTF8String partitionPath, 
                              UTF8String fileName,      
                              InternalRow sourceRow,    
                              boolean sourceContainsMetaFields) {       
       this.metaFields = new UTF8String[] {     
           commitTime,  
           commitSeqNumber,     
           recordKey,   
           partitionPath,       
           fileName     
       };       
   
       this.sourceRow = sourceRow;      
       this.sourceContainsMetaFields = sourceContainsMetaFields;        
     }
   ```



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