Apache Arrow - v21.1.0
    Preparing search index...

    Class RecordBatch<T>

    A RecordBatch is a collection of equal-length columns conforming to a particular Schema. A Table is composed of one or more RecordBatches.

    Type Parameters

    • T extends TypeMap = any
    Index

    Constructors

    • Type Parameters

      • T extends TypeMap = any

      Parameters

      • columns: { [P in string | number | symbol]: Data<T[P]> }

      Returns RecordBatch<T>

    • Type Parameters

      • T extends TypeMap = any

      Parameters

      • schema: Schema<T>
      • Optionaldata: Data<Struct<T>>
      • Optionalmetadata: Map<string, string>

      Returns RecordBatch<T>

    Properties

    "[isConcatSpreadable]": true
    "[kRecordBatchSymbol]": true
    data: Data<Struct<T>>
    schema: Schema<T>
    TArray: StructRowProxy<T>[]
    TType: Struct<T>
    TValue: StructRowProxy<T>

    Accessors

    • get metadata(): Map<string, string>

      Custom metadata for this RecordBatch.

      Returns Map<string, string>

    • get nullCount(): number

      The number of null rows in this RecordBatch.

      Returns number

    • get numCols(): number

      The number of columns in this RecordBatch.

      Returns number

    • get numRows(): number

      The number of rows in this RecordBatch.

      Returns number

    Methods

    • Returns a child Vector by name, or null if this Vector has no child with the given name.

      Type Parameters

      • P extends string | number | symbol

      Parameters

      • name: P

        The name of the child to retrieve.

      Returns Vector<T[P]> | null

    • Returns a child Vector by index, or null if this Vector has no child at the supplied index.

      Type Parameters

      Parameters

      • index: number

        The index of the child to retrieve.

      Returns Vector<R> | null

    • Retrieve the index of the first occurrence of a row in an RecordBatch.

      Parameters

      • element: StructRowProxy<T>

        The row to locate in the RecordBatch.

      • Optionaloffset: number

        The index at which to begin the search. If offset is omitted, the search starts at index 0.

      Returns number

    • Check whether an row is null.

      Parameters

      • index: number

        The index at which to read the validity bitmap.

      Returns boolean

    • Construct a new RecordBatch containing only specified columns.

      Type Parameters

      • K extends string | number | symbol = any

      Parameters

      • columnNames: K[]

        Names of columns to keep.

      Returns RecordBatch<{ [P in string | number | symbol]: T[P] }>

      A new RecordBatch of columns matching the specified names.

    • Construct a new RecordBatch containing only columns at the specified indices.

      Type Parameters

      • K extends TypeMap = any

      Parameters

      • columnIndices: number[]

        Indices of columns to keep.

      Returns RecordBatch<{ [P in string | number | symbol]: K[P] }>

      A new RecordBatch of columns matching at the specified indices.

    • Sets a child Vector by name.

      Type Parameters

      • P extends string | number | symbol
      • R extends DataType<Type, any>

      Parameters

      • name: P

        The name of the child to overwrite.

      • child: Vector<R>

      Returns RecordBatch<T & { [K in string | number | symbol]: R }>

      A new RecordBatch with the new child for the specified name.

    • Sets a child Vector by index.

      Parameters

      • index: number

        The index of the child to overwrite.

      • Optionalchild: null

      Returns RecordBatch

      A new RecordBatch with the new child at the specified index.

    • Sets a child Vector by index.

      Type Parameters

      Parameters

      • index: number

        The index of the child to overwrite.

      • child: Vector<R>

      Returns RecordBatch

      A new RecordBatch with the new child at the specified index.

    • Return a zero-copy sub-section of this RecordBatch.

      Parameters

      • Optionalbegin: number
      • Optionalend: number

        The end of the specified portion of the RecordBatch. This is exclusive of the row at the index 'end'.

      Returns RecordBatch<T>