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


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/HoodieRowDataLanceReader.java:
##########
@@ -204,7 +211,64 @@ public ClosableIterator<RowData> 
getRowDataIterator(DataType dataType, HoodieSch
   @Override
   public HoodieSchema getSchema() {
     RowType rowType = HoodieFlinkLanceArrowUtils.toRowType(arrowSchema);
-    return HoodieSchemaConverter.convertToSchema(rowType);
+    Map<String, String> metadata = arrowSchema.getCustomMetadata();

Review Comment:
   🤖 nit: `arrowSchema.getCustomMetadata()` null-check plus 
`parseVectorColumnNames(null)` reads a bit indirect — it might be worth a small 
`getVectorColumnNames()` helper (or a short comment) noting that files written 
without vector metadata fall through to the plain conversion.
   
   <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/lance/HoodieFlinkLanceArrowUtils.java:
##########
@@ -338,11 +343,14 @@ private static RowData readRow(RowType rowType, 
StructVector vector, int rowId)
     return row;
   }
 
-  private static ArrayData readArray(ArrayType arrayType, ListVector vector, 
int rowId) {
-    int startIndex = vector.getElementStartIndex(rowId);
-    int endIndex = vector.getElementEndIndex(rowId);
+  private static ArrayData readArray(ArrayType arrayType, ValueVector vector, 
int rowId) {

Review Comment:
   🤖 nit: could you take `BaseListVector` as the parameter type (casting at the 
call site like `readRow`/`(StructVector)`) instead of `ValueVector` + an 
internal cast? Keeps the list-only contract visible in the signature and 
consistent with the sibling readers.
   
   <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