hudi-agent commented on code in PR #18873:
URL: https://github.com/apache/hudi/pull/18873#discussion_r3317439028


##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/io/storage/row/RowDataParquetWriteSupport.java:
##########
@@ -41,9 +43,9 @@ public class RowDataParquetWriteSupport extends 
WriteSupport<RowData> {
   private ParquetRowDataWriter writer;
   protected final Configuration hadoopConf;
 
-  public RowDataParquetWriteSupport(RowType rowType, Configuration config) {
+  public RowDataParquetWriteSupport(HoodieSchema hoodieSchema, Configuration 
config) {

Review Comment:
   🤖 nit: the parameter name `hoodieSchema` is a bit redundant given its type 
is already `HoodieSchema` — could you rename it to just `schema` to match the 
naming used in `HoodieRowDataParquetWriteSupport`'s constructor?
   
   <sub><i>- AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/io/storage/row/HoodieRowDataCreateHandle.java:
##########
@@ -293,7 +295,13 @@ protected HoodieRowDataFileWriter createNewFileWriter(
       Path path, HoodieTable hoodieTable, HoodieWriteConfig config, RowType 
rowType, String instantTime)
       throws IOException {
     StoragePath storagePath = new StoragePath(path.toUri());
-    return (HoodieRowDataFileWriter) new 
HoodieRowDataFileWriterFactory(hoodieTable.getStorage())
-        .getFileWriter(instantTime, storagePath, config, rowType, 
hoodieTable.getTaskContextSupplier());
+    return (HoodieRowDataFileWriter) HoodieFileWriterFactory.getFileWriter(
+        instantTime,
+        storagePath,
+        hoodieTable.getStorage(),
+        config,
+        HoodieSchemaConverter.convertToSchema(rowType).getNonNullType(),

Review Comment:
   🤖 nit: the inline `.getNonNullType()` chain makes it a bit non-obvious why 
the non-null variant is needed here — could you extract this to a local 
variable (e.g. `HoodieSchema schema = 
HoodieSchemaConverter.convertToSchema(rowType).getNonNullType();`) or add a 
short comment explaining the intent?
   
   <sub><i>- AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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