Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
7.0.0
Description
ArrowVectorIterator does not currently work with arrays.
One issue is that initializing the ArrayConsumer requires ListVector#getDataVector but currently this is called before the VectorSchemaRoot is initialized so there is no ListVector to pass: https://github.com/apache/arrow/blob/master/java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/ArrowVectorIterator.java#L76.
Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.arrow.vector.complex.ListVector.getDataVector()" because "vector" is null at org.apache.arrow.adapter.jdbc.JdbcToArrowUtils.getConsumer(JdbcToArrowUtils.java:432) at org.apache.arrow.adapter.jdbc.ArrowVectorIterator.initialize(ArrowVectorIterator.java:74) at org.apache.arrow.adapter.jdbc.ArrowVectorIterator.create(ArrowVectorIterator.java:91) ... 72 more
A second issue comes when there are multiple batches. ArrayConsumer#resetValueVector does not currently do anything with the delegate. As a result, ListVector#dataVector does not have its index reset which is an issue when reusing the VectorSchemaRoot.
Attachments
Issue Links
- links to