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: TypeMap = any

Hierarchy

  • Table

Index

Constructors

constructor

  • 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: TypeMap = any

    Returns Table<T>

  • Type parameters

    • T: TypeMap = any

    Parameters

    • batches: Iterable<RecordBatch<T>>

    Returns Table<T>

  • Type parameters

    • T: TypeMap = any

    Parameters

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

    Returns Table<T>

  • Type parameters

    • T: TypeMap = any

    Parameters

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

    Returns Table<T>

  • Type parameters

    • T: TypeMap = any

    Parameters

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

    Returns Table<T>

  • Type parameters

    • T: TypeMap = any

    Parameters

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

    Returns Table<T>

  • Type parameters

    • T: TypeMap = any

    Parameters

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

    Returns Table<T>

Properties

Readonly TArray

TArray: StructRowProxy<T>[]

Readonly TType

TType: Struct<T>

Readonly TValue

TValue: StructRowProxy<T>

[isConcatSpreadable]

[isConcatSpreadable]: true

Readonly batches

batches: RecordBatch<T>[]

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

Readonly schema

schema: Schema<T>

Accessors

data

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

    Returns Data<Struct<T>>[]

nullCount

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

    Returns number

numCols

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

    Returns number

numRows

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

    Returns number

Methods

[iterator]

  • [iterator](): IterableIterator<null | StructRowProxy<T>>
  • Iterator for rows in this Table.

    Returns IterableIterator<null | StructRowProxy<T>>

assign

concat

  • 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

  • get(index: number): null | StructRowProxy<T>
  • Get an element value by position.

    Parameters

    • index: number

      The index of the element to read.

    Returns null | StructRowProxy<T>

getByteLength

  • 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

  • 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: string | number | symbol

    Parameters

    • name: P

      The name of the child to retrieve.

    Returns null | Vector<T[P]>

getChildAt

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

indexOf

  • indexOf(element: StructRowProxy<T>, offset?: number): number
  • 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

  • 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

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

    Type parameters

    • K: string | number | symbol = any

    Parameters

    • columnNames: K[]

      Names of columns to keep.

    Returns Table<{}>

    A new Table of columns matching the specified names.

selectAt

  • 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

  • set(index: number, value: null | StructRowProxy<T>): void
  • 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

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

    Type parameters

    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

  • 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

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

    Parameters

    • Optional begin: number
    • 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

  • toArray(): (null | StructRowProxy<T>)[]
  • Return a JavaScript Array of the Table rows.

    Returns (null | StructRowProxy<T>)[]

    An Array of Table rows.

toString

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

    Returns string

    A string representation of the Table rows.

Generated using TypeDoc