SEPURI-SAI-KRISHNA commented on PR #12650:
URL: https://github.com/apache/seatunnel/pull/12650#issuecomment-6358941559

   Thanks. Both asks are answered, and the first turned up two defects not this 
PR's to fix.
   
   **2. Javadoc on `convertSeatunnelRow()`: already in the branch.** It went in 
with `ea14f5f4c` on 2026-10-07. `rowCountInOneBatch` is the `dev` field name 
and this PR removes it, which may be why it reads differently from your note. 
The method now takes `(int batchRowCount, int rowOffset)` and its Javadoc 
states the split: field vectors hold only the loaded batch and are indexed from 
0, `seatunnelRowBatch` is cumulative, and the method runs once per batch before 
`readRowCount` advances past it.
   
   **1. Null cell after the boundary.** Partly already there: 
`testMultipleRecordBatchesAreReadInFull` nulls the long column at absolute row 
3, the second row of the final batch, because without a known-null cell a 
genuine null and the old out-of-range read look identical.
   
   Missing was a null in a *complex* column, so the array column is now null at 
absolute row 4, the last row of the final batch. The two nulls sit on different 
rows so neither masks the other, row 2 still carries a populated multi element 
array across the boundary, and the new assertions check that the cell reads 
back null and that the scalars in that row are untouched.
   
   Mutation re-run with the absolute vector index restored: both tests still 
fail, the scalar one as `expected: <[10, 11, 20, null, 22]> but was: <[10, 11, 
22, null, null]>`, so the null assertions have not weakened it.
   
   **Why struct and map have no null cell.** I tried that first; it is not a 
test problem:
   
   - A null struct throws `NullPointerException` at `StructConverter.java:43`: 
the generics overload calls `valueMap.entrySet()` on a null `getObject`. Its 
sibling at `:36` guards it, as does `ListConverter`, so only this path was 
missed.
   - A null map comes back as `{}` rather than `null`, losing the difference 
between absent and empty.
   
   Neither is caused by this PR, which changes no converter. I reproduced the 
struct one with a **single** record batch, so it is unrelated to the boundary:
   
   ```
   java.lang.NullPointerException: Cannot invoke "java.util.Map.entrySet()" 
because "valueMap" is null
     at StructConverter.convert(StructConverter.java:43)
     at ArrowToSeatunnelRowReader.convertRow(ArrowToSeatunnelRowReader.java:334)
   ```
   
   Both are kept out of this PR and will be raised separately. Happy to be 
overruled if you would rather they ride along here.
   
   Module green: 13 tests, `spotless:check` and `-DskipTests verify` pass. CI 
result to follow.
   


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