Options
All
  • Public
  • Public/Protected
  • All
Menu

Tables are collections of Vectors and have a Schema. Use the convenience methods makeTable or tableFromArrays to create a table in JavaScript. To create a table from the IPC format, use tableFromIPC.

Type Parameters

  • T extends TypeMap = any

Hierarchy

  • Table

Index

Constructors

  • new Table<T>(): Table<T>
  • new Table<T>(batches: Iterable<RecordBatch<T>>): Table<T>
  • new Table<T>(...batches: readonly RecordBatch<T>[]): Table<T>
  • new Table<T>(...columns: { [ P in string | number | symbol]: Vector<T[P]> }[]): Table<T>
  • new Table<T>(...columns: { [ P in string | number | symbol]: Data<T[P]> | DataProps<T[P]> }[]): Table<T>
  • new Table<T>(schema: Schema<T>, data?: RecordBatch<T> | RecordBatch<T>[]): Table<T>
  • new Table<T>(schema: Schema<T>, data?: RecordBatch<T> | RecordBatch<T>[], offsets?: Uint32Array): Table<T>
  • Type Parameters

    • T extends TypeMap = any

    Returns Table<T>

  • Type Parameters

    • T extends TypeMap = any

    Parameters

    • batches: Iterable<RecordBatch<T>>

    Returns Table<T>

  • Type Parameters

    • T extends TypeMap = any

    Parameters

    • Rest ...batches: readonly RecordBatch<T>[]

    Returns Table<T>

  • Type Parameters

    • T extends TypeMap = any

    Parameters

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

    Returns Table<T>

  • Type Parameters

    • T extends TypeMap = any

    Parameters

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

    Returns Table<T>

  • Type Parameters

    • T extends TypeMap = any

    Parameters

    • schema: Schema<T>
    • Optional data: RecordBatch<T> | RecordBatch<T>[]

    Returns Table<T>

  • Type Parameters

    • T extends TypeMap = any

    Parameters

    • schema: Schema<T>
    • Optional data: RecordBatch<T> | RecordBatch<T>[]
    • Optional offsets: Uint32Array

    Returns Table<T>

Properties

TArray: StructRowProxy<T>[]
TType: Struct<T>
TValue: StructRowProxy<T>
[isConcatSpreadable]: true
batches: RecordBatch<T>[]

The contiguous {@link RecordBatch RecordBatch} chunks of the Table rows.

schema: Schema<T>

Accessors

  • get data(): Data<Struct<T>>[]
  • The contiguous {@link RecordBatch RecordBatch} chunks of the Table rows.

    Returns Data<Struct<T>>[]

  • get nullCount(): number
  • The number of null rows in this Table.

    Returns number

  • get numCols(): number
  • The number of columns in this Table.

    Returns number

  • get numRows(): number
  • The number of rows in this Table.

    Returns number

Methods

  • [iterator](): IterableIterator<any>
  • Iterator for rows in this Table.

    Returns IterableIterator<any>

  • Combines two or more Tables of the same schema.

    Parameters

    • Rest ...others: Table<T>[]

      Additional Tables to add to the end of this Tables.

    Returns Table<T>

  • Get an element value by position.

    Parameters

    • index: number

      The index of the element to read.

    Returns null | StructRowProxy<T>

  • getByteLength(index: number): number
  • Get the size in bytes of an element by index.

    Parameters

    • index: number

      The index at which to get the byteLength.

    Returns number

  • getChild<P>(name: P): null | Vector<T[P]>
  • 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 null | Vector<T[P]>

  • getChildAt<R>(index: number): null | Vector<R>
  • 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 null | Vector<R>

  • Retrieve the index of the first occurrence of a value in an Vector.

    Parameters

    • element: StructRowProxy<T>

      The value to locate in the Vector.

    • Optional offset: number

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

    Returns number

  • isValid(index: number): boolean
  • Check whether an element is null.

    Parameters

    • index: number

      The index at which to read the validity bitmap.

    Returns boolean

  • select<K>(columnNames: K[]): Table<{}>
  • Construct a new Table containing only specified columns.

    Type Parameters

    • K extends string | number | symbol = any

    Parameters

    • columnNames: K[]

      Names of columns to keep.

    Returns Table<{}>

    A new Table of columns matching the specified names.

  • selectAt<K>(columnIndices: number[]): Table<{}>
  • Construct a new Table containing only columns at the specified indices.

    Type Parameters

    Parameters

    • columnIndices: number[]

      Indices of columns to keep.

    Returns Table<{}>

    A new Table of columns at the specified indices.

  • Set an element value by position.

    Parameters

    • index: number

      The index of the element to write.

    • value: null | StructRowProxy<T>

      The value to set.

    Returns void

  • setChild<P, R>(name: P, child: Vector<R>): Table<T & { [ K in string | number | symbol]: R }>
  • Sets a child Vector by name.

    Type Parameters

    • P extends string | number | symbol

    • R extends DataType<Type, any, R>

    Parameters

    • name: P

      The name of the child to overwrite.

    • child: Vector<R>

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

    A new Table with the supplied child for the specified name.

  • setChildAt(index: number, child?: null): Table<any>
  • setChildAt<R>(index: number, child: Vector<R>): Table<any>
  • Sets a child Vector by index.

    Parameters

    • index: number

      The index of the child to overwrite.

    • Optional child: null

    Returns Table<any>

    A new Table with the supplied child at the specified index.

  • Type Parameters

    Parameters

    Returns Table<any>

  • slice(begin?: number, end?: number): Table<T>
  • Return a zero-copy sub-section of this Table.

    Parameters

    • Optional begin: number

      The beginning of the specified portion of the Table.

    • Optional end: number

      The end of the specified portion of the Table. This is exclusive of the element at the index 'end'.

    Returns Table<T>

  • toArray(): any[]
  • Return a JavaScript Array of the Table rows.

    Returns any[]

    An Array of Table rows.

  • toString(): string
  • Returns a string representation of the Table rows.

    Returns string

    A string representation of the Table rows.

Generated using TypeDoc