Function builderThroughIterable

  • Transform a synchronous Iterable of arbitrary JavaScript values into a sequence of Arrow Vector following the chunking semantics defined in the supplied options argument.

    This function returns a function that accepts an Iterable of values to transform. When called, this function returns an Iterator of Vector<T>.

    The resulting Iterator<Vector<T>> yields Vectors based on the queueingStrategy and highWaterMark specified in the options argument.

    • If queueingStrategy is "count" (or omitted), The Iterator<Vector<T>> will flush the underlying Builder (and yield a new Vector<T>) once the Builder's length reaches or exceeds the supplied highWaterMark.
    • If queueingStrategy is "bytes", the Iterator<Vector<T>> will flush the underlying Builder (and yield a new Vector<T>) once its byteLength reaches or exceeds the supplied highWaterMark.

    Type Parameters

    Parameters

    • options: IterableBuilderOptions<T, TNull>

      An object of properties which determine the Builder to create and the chunking semantics to use.

    Returns ThroughIterable<T, TNull>

    A function which accepts a JavaScript Iterable of values to write, and returns an Iterator that yields Vectors according to the chunking semantics defined in the options argument.