Class ArrowConversion
- java.lang.Object
-
- org.apache.beam.sdk.extensions.arrow.ArrowConversion
-
public class ArrowConversion extends java.lang.ObjectUtilities to createIterables of BeamRowinstances backed by Arrow record batches.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArrowConversion.ArrowSchemaTranslatorConverts Arrow schema to Beam row schema.static classArrowConversion.RecordBatchRowIterator
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.arrow.vector.types.pojo.SchemaarrowSchemaFromInput(java.io.InputStream input)static ArrowConversion.RecordBatchRowIteratorrowsFromRecordBatch(org.apache.beam.sdk.schemas.Schema schema, org.apache.arrow.vector.VectorSchemaRoot vectorSchemaRoot)Returns aArrowConversion.RecordBatchRowIteratorbacked by the Arrow record batch stored invectorSchemaRoot.static ArrowConversion.RecordBatchRowIteratorrowsFromSerializedRecordBatch(org.apache.arrow.vector.types.pojo.Schema arrowSchema, java.io.InputStream inputStream, org.apache.arrow.memory.RootAllocator allocator)
-
-
-
Method Detail
-
rowsFromRecordBatch
public static ArrowConversion.RecordBatchRowIterator rowsFromRecordBatch(org.apache.beam.sdk.schemas.Schema schema, org.apache.arrow.vector.VectorSchemaRoot vectorSchemaRoot)
Returns aArrowConversion.RecordBatchRowIteratorbacked by the Arrow record batch stored invectorSchemaRoot.Note this is a lazy interface. The data in the underlying Arrow buffer is not read until a field of one of the returned
Rows is accessed.
-
rowsFromSerializedRecordBatch
public static ArrowConversion.RecordBatchRowIterator rowsFromSerializedRecordBatch(org.apache.arrow.vector.types.pojo.Schema arrowSchema, java.io.InputStream inputStream, org.apache.arrow.memory.RootAllocator allocator) throws java.io.IOException
- Throws:
java.io.IOException
-
arrowSchemaFromInput
public static org.apache.arrow.vector.types.pojo.Schema arrowSchemaFromInput(java.io.InputStream input) throws java.io.IOException- Throws:
java.io.IOException
-
-