Skip to content

Commit

Permalink
fix: temp commit for fixedsizelist
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha committed Aug 8, 2024
1 parent 8b3b8ac commit d7e0295
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
6 changes: 5 additions & 1 deletion java/c/src/main/java/org/apache/arrow/c/ArrayImporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ private void doImport(ArrowArray.Snapshot snapshot) {
checkState(children[i] != NULL, "ArrowArray struct has NULL child at position %s", i);
ArrayImporter childImporter =
new ArrayImporter(allocator, childVectors.get(i), dictionaryProvider);
childImporter.importChild(this, ArrowArray.wrap(children[i]));
ArrowArray childArray = ArrowArray.wrap(children[i]);
ArrowArray.Snapshot childSnapshot = childArray.snapshot();
childSnapshot.offset = snapshot.offset;
childArray.save(childSnapshot);
childImporter.importChild(this, childArray);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public List<ArrowBuf> visit(ArrowType.LargeList type) {

@Override
public List<ArrowBuf> visit(ArrowType.FixedSizeList type) {
return Collections.singletonList(maybeImportBitmap(type));
return Collections.singletonList(maybeImportBitmapWithOffset(type));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,4 +719,17 @@ public void copyValueSafe(int fromIndex, int toIndex) {
}
}
}

/**
* Slice this vector at desired index and length and transfer the corresponding data to the target
* vector.
*
* @param startIndex start position of the split in source vector.
* @param length length of the split.
* @param target destination vector
*/
public void splitAndTransferTo(int startIndex, int length, FixedSizeListVector target) {
TransferImpl transfer = new TransferImpl(target);
transfer.splitAndTransfer(startIndex, length);
}
}

0 comments on commit d7e0295

Please sign in to comment.