| Constructor and Description |
|---|
FrameReaderUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareByteArraysUnsigned(byte[] array1,
int position1,
int length1,
byte[] array2,
int position2,
int length2)
Compares two byte arrays using unsigned byte ordering.
|
static int |
compareMemoryToByteArrayUnsigned(org.apache.datasketches.memory.Memory memory,
long position1,
long length1,
byte[] array,
int position2,
int length2)
Compares Memory with a byte array using unsigned byte ordering.
|
static int |
compareMemoryUnsigned(org.apache.datasketches.memory.Memory memory1,
long position1,
long length1,
org.apache.datasketches.memory.Memory memory2,
long position2,
long length2)
Compares two Memory ranges using unsigned byte ordering.
|
static Supplier<MemoryRange<org.apache.datasketches.memory.Memory>> |
makeRowMemorySupplier(ColumnSelectorFactory columnSelectorFactory,
RowSignature expectedSignature)
Returns a direct row memory supplier if
mayBeAbleToSelectRowMemory(org.apache.druid.segment.ColumnSelectorFactory), otherwise returns null. |
static ByteBuffer |
readByteBuffer(org.apache.datasketches.memory.Memory memory,
long dataStart,
int dataLength)
Returns a ByteBuffer containing data from the provided
Memory. |
public static ByteBuffer readByteBuffer(org.apache.datasketches.memory.Memory memory, long dataStart, int dataLength)
Memory. The ByteBuffer is always newly
created, so it is OK to change its position, limit, etc. However, it may point directly to the backing memory
of the Memory object, so it is not OK to write to its contents.@Nullable public static Supplier<MemoryRange<org.apache.datasketches.memory.Memory>> makeRowMemorySupplier(ColumnSelectorFactory columnSelectorFactory, RowSignature expectedSignature)
mayBeAbleToSelectRowMemory(org.apache.druid.segment.ColumnSelectorFactory), otherwise returns null.
Note that even if the returned supplier is nonnull, it is still possible for the supplied MemoryRange
to be null. Callers must check for this.columnSelectorFactory - frame column selector factoryexpectedSignature - expected signature of the target framepublic static int compareMemoryUnsigned(org.apache.datasketches.memory.Memory memory1,
long position1,
long length1,
org.apache.datasketches.memory.Memory memory2,
long position2,
long length2)
Memory.compareTo(long, long, org.apache.datasketches.memory.Memory, long, long), which uses signed ordering.public static int compareMemoryToByteArrayUnsigned(org.apache.datasketches.memory.Memory memory,
long position1,
long length1,
byte[] array,
int position2,
int length2)
public static int compareByteArraysUnsigned(byte[] array1,
int position1,
int length1,
byte[] array2,
int position2,
int length2)
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.