jduo commented on code in PR #40355:
URL: https://github.com/apache/arrow/pull/40355#discussion_r2223637004


##########
csharp/src/Apache.Arrow/Ipc/ArrowReaderImplementation.cs:
##########
@@ -196,7 +196,8 @@ private List<IArrowArray> BuildArrays(
                     : LoadVariableField(version, ref recordBatchEnumerator, 
field, in fieldNode, messageBuffer, bufferCreator);
 
                 arrays.Add(ArrowArrayFactory.BuildArray(arrayData));
-            } while (recordBatchEnumerator.MoveNextNode());
+            } while (recordBatchEnumerator.MoveNextNode() && schemaFieldIndex 
< schema.FieldsList.Count);

Review Comment:
   This seems reasonable however a few questions @davidhcoe -
   - What happens to the state of recordBatchEnumerator if you haven't iterated 
through all the elements? Do you have to manually close it?
   - Similarly, what happens if you exhaust the recordBatchEnumerator before 
reaching the field list count? Do fields beyond this get exposed correctly?
   



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