Skip to content

Commit d897b91

Browse files
committed
move
1 parent 38553b1 commit d897b91

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

c/src/main/java/org/apache/arrow/c/ArrayImporter.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ final class ArrayImporter {
5353
void importArray(ArrowArray src) {
5454
ArrowArray.Snapshot snapshot = src.snapshot();
5555
checkState(snapshot.release != NULL, "Cannot import released ArrowArray");
56+
checkState(
57+
snapshot.offset == 0,
58+
"ArrowArray struct has non-zero offset (%s), which is not supported",
59+
snapshot.offset);
5660

5761
// Move imported array
5862
ArrowArray ownedArray = ArrowArray.allocateNew(allocator);
@@ -83,11 +87,6 @@ private void importChild(ArrayImporter parent, ArrowArray src) {
8387
}
8488

8589
private void doImport(ArrowArray.Snapshot snapshot) {
86-
checkState(
87-
snapshot.offset == 0,
88-
"ArrowArray struct has non-zero offset (%s), which is not supported",
89-
snapshot.offset);
90-
9190
// First import children (required for reconstituting parent array data)
9291
long[] children =
9392
NativeUtil.toJavaArray(snapshot.children, checkedCastToInt(snapshot.n_children));

0 commit comments

Comments
 (0)