Class ArrowUtils


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

      • ArrowUtils

        public ArrowUtils()
    • Method Detail

      • 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)
      • 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