Class ArrowUtils

java.lang.Object
org.apache.flink.table.runtime.arrow.ArrowUtils

@Internal public final class ArrowUtils extends Object
Utilities for Arrow.
  • Constructor Details

    • ArrowUtils

      public ArrowUtils()
  • Method Details

    • getRootAllocator

      public static org.apache.arrow.memory.RootAllocator getRootAllocator()
    • checkArrowUsable

      public static void checkArrowUsable()
    • toArrowSchema

      public static org.apache.arrow.vector.types.pojo.Schema toArrowSchema(org.apache.flink.table.types.logical.RowType rowType)
      Returns the Arrow schema of the specified type.
    • createRowDataArrowWriter

      public static ArrowWriter<org.apache.flink.table.data.RowData> createRowDataArrowWriter(org.apache.arrow.vector.VectorSchemaRoot root, org.apache.flink.table.types.logical.RowType rowType)
      Creates an ArrowWriter for the specified VectorSchemaRoot.
    • createArrowReader

      public static ArrowReader createArrowReader(org.apache.arrow.vector.VectorSchemaRoot root, org.apache.flink.table.types.logical.RowType rowType)
      Creates an ArrowReader for the specified VectorSchemaRoot.
    • createColumnVector

      public static org.apache.flink.table.data.columnar.vector.ColumnVector createColumnVector(org.apache.arrow.vector.ValueVector vector, org.apache.flink.table.types.logical.LogicalType fieldType)
    • createArrowTableSourceDesc

      public static org.apache.flink.table.api.TableDescriptor createArrowTableSourceDesc(org.apache.flink.table.types.DataType dataType, String fileName)
    • readArrowBatches

      public static byte[][] readArrowBatches(String fileName) throws IOException
      Throws:
      IOException
    • readArrowBatches

      public static byte[][] readArrowBatches(ReadableByteChannel channel) throws IOException
      Throws:
      IOException
    • collectAsPandasDataFrame

      public static org.apache.flink.table.runtime.arrow.ArrowUtils.CustomIterator<byte[]> collectAsPandasDataFrame(org.apache.flink.table.api.Table table, int maxArrowBatchSize) throws Exception
      Convert Flink table to Pandas DataFrame.
      Throws:
      Exception