Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
DEBUG, REVERTABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Apr 12, 2022
1 parent cc96fc5 commit ab262f7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ public void evaluate(ColumnarNativeIterator batchItr)
*/
public ArrowRecordBatch[] evaluate2(ArrowRecordBatch recordBatch) throws RuntimeException, IOException {
byte[] bytes = UnsafeRecordBatchSerializer.serializeUnsafe(recordBatch);
for (ArrowBuf buffer : recordBatch.getBuffers()) {
System.out.printf("[JAVA SORT DEBUG 2] address: %s, hex: %s\n",
buffer.memoryAddress(), buffer.toHexString(0, (int) buffer.capacity()));
}
byte[][] serializedBatchArray = jniWrapper.nativeEvaluate2(nativeHandler, bytes);
BufferAllocator allocator = SparkMemoryUtils.contextAllocatorForBufferImport();
ArrowRecordBatch[] recordBatchList = new ArrowRecordBatch[serializedBatchArray.length];
Expand Down

0 comments on commit ab262f7

Please sign in to comment.