Class ArrowToTableConverter
java.lang.Object
io.deephaven.extensions.barrage.util.ArrowToTableConverter
- Direct Known Subclasses:
ArrowFlightUtil.DoPutObserver
This class allows the incremental making of a BarrageTable from Arrow IPC messages, starting with an Arrow Schema
message followed by zero or more RecordBatches
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BarrageSubscriptionOptionsprotected BarrageTableprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidUpdates the per-streamDictionaryReaderRegistryfrom a parsedDictionaryBatchmessage.voidaddRecordBatch(ByteBuffer ipcMessage) voidaddRecordBatches(ByteBuffer... ipcMessages) protected voidconfigureWithSchema(org.apache.arrow.flatbuf.Schema schema) protected BarrageMessagecreateBarrageMessage(BarrageProtoUtil.MessageInfo mi, int numColumns) static PrimitiveIterator.OfLongextractBufferInfo(@NotNull org.apache.arrow.flatbuf.RecordBatch batch) voidstatic BarrageProtoUtil.MessageInfostatic org.apache.arrow.flatbuf.SchemavoidsetSchema(ByteBuffer ipcMessage)
-
Field Details
-
totalRowsRead
protected long totalRowsRead -
resultTable
-
options
-
-
Constructor Details
-
ArrowToTableConverter
public ArrowToTableConverter()
-
-
Method Details
-
parseArrowIpcMessage
-
parseArrowSchema
-
extractBufferInfo
public static PrimitiveIterator.OfLong extractBufferInfo(@NotNull @NotNull org.apache.arrow.flatbuf.RecordBatch batch) -
setSchema
-
addRecordBatches
-
addDictionaryBatch
Updates the per-streamDictionaryReaderRegistryfrom a parsedDictionaryBatchmessage. Callable by subclasses that receiveDictionaryBatchmessages through a different transport path (e.g. gRPC doPut streaming).- Throws:
IllegalStateException- if the dictionary id is not present in the schema
-
addRecordBatch
-
getResultTable
-
onCompleted
- Throws:
InterruptedException
-
configureWithSchema
protected void configureWithSchema(org.apache.arrow.flatbuf.Schema schema) -
createBarrageMessage
-