Skip to content

Commit

Permalink
Double swapping on little endian systems for performance testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-astachowski committed Dec 5, 2024
1 parent 5d3e5e4 commit 5e4bd5a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ public void readArrowStream(InputStream is) throws IOException {
for (FieldVector f : root.getFieldVectors()) {
// transfer will not copy data but transfer ownership of memory
// from streamReader to resultChunk
if(ByteOrder.nativeOrder().equals(ByteOrder.BIG_ENDIAN)) {
if(ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN)) {
f.accept(new EndiannessSwitchVisitor(), null);
}
f.accept(new EndiannessSwitchVisitor(), null);
TransferPair t = f.getTransferPair(rootAllocator);
t.transfer();
valueVectors.add(t.getTo());
Expand Down

0 comments on commit 5e4bd5a

Please sign in to comment.