lidavidm commented on code in PR #41676:
URL: https://github.com/apache/arrow/pull/41676#discussion_r1602413649
##########
java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.java:
##########
@@ -98,7 +98,7 @@ private void loadBuffers(
CompressionCodec codec) {
checkArgument(nodes.hasNext(), "no more field nodes for field %s and
vector %s", field, vector);
ArrowFieldNode fieldNode = nodes.next();
- int bufferLayoutCount = TypeLayout.getTypeBufferCount(field.getType());
+ int bufferLayoutCount = TypeLayout.getTypeBufferCount(field.getType(),
vector);
Review Comment:
Does this make sense? The vector is possibly uninitialized right now. You
need to use the IPC metadata to figure out the buffer count here, not the Java
vector.
##########
java/vector/src/main/java/org/apache/arrow/vector/ipc/JsonFileReader.java:
##########
@@ -715,7 +715,7 @@ private ArrowBuf readIntoBuffer(BufferAllocator allocator,
BufferType bufferType
private void readFromJsonIntoVector(Field field, FieldVector vector) throws
JsonParseException, IOException {
ArrowType type = field.getType();
- TypeLayout typeLayout = TypeLayout.getTypeLayout(type);
+ TypeLayout typeLayout = TypeLayout.getTypeLayout(type, vector);
Review Comment:
Ditto here.
--
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]