You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug, including details regarding any error messages, version, and platform.
I'm using VectorSchemaRootAppender.append append batch data into a final VectorSchemaRoot
VectorSchemaRoot result = null;
ScanOptions options = new ScanOptions(/*batchSize*/ 32768, projection);
try (
var allocator = new RootAllocator();
var datasetFactory = new FileSystemDatasetFactory(allocator,
NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
Dataset dataset = datasetFactory.finish();
Scanner scanner = dataset.newScan(options);
ArrowReader reader = scanner.scanBatches()
) {
while (reader.loadNextBatch()) {
try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
if(result == null) {
result = VectorSchemaRoot.create(root.getSchema(), allocator);
}
VectorSchemaRootAppender.append(result, root);
}
}
return result;
} catch (Exception e) {
throw new RuntimeException(e);
}
But exception as bellowed
Caused by: java.lang.IndexOutOfBoundsException: index: 0, length: 4 (expected: range(0, 0))
at org.apache.arrow.memory.ArrowBuf.checkIndexD(ArrowBuf.java:319)
at org.apache.arrow.memory.ArrowBuf.chk(ArrowBuf.java:306)
at org.apache.arrow.memory.ArrowBuf.getInt(ArrowBuf.java:425)
at org.apache.arrow.vector.util.VectorAppender.visit(VectorAppender.java:111)
at org.apache.arrow.vector.util.VectorAppender.visit(VectorAppender.java:46)
at org.apache.arrow.vector.BaseVariableWidthVector.accept(BaseVariableWidthVector.java:1424)
at org.apache.arrow.vector.util.VectorSchemaRootAppender.append(VectorSchemaRootAppender.java:67)
at org.apache.arrow.vector.util.VectorSchemaRootAppender.append(VectorSchemaRootAppender.java:81)
Component(s)
Java
The text was updated successfully, but these errors were encountered:
lidavidm
changed the title
java.lang.IndexOutOfBoundsException when using VectorSchemaRootAppender.append
[Java] java.lang.IndexOutOfBoundsException when using VectorSchemaRootAppender.append
Aug 10, 2023
Describe the bug, including details regarding any error messages, version, and platform.
I'm using
VectorSchemaRootAppender.append
append batch data into a final VectorSchemaRootBut exception as bellowed
Component(s)
Java
The text was updated successfully, but these errors were encountered: