Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@apache-arrow/esnext-esm

Package Overview
Dependencies
Maintainers
5
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apache-arrow/esnext-esm - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

15

Arrow.d.ts
/// <reference types="flatbuffers" />
export { ArrowType, DateUnit, IntervalUnit, MessageHeader, MetadataVersion, Precision, TimeUnit, Type, UnionMode, BufferType } from './enum';
export { DateUnit, TimeUnit, Precision, UnionMode, IntervalUnit, MetadataVersion, } from './fb/Schema';
export { MessageHeader } from './fb/Message';
export { Type, BufferType } from './enum';
export { Data } from './data';

@@ -21,7 +23,12 @@ export { DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Binary, FixedSizeBinary, Date_, DateDay, DateMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Decimal, List, Struct, Union, DenseUnion, SparseUnion, Dictionary, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Map_, } from './type';

import * as util_int_ from './util/int';
import * as util_bit_ from './util/bit';
import * as util_buffer_ from './util/buffer';
import * as predicate from './compute/predicate';
import { compareSchemas, compareFields, compareTypes } from './visitor/typecomparator';
export { predicate };
/** @ignore */
export declare const util: {
compareSchemas: typeof compareSchemas;
compareFields: typeof compareFields;
compareTypes: typeof compareTypes;
clampIndex<T extends {

@@ -88,6 +95,6 @@ length: number;

packBools(values: Iterable<any>): Uint8Array;
iterateBits<T_9>(bytes: Uint8Array, begin: number, length: number, context: any, get: (context: any, index: number, byte: number, bit: number) => T_9): Generator<T_9, void, unknown>;
popcnt_bit_range(data: Uint8Array, lhs: number, rhs: number): number;
popcnt_array(arr: ArrayBufferView, byteOffset?: number | undefined, byteLength?: number | undefined): number;
popcnt_uint32(uint32: number): number;
BitIterator: typeof util_bit_.BitIterator;
BaseInt64: typeof util_int_.BaseInt64;

@@ -98,5 +105,5 @@ Uint64: typeof util_int_.Uint64;

isArrowBigNumSymbol: typeof util_bn_.isArrowBigNumSymbol;
bignumToString: <T_10 extends util_bn_.BN<Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array>>(a: T_10) => string;
bignumToBigInt: <T_11 extends util_bn_.BN<Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array>>(a: T_11) => bigint;
bignumToString: <T_9 extends util_bn_.BN<Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array>>(a: T_9) => string;
bignumToBigInt: <T_10 extends util_bn_.BN<Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array>>(a: T_10) => bigint;
BN: typeof util_bn_.BN;
};

@@ -1,1 +0,1 @@

export { ArrowType, DateUnit, IntervalUnit, MessageHeader, MetadataVersion, Precision, TimeUnit, Type, UnionMode, BufferType, Data, DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Binary, FixedSizeBinary, Date_, DateDay, DateMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Decimal, List, Struct, Union, DenseUnion, SparseUnion, Dictionary, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Map_, Table, Column, Schema, Field, Visitor, Vector, BaseVector, BinaryVector, BoolVector, Chunked, DateVector, DateDayVector, DateMillisecondVector, DecimalVector, DictionaryVector, FixedSizeBinaryVector, FixedSizeListVector, FloatVector, Float16Vector, Float32Vector, Float64Vector, IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector, IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector, ListVector, MapVector, NullVector, StructVector, TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector, TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector, UnionVector, DenseUnionVector, SparseUnionVector, Utf8Vector, ByteStream, AsyncByteStream, AsyncByteQueue, ReadableSource, WritableSink, RecordBatchReader, RecordBatchFileReader, RecordBatchStreamReader, AsyncRecordBatchFileReader, AsyncRecordBatchStreamReader, RecordBatchWriter, RecordBatchFileWriter, RecordBatchStreamWriter, RecordBatchJSONWriter, MessageReader, AsyncMessageReader, JSONMessageReader, Message, RecordBatch, ArrowJSONLike, FileHandle, Readable, Writable, ReadableWritable, ReadableDOMStreamOptions, DataFrame, FilteredDataFrame, CountByResult, BindFunc, NextFunc, predicate, util, Builder, BinaryBuilder, BoolBuilder, DateBuilder, DateDayBuilder, DateMillisecondBuilder, DecimalBuilder, DictionaryBuilder, FixedSizeBinaryBuilder, FixedSizeListBuilder, FloatBuilder, Float16Builder, Float32Builder, Float64Builder, IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder, IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder, ListBuilder, MapBuilder, NullBuilder, StructBuilder, TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder, TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder, UnionBuilder, DenseUnionBuilder, SparseUnionBuilder, Utf8Builder, } from './Arrow';
export { DateUnit, IntervalUnit, MessageHeader, MetadataVersion, Precision, TimeUnit, Type, UnionMode, BufferType, Data, DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Binary, FixedSizeBinary, Date_, DateDay, DateMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Decimal, List, Struct, Union, DenseUnion, SparseUnion, Dictionary, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Map_, Table, Column, Schema, Field, Visitor, Vector, BaseVector, BinaryVector, BoolVector, Chunked, DateVector, DateDayVector, DateMillisecondVector, DecimalVector, DictionaryVector, FixedSizeBinaryVector, FixedSizeListVector, FloatVector, Float16Vector, Float32Vector, Float64Vector, IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector, IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector, ListVector, MapVector, NullVector, StructVector, TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector, TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector, UnionVector, DenseUnionVector, SparseUnionVector, Utf8Vector, ByteStream, AsyncByteStream, AsyncByteQueue, ReadableSource, WritableSink, RecordBatchReader, RecordBatchFileReader, RecordBatchStreamReader, AsyncRecordBatchFileReader, AsyncRecordBatchStreamReader, RecordBatchWriter, RecordBatchFileWriter, RecordBatchStreamWriter, RecordBatchJSONWriter, MessageReader, AsyncMessageReader, JSONMessageReader, Message, RecordBatch, ArrowJSONLike, FileHandle, Readable, Writable, ReadableWritable, ReadableDOMStreamOptions, DataFrame, FilteredDataFrame, CountByResult, BindFunc, NextFunc, predicate, util, Builder, BinaryBuilder, BoolBuilder, DateBuilder, DateDayBuilder, DateMillisecondBuilder, DecimalBuilder, DictionaryBuilder, FixedSizeBinaryBuilder, FixedSizeListBuilder, FloatBuilder, Float16Builder, Float32Builder, Float64Builder, IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder, IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder, ListBuilder, MapBuilder, NullBuilder, StructBuilder, TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder, TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder, UnionBuilder, DenseUnionBuilder, SparseUnionBuilder, Utf8Builder, } from './Arrow';

@@ -19,4 +19,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

import { Builder } from './builder/index';
import { RecordBatchReader } from './ipc/reader';
import { RecordBatchWriter } from './ipc/writer';
import { RecordBatchReader, RecordBatchFileReader, RecordBatchStreamReader, } from './ipc/reader';
import { RecordBatchWriter, RecordBatchFileWriter, RecordBatchStreamWriter, } from './ipc/writer';
import { toDOMStream } from './io/whatwg/iterable';

@@ -29,5 +29,9 @@ import { builderThroughDOMStream } from './io/whatwg/builder';

RecordBatchReader['throughDOM'] = recordBatchReaderThroughDOMStream;
RecordBatchFileReader['throughDOM'] = recordBatchReaderThroughDOMStream;
RecordBatchStreamReader['throughDOM'] = recordBatchReaderThroughDOMStream;
RecordBatchWriter['throughDOM'] = recordBatchWriterThroughDOMStream;
export { ArrowType, DateUnit, IntervalUnit, MessageHeader, MetadataVersion, Precision, TimeUnit, Type, UnionMode, BufferType, Data, DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Binary, FixedSizeBinary, Date_, DateDay, DateMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Decimal, List, Struct, Union, DenseUnion, SparseUnion, Dictionary, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Map_, Table, Column, Schema, Field, Visitor, Vector, BaseVector, BinaryVector, BoolVector, Chunked, DateVector, DateDayVector, DateMillisecondVector, DecimalVector, DictionaryVector, FixedSizeBinaryVector, FixedSizeListVector, FloatVector, Float16Vector, Float32Vector, Float64Vector, IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector, IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector, ListVector, MapVector, NullVector, StructVector, TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector, TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector, UnionVector, DenseUnionVector, SparseUnionVector, Utf8Vector, ByteStream, AsyncByteStream, AsyncByteQueue, RecordBatchReader, RecordBatchFileReader, RecordBatchStreamReader, AsyncRecordBatchFileReader, AsyncRecordBatchStreamReader, RecordBatchWriter, RecordBatchFileWriter, RecordBatchStreamWriter, RecordBatchJSONWriter, MessageReader, AsyncMessageReader, JSONMessageReader, Message, RecordBatch, DataFrame, FilteredDataFrame, CountByResult, predicate, util, Builder, BinaryBuilder, BoolBuilder, DateBuilder, DateDayBuilder, DateMillisecondBuilder, DecimalBuilder, DictionaryBuilder, FixedSizeBinaryBuilder, FixedSizeListBuilder, FloatBuilder, Float16Builder, Float32Builder, Float64Builder, IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder, IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder, ListBuilder, MapBuilder, NullBuilder, StructBuilder, TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder, TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder, UnionBuilder, DenseUnionBuilder, SparseUnionBuilder, Utf8Builder, } from './Arrow';
RecordBatchFileWriter['throughDOM'] = recordBatchWriterThroughDOMStream;
RecordBatchStreamWriter['throughDOM'] = recordBatchWriterThroughDOMStream;
export { DateUnit, IntervalUnit, MessageHeader, MetadataVersion, Precision, TimeUnit, Type, UnionMode, BufferType, Data, DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Binary, FixedSizeBinary, Date_, DateDay, DateMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Decimal, List, Struct, Union, DenseUnion, SparseUnion, Dictionary, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Map_, Table, Column, Schema, Field, Visitor, Vector, BaseVector, BinaryVector, BoolVector, Chunked, DateVector, DateDayVector, DateMillisecondVector, DecimalVector, DictionaryVector, FixedSizeBinaryVector, FixedSizeListVector, FloatVector, Float16Vector, Float32Vector, Float64Vector, IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector, IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector, ListVector, MapVector, NullVector, StructVector, TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector, TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector, UnionVector, DenseUnionVector, SparseUnionVector, Utf8Vector, ByteStream, AsyncByteStream, AsyncByteQueue, RecordBatchReader, RecordBatchFileReader, RecordBatchStreamReader, AsyncRecordBatchFileReader, AsyncRecordBatchStreamReader, RecordBatchWriter, RecordBatchFileWriter, RecordBatchStreamWriter, RecordBatchJSONWriter, MessageReader, AsyncMessageReader, JSONMessageReader, Message, RecordBatch, DataFrame, FilteredDataFrame, CountByResult, predicate, util, Builder, BinaryBuilder, BoolBuilder, DateBuilder, DateDayBuilder, DateMillisecondBuilder, DecimalBuilder, DictionaryBuilder, FixedSizeBinaryBuilder, FixedSizeListBuilder, FloatBuilder, Float16Builder, Float32Builder, Float64Builder, IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder, IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder, ListBuilder, MapBuilder, NullBuilder, StructBuilder, TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder, TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder, UnionBuilder, DenseUnionBuilder, SparseUnionBuilder, Utf8Builder, } from './Arrow';
//# sourceMappingURL=Arrow.dom.mjs.map

@@ -17,3 +17,5 @@ // Licensed to the Apache Software Foundation (ASF) under one

// under the License.
export { ArrowType, DateUnit, IntervalUnit, MessageHeader, MetadataVersion, Precision, TimeUnit, Type, UnionMode, BufferType } from './enum';
export { DateUnit, TimeUnit, Precision, UnionMode, IntervalUnit, MetadataVersion, } from './fb/Schema';
export { MessageHeader } from './fb/Message';
export { Type, BufferType } from './enum';
export { Data } from './data';

@@ -41,2 +43,3 @@ export { DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Binary, FixedSizeBinary, Date_, DateDay, DateMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Decimal, List, Struct, Union, DenseUnion, SparseUnion, Dictionary, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Map_, } from './type';

import * as predicate from './compute/predicate';
import { compareSchemas, compareFields, compareTypes } from './visitor/typecomparator';
export { predicate };

@@ -50,5 +53,8 @@ /** @ignore */

...util_buffer_,
...util_vector_
...util_vector_,
compareSchemas,
compareFields,
compareTypes,
};
//# sourceMappingURL=Arrow.mjs.map

@@ -18,3 +18,2 @@ #! /usr/bin/env node

// under the License.
/* tslint:disable */
import * as fs from 'fs';

@@ -24,2 +23,3 @@ import * as stream from 'stream';

import { RecordBatchReader, AsyncByteQueue } from '../Arrow.node';
/* eslint-disable @typescript-eslint/no-require-imports */
const padLeft = require('pad-left');

@@ -71,5 +71,5 @@ const bignumJSONParse = require('json-bignum').parse;

async function* recordBatchReaders(createSourceStream) {
let json = new AsyncByteQueue();
let stream = new AsyncByteQueue();
let source = createSourceStream();
const json = new AsyncByteQueue();
const stream = new AsyncByteQueue();
const source = createSourceStream();
let reader = null;

@@ -137,3 +137,3 @@ let readers = null;

state.maxColWidths = measureColumnWidths(rowId, batch, header.map((x, i) => Math.max(maxColWidths[i] || 0, x.length)));
// If this is the first batch in a stream, print a top horizontal rule, schema metadata, and
// If this is the first batch in a stream, print a top horizontal rule, schema metadata, and
if (++batchId === 0) {

@@ -140,0 +140,0 @@ hr && this.push(`${horizontalRule(state.maxColWidths, hr, sep)}\n`);

@@ -231,3 +231,2 @@ // Licensed to the Apache Software Foundation (ASF) under one

*/
// @ts-ignore
isValid(value) { return this._isValid(value); }

@@ -256,3 +255,2 @@ /**

*/
// @ts-ignore
setValue(index, value) { this._setValue(this, index, value); }

@@ -399,3 +397,3 @@ setValid(index, valid) {

let numChunks = 0;
let builder = Builder.new(options);
const builder = Builder.new(options);
for (const value of source) {

@@ -418,3 +416,3 @@ if (builder.append(value)[sizeProperty] >= highWaterMark) {

let numChunks = 0;
let builder = Builder.new(options);
const builder = Builder.new(options);
for await (const value of source) {

@@ -421,0 +419,0 @@ if (builder.append(value)[sizeProperty] >= highWaterMark) {

@@ -46,4 +46,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

setValue(index, value) {
let keysToIndices = this._keysToIndices;
let key = this.valueToKey(value);
const keysToIndices = this._keysToIndices;
const key = this.valueToKey(value);
let idx = keysToIndices[key];

@@ -50,0 +50,0 @@ if (idx === undefined) {

@@ -43,3 +43,2 @@ // Licensed to the Apache Software Foundation (ASF) under one

}
// @ts-ignore
setValue(index, value, childTypeId) {

@@ -49,3 +48,2 @@ this._typeIds.set(index, childTypeId);

}
// @ts-ignore
addChild(child, name = `${this.children.length}`) {

@@ -52,0 +50,0 @@ const childTypeId = this.children.push(child);

@@ -45,3 +45,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

let fnBody = '';
let noNaNs = nullValues.filter((x) => x === x);
const noNaNs = nullValues.filter((x) => x === x);
if (noNaNs.length > 0) {

@@ -48,0 +48,0 @@ fnBody = `

@@ -59,3 +59,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

}
let columns = this._children || (this._children = []);
const columns = this._children || (this._children = []);
let column, field, chunks;

@@ -62,0 +62,0 @@ if (column = columns[index]) {

@@ -25,3 +25,3 @@ import { Table } from '../table';

constructor(values: Vector<T>, counts: V<TCount>);
toJSON(): Object;
toJSON(): Record<string, unknown>;
}

@@ -28,0 +28,0 @@ /** @ignore */

@@ -81,3 +81,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

for (let index = -1, numRows = batch.length; ++index < numRows;) {
let key = keys.get(index);
const key = keys.get(index);
if (key !== null) {

@@ -111,2 +111,37 @@ counts[key]++;

/** @ignore */
class FilteredBatchIterator {
constructor(batches, predicate) {
this.batches = batches;
this.predicate = predicate;
this.batchIndex = 0;
this.index = 0;
// TODO: bind batches lazily
// If predicate doesn't match anything in the batch we don't need
// to bind the callback
this.batch = this.batches[this.batchIndex];
this.predicateFunc = this.predicate.bind(this.batch);
}
next() {
while (this.batchIndex < this.batches.length) {
while (this.index < this.batch.length) {
if (this.predicateFunc(this.index, this.batch)) {
return {
value: this.batch.get(this.index++),
};
}
this.index++;
}
if (++this.batchIndex < this.batches.length) {
this.index = 0;
this.batch = this.batches[this.batchIndex];
this.predicateFunc = this.predicate.bind(this.batch);
}
}
return { done: true, value: null };
}
[Symbol.iterator]() {
return this;
}
}
/** @ignore */
export class FilteredDataFrame extends DataFrame {

@@ -179,3 +214,2 @@ constructor(batches, predicate) {

const predicate = this._predicate.bind(batch);
// yield all indices
for (let index = -1, numRows = batch.length; ++index < numRows;) {

@@ -189,3 +223,3 @@ if (predicate(index, batch)) {

}
*[Symbol.iterator]() {
[Symbol.iterator]() {
// inlined version of this:

@@ -195,18 +229,3 @@ // this.parent.scan((idx, columns) => {

// });
const batches = this._chunks;
const numBatches = batches.length;
for (let batchIndex = -1; ++batchIndex < numBatches;) {
// load batches
const batch = batches[batchIndex];
// TODO: bind batches lazily
// If predicate doesn't match anything in the batch we don't need
// to bind the callback
const predicate = this._predicate.bind(batch);
// yield all indices
for (let index = -1, numRows = batch.length; ++index < numRows;) {
if (predicate(index, batch)) {
yield batch.get(index);
}
}
}
return new FilteredBatchIterator(this._chunks, this._predicate);
}

@@ -239,3 +258,3 @@ filter(predicate) {

for (let index = -1, numRows = batch.length; ++index < numRows;) {
let key = keys.get(index);
const key = keys.get(index);
if (key !== null && predicate(index, batch)) {

@@ -242,0 +261,0 @@ counts[key]++;

@@ -57,3 +57,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

let byteLength = 0;
let { valueOffsets, values, nullBitmap, typeIds } = this;
const { valueOffsets, values, nullBitmap, typeIds } = this;
valueOffsets && (byteLength += valueOffsets.byteLength);

@@ -106,3 +106,4 @@ values && (byteLength += values.byteLength);

_sliceBuffers(offset, length, stride, typeId) {
let arr, { buffers } = this;
let arr;
const { buffers } = this;
// If typeIds exist, slice the typeIds buffer

@@ -109,0 +110,0 @@ (arr = buffers[BufferType.TYPE]) && (buffers[BufferType.TYPE] = arr.subarray(offset, offset + length));

@@ -1,11 +0,3 @@

import * as Schema_ from './fb/Schema';
import * as Message_ from './fb/Message';
export import ArrowType = Schema_.org.apache.arrow.flatbuf.Type;
export import DateUnit = Schema_.org.apache.arrow.flatbuf.DateUnit;
export import TimeUnit = Schema_.org.apache.arrow.flatbuf.TimeUnit;
export import Precision = Schema_.org.apache.arrow.flatbuf.Precision;
export import UnionMode = Schema_.org.apache.arrow.flatbuf.UnionMode;
export import IntervalUnit = Schema_.org.apache.arrow.flatbuf.IntervalUnit;
export import MessageHeader = Message_.org.apache.arrow.flatbuf.MessageHeader;
export import MetadataVersion = Schema_.org.apache.arrow.flatbuf.MetadataVersion;
export { DateUnit, TimeUnit, Precision, UnionMode, IntervalUnit, MetadataVersion, } from './fb/Schema';
export { MessageHeader } from './fb/Message';
/**

@@ -12,0 +4,0 @@ * Main data type enumeration.

@@ -17,12 +17,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

// under the License.
import * as Schema_ from './fb/Schema';
import * as Message_ from './fb/Message';
export var ArrowType = Schema_.org.apache.arrow.flatbuf.Type;
export var DateUnit = Schema_.org.apache.arrow.flatbuf.DateUnit;
export var TimeUnit = Schema_.org.apache.arrow.flatbuf.TimeUnit;
export var Precision = Schema_.org.apache.arrow.flatbuf.Precision;
export var UnionMode = Schema_.org.apache.arrow.flatbuf.UnionMode;
export var IntervalUnit = Schema_.org.apache.arrow.flatbuf.IntervalUnit;
export var MessageHeader = Message_.org.apache.arrow.flatbuf.MessageHeader;
export var MetadataVersion = Schema_.org.apache.arrow.flatbuf.MetadataVersion;
export { DateUnit, TimeUnit, Precision, UnionMode, IntervalUnit, MetadataVersion, } from './fb/Schema';
export { MessageHeader } from './fb/Message';
/**

@@ -29,0 +21,0 @@ * Main data type enumeration.

import { flatbuffers } from 'flatbuffers';
import * as NS7624605610262437867 from './Schema';
import * as NS13596923344997147894 from './Schema';
/**

@@ -10,93 +10,130 @@ * ----------------------------------------------------------------------

*/
export declare namespace org.apache.arrow.flatbuf {
class Footer {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Footer
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Footer;
/**
* @param flatbuffers.ByteBuffer bb
* @param Footer= obj
* @returns Footer
*/
static getRootAsFooter(bb: flatbuffers.ByteBuffer, obj?: Footer): Footer;
/**
* @returns org.apache.arrow.flatbuf.MetadataVersion
*/
version(): NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion;
/**
* @param org.apache.arrow.flatbuf.Schema= obj
* @returns org.apache.arrow.flatbuf.Schema|null
*/
schema(obj?: NS7624605610262437867.org.apache.arrow.flatbuf.Schema): NS7624605610262437867.org.apache.arrow.flatbuf.Schema | null;
/**
* @param number index
* @param org.apache.arrow.flatbuf.Block= obj
* @returns org.apache.arrow.flatbuf.Block
*/
dictionaries(index: number, obj?: org.apache.arrow.flatbuf.Block): org.apache.arrow.flatbuf.Block | null;
/**
* @returns number
*/
dictionariesLength(): number;
/**
* @param number index
* @param org.apache.arrow.flatbuf.Block= obj
* @returns org.apache.arrow.flatbuf.Block
*/
recordBatches(index: number, obj?: org.apache.arrow.flatbuf.Block): org.apache.arrow.flatbuf.Block | null;
/**
* @returns number
*/
recordBatchesLength(): number;
/**
* @param flatbuffers.Builder builder
*/
static startFooter(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.MetadataVersion version
*/
static addVersion(builder: flatbuffers.Builder, version: NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset schemaOffset
*/
static addSchema(builder: flatbuffers.Builder, schemaOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset dictionariesOffset
*/
static addDictionaries(builder: flatbuffers.Builder, dictionariesOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startDictionariesVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset recordBatchesOffset
*/
static addRecordBatches(builder: flatbuffers.Builder, recordBatchesOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startRecordBatchesVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endFooter(builder: flatbuffers.Builder): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishFooterBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
static createFooter(builder: flatbuffers.Builder, version: NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion, schemaOffset: flatbuffers.Offset, dictionariesOffset: flatbuffers.Offset, recordBatchesOffset: flatbuffers.Offset): flatbuffers.Offset;
}
export declare class Footer {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Footer
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Footer;
/**
* @param flatbuffers.ByteBuffer bb
* @param Footer= obj
* @returns Footer
*/
static getRootAsFooter(bb: flatbuffers.ByteBuffer, obj?: Footer): Footer;
/**
* @param flatbuffers.ByteBuffer bb
* @param Footer= obj
* @returns Footer
*/
static getSizePrefixedRootAsFooter(bb: flatbuffers.ByteBuffer, obj?: Footer): Footer;
/**
* @returns MetadataVersion
*/
version(): NS13596923344997147894.MetadataVersion;
/**
* @param Schema= obj
* @returns Schema|null
*/
schema(obj?: NS13596923344997147894.Schema): NS13596923344997147894.Schema | null;
/**
* @param number index
* @param Block= obj
* @returns Block
*/
dictionaries(index: number, obj?: Block): Block | null;
/**
* @returns number
*/
dictionariesLength(): number;
/**
* @param number index
* @param Block= obj
* @returns Block
*/
recordBatches(index: number, obj?: Block): Block | null;
/**
* @returns number
*/
recordBatchesLength(): number;
/**
* User-defined metadata
*
* @param number index
* @param KeyValue= obj
* @returns KeyValue
*/
customMetadata(index: number, obj?: NS13596923344997147894.KeyValue): NS13596923344997147894.KeyValue | null;
/**
* @returns number
*/
customMetadataLength(): number;
/**
* @param flatbuffers.Builder builder
*/
static startFooter(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param MetadataVersion version
*/
static addVersion(builder: flatbuffers.Builder, version: NS13596923344997147894.MetadataVersion): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset schemaOffset
*/
static addSchema(builder: flatbuffers.Builder, schemaOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset dictionariesOffset
*/
static addDictionaries(builder: flatbuffers.Builder, dictionariesOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startDictionariesVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset recordBatchesOffset
*/
static addRecordBatches(builder: flatbuffers.Builder, recordBatchesOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startRecordBatchesVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset customMetadataOffset
*/
static addCustomMetadata(builder: flatbuffers.Builder, customMetadataOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createCustomMetadataVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startCustomMetadataVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endFooter(builder: flatbuffers.Builder): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishFooterBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishSizePrefixedFooterBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
static createFooter(builder: flatbuffers.Builder, version: NS13596923344997147894.MetadataVersion, schemaOffset: flatbuffers.Offset, dictionariesOffset: flatbuffers.Offset, recordBatchesOffset: flatbuffers.Offset, customMetadataOffset: flatbuffers.Offset): flatbuffers.Offset;
}

@@ -106,40 +143,38 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Block {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Block
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Block;
/**
* Index to the start of the RecordBlock (note this is past the Message header)
*
* @returns flatbuffers.Long
*/
offset(): flatbuffers.Long;
/**
* Length of the metadata
*
* @returns number
*/
metaDataLength(): number;
/**
* Length of the data (this is aligned so there can be a gap between this and
* the metatdata).
*
* @returns flatbuffers.Long
*/
bodyLength(): flatbuffers.Long;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long offset
* @param number metaDataLength
* @param flatbuffers.Long bodyLength
* @returns flatbuffers.Offset
*/
static createBlock(builder: flatbuffers.Builder, offset: flatbuffers.Long, metaDataLength: number, bodyLength: flatbuffers.Long): flatbuffers.Offset;
}
export declare class Block {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Block
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Block;
/**
* Index to the start of the RecordBlock (note this is past the Message header)
*
* @returns flatbuffers.Long
*/
offset(): flatbuffers.Long;
/**
* Length of the metadata
*
* @returns number
*/
metaDataLength(): number;
/**
* Length of the data (this is aligned so there can be a gap between this and
* the metadata).
*
* @returns flatbuffers.Long
*/
bodyLength(): flatbuffers.Long;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long offset
* @param number metaDataLength
* @param flatbuffers.Long bodyLength
* @returns flatbuffers.Offset
*/
static createBlock(builder: flatbuffers.Builder, offset: flatbuffers.Long, metaDataLength: number, bodyLength: flatbuffers.Long): flatbuffers.Offset;
}
// automatically generated by the FlatBuffers compiler, do not modify
import * as NS7624605610262437867 from './Schema';
import { flatbuffers } from 'flatbuffers';
import * as NS13596923344997147894 from './Schema';
/**

@@ -10,229 +11,265 @@ * ----------------------------------------------------------------------

*/
export var org;
(function (org) {
var apache;
(function (apache) {
var arrow;
(function (arrow) {
var flatbuf;
(function (flatbuf) {
class Footer {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Footer
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* @param flatbuffers.ByteBuffer bb
* @param Footer= obj
* @returns Footer
*/
static getRootAsFooter(bb, obj) {
return (obj || new Footer).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @returns org.apache.arrow.flatbuf.MetadataVersion
*/
version() {
let offset = this.bb.__offset(this.bb_pos, 4);
return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion.V1;
}
/**
* @param org.apache.arrow.flatbuf.Schema= obj
* @returns org.apache.arrow.flatbuf.Schema|null
*/
schema(obj) {
let offset = this.bb.__offset(this.bb_pos, 6);
return offset ? (obj || new NS7624605610262437867.org.apache.arrow.flatbuf.Schema).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
}
/**
* @param number index
* @param org.apache.arrow.flatbuf.Block= obj
* @returns org.apache.arrow.flatbuf.Block
*/
dictionaries(index, obj) {
let offset = this.bb.__offset(this.bb_pos, 8);
return offset ? (obj || new org.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos + offset) + index * 24, this.bb) : null;
}
/**
* @returns number
*/
dictionariesLength() {
let offset = this.bb.__offset(this.bb_pos, 8);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* @param number index
* @param org.apache.arrow.flatbuf.Block= obj
* @returns org.apache.arrow.flatbuf.Block
*/
recordBatches(index, obj) {
let offset = this.bb.__offset(this.bb_pos, 10);
return offset ? (obj || new org.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos + offset) + index * 24, this.bb) : null;
}
/**
* @returns number
*/
recordBatchesLength() {
let offset = this.bb.__offset(this.bb_pos, 10);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* @param flatbuffers.Builder builder
*/
static startFooter(builder) {
builder.startObject(4);
}
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.MetadataVersion version
*/
static addVersion(builder, version) {
builder.addFieldInt16(0, version, NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion.V1);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset schemaOffset
*/
static addSchema(builder, schemaOffset) {
builder.addFieldOffset(1, schemaOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset dictionariesOffset
*/
static addDictionaries(builder, dictionariesOffset) {
builder.addFieldOffset(2, dictionariesOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startDictionariesVector(builder, numElems) {
builder.startVector(24, numElems, 8);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset recordBatchesOffset
*/
static addRecordBatches(builder, recordBatchesOffset) {
builder.addFieldOffset(3, recordBatchesOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startRecordBatchesVector(builder, numElems) {
builder.startVector(24, numElems, 8);
}
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endFooter(builder) {
let offset = builder.endObject();
return offset;
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishFooterBuffer(builder, offset) {
builder.finish(offset);
}
static createFooter(builder, version, schemaOffset, dictionariesOffset, recordBatchesOffset) {
Footer.startFooter(builder);
Footer.addVersion(builder, version);
Footer.addSchema(builder, schemaOffset);
Footer.addDictionaries(builder, dictionariesOffset);
Footer.addRecordBatches(builder, recordBatchesOffset);
return Footer.endFooter(builder);
}
}
flatbuf.Footer = Footer;
})(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));
})(arrow = apache.arrow || (apache.arrow = {}));
})(apache = org.apache || (org.apache = {}));
})(org || (org = {}));
export class Footer {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Footer
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* @param flatbuffers.ByteBuffer bb
* @param Footer= obj
* @returns Footer
*/
static getRootAsFooter(bb, obj) {
return (obj || new Footer()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @param flatbuffers.ByteBuffer bb
* @param Footer= obj
* @returns Footer
*/
static getSizePrefixedRootAsFooter(bb, obj) {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new Footer()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @returns MetadataVersion
*/
version() {
const offset = this.bb.__offset(this.bb_pos, 4);
return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : NS13596923344997147894.MetadataVersion.V1;
}
/**
* @param Schema= obj
* @returns Schema|null
*/
schema(obj) {
const offset = this.bb.__offset(this.bb_pos, 6);
return offset ? (obj || new NS13596923344997147894.Schema()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
}
/**
* @param number index
* @param Block= obj
* @returns Block
*/
dictionaries(index, obj) {
const offset = this.bb.__offset(this.bb_pos, 8);
return offset ? (obj || new Block()).__init(this.bb.__vector(this.bb_pos + offset) + index * 24, this.bb) : null;
}
/**
* @returns number
*/
dictionariesLength() {
const offset = this.bb.__offset(this.bb_pos, 8);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* @param number index
* @param Block= obj
* @returns Block
*/
recordBatches(index, obj) {
const offset = this.bb.__offset(this.bb_pos, 10);
return offset ? (obj || new Block()).__init(this.bb.__vector(this.bb_pos + offset) + index * 24, this.bb) : null;
}
/**
* @returns number
*/
recordBatchesLength() {
const offset = this.bb.__offset(this.bb_pos, 10);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* User-defined metadata
*
* @param number index
* @param KeyValue= obj
* @returns KeyValue
*/
customMetadata(index, obj) {
const offset = this.bb.__offset(this.bb_pos, 12);
return offset ? (obj || new NS13596923344997147894.KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
}
/**
* @returns number
*/
customMetadataLength() {
const offset = this.bb.__offset(this.bb_pos, 12);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* @param flatbuffers.Builder builder
*/
static startFooter(builder) {
builder.startObject(5);
}
/**
* @param flatbuffers.Builder builder
* @param MetadataVersion version
*/
static addVersion(builder, version) {
builder.addFieldInt16(0, version, NS13596923344997147894.MetadataVersion.V1);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset schemaOffset
*/
static addSchema(builder, schemaOffset) {
builder.addFieldOffset(1, schemaOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset dictionariesOffset
*/
static addDictionaries(builder, dictionariesOffset) {
builder.addFieldOffset(2, dictionariesOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startDictionariesVector(builder, numElems) {
builder.startVector(24, numElems, 8);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset recordBatchesOffset
*/
static addRecordBatches(builder, recordBatchesOffset) {
builder.addFieldOffset(3, recordBatchesOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startRecordBatchesVector(builder, numElems) {
builder.startVector(24, numElems, 8);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset customMetadataOffset
*/
static addCustomMetadata(builder, customMetadataOffset) {
builder.addFieldOffset(4, customMetadataOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createCustomMetadataVector(builder, data) {
builder.startVector(4, data.length, 4);
for (let i = data.length - 1; i >= 0; i--) {
builder.addOffset(data[i]);
}
return builder.endVector();
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startCustomMetadataVector(builder, numElems) {
builder.startVector(4, numElems, 4);
}
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endFooter(builder) {
const offset = builder.endObject();
return offset;
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishFooterBuffer(builder, offset) {
builder.finish(offset);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishSizePrefixedFooterBuffer(builder, offset) {
builder.finish(offset, undefined, true);
}
static createFooter(builder, version, schemaOffset, dictionariesOffset, recordBatchesOffset, customMetadataOffset) {
Footer.startFooter(builder);
Footer.addVersion(builder, version);
Footer.addSchema(builder, schemaOffset);
Footer.addDictionaries(builder, dictionariesOffset);
Footer.addRecordBatches(builder, recordBatchesOffset);
Footer.addCustomMetadata(builder, customMetadataOffset);
return Footer.endFooter(builder);
}
}
/**
* @constructor
*/
(function (org) {
var apache;
(function (apache) {
var arrow;
(function (arrow) {
var flatbuf;
(function (flatbuf) {
class Block {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Block
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* Index to the start of the RecordBlock (note this is past the Message header)
*
* @returns flatbuffers.Long
*/
offset() {
return this.bb.readInt64(this.bb_pos);
}
/**
* Length of the metadata
*
* @returns number
*/
metaDataLength() {
return this.bb.readInt32(this.bb_pos + 8);
}
/**
* Length of the data (this is aligned so there can be a gap between this and
* the metatdata).
*
* @returns flatbuffers.Long
*/
bodyLength() {
return this.bb.readInt64(this.bb_pos + 16);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long offset
* @param number metaDataLength
* @param flatbuffers.Long bodyLength
* @returns flatbuffers.Offset
*/
static createBlock(builder, offset, metaDataLength, bodyLength) {
builder.prep(8, 24);
builder.writeInt64(bodyLength);
builder.pad(4);
builder.writeInt32(metaDataLength);
builder.writeInt64(offset);
return builder.offset();
}
}
flatbuf.Block = Block;
})(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));
})(arrow = apache.arrow || (apache.arrow = {}));
})(apache = org.apache || (org.apache = {}));
})(org || (org = {}));
export class Block {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Block
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* Index to the start of the RecordBlock (note this is past the Message header)
*
* @returns flatbuffers.Long
*/
offset() {
return this.bb.readInt64(this.bb_pos);
}
/**
* Length of the metadata
*
* @returns number
*/
metaDataLength() {
return this.bb.readInt32(this.bb_pos + 8);
}
/**
* Length of the data (this is aligned so there can be a gap between this and
* the metadata).
*
* @returns flatbuffers.Long
*/
bodyLength() {
return this.bb.readInt64(this.bb_pos + 16);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long offset
* @param number metaDataLength
* @param flatbuffers.Long bodyLength
* @returns flatbuffers.Offset
*/
static createBlock(builder, offset, metaDataLength, bodyLength) {
builder.prep(8, 24);
builder.writeInt64(bodyLength);
builder.pad(4);
builder.writeInt32(metaDataLength);
builder.writeInt64(offset);
return builder.offset();
}
}
//# sourceMappingURL=File.mjs.map
import { flatbuffers } from 'flatbuffers';
import * as NS7624605610262437867 from './Schema';
export declare namespace org.apache.arrow.flatbuf {
export import Schema = NS7624605610262437867.org.apache.arrow.flatbuf.Schema;
import * as NS13596923344997147894 from './Schema';
/**
* @enum {number}
*/
export declare enum CompressionType {
LZ4_FRAME = 0,
ZSTD = 1
}
/**
* Provided for forward compatibility in case we need to support different
* strategies for compressing the IPC message body (like whole-body
* compression rather than buffer-level) in the future
*
* @enum {number}
*/
export declare enum BodyCompressionMethod {
/**
* Each constituent buffer is first compressed with the indicated
* compressor, and then written with the uncompressed length in the first 8
* bytes as a 64-bit little-endian signed integer followed by the compressed
* buffer bytes (and then padding as required by the protocol). The
* uncompressed length may be set to -1 to indicate that the data that
* follows is not compressed, which can be useful for cases where
* compression does not yield appreciable savings.
*/
BUFFER = 0
}
/**
* ----------------------------------------------------------------------

@@ -18,11 +41,9 @@ * The root Message type

*/
export declare namespace org.apache.arrow.flatbuf {
enum MessageHeader {
NONE = 0,
Schema = 1,
DictionaryBatch = 2,
RecordBatch = 3,
Tensor = 4,
SparseTensor = 5
}
export declare enum MessageHeader {
NONE = 0,
Schema = 1,
DictionaryBatch = 2,
RecordBatch = 3,
Tensor = 4,
SparseTensor = 5
}

@@ -42,37 +63,96 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class FieldNode {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns FieldNode
*/
__init(i: number, bb: flatbuffers.ByteBuffer): FieldNode;
/**
* The number of value slots in the Arrow array at this level of a nested
* tree
*
* @returns flatbuffers.Long
*/
length(): flatbuffers.Long;
/**
* The number of observed nulls. Fields with null_count == 0 may choose not
* to write their physical validity bitmap out as a materialized buffer,
* instead setting the length of the bitmap buffer to 0.
*
* @returns flatbuffers.Long
*/
nullCount(): flatbuffers.Long;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long length
* @param flatbuffers.Long null_count
* @returns flatbuffers.Offset
*/
static createFieldNode(builder: flatbuffers.Builder, length: flatbuffers.Long, null_count: flatbuffers.Long): flatbuffers.Offset;
}
export declare class FieldNode {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns FieldNode
*/
__init(i: number, bb: flatbuffers.ByteBuffer): FieldNode;
/**
* The number of value slots in the Arrow array at this level of a nested
* tree
*
* @returns flatbuffers.Long
*/
length(): flatbuffers.Long;
/**
* The number of observed nulls. Fields with null_count == 0 may choose not
* to write their physical validity bitmap out as a materialized buffer,
* instead setting the length of the bitmap buffer to 0.
*
* @returns flatbuffers.Long
*/
nullCount(): flatbuffers.Long;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long length
* @param flatbuffers.Long null_count
* @returns flatbuffers.Offset
*/
static createFieldNode(builder: flatbuffers.Builder, length: flatbuffers.Long, null_count: flatbuffers.Long): flatbuffers.Offset;
}
/**
* Optional compression for the memory buffers constituting IPC message
* bodies. Intended for use with RecordBatch but could be used for other
* message types
*
* @constructor
*/
export declare class BodyCompression {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns BodyCompression
*/
__init(i: number, bb: flatbuffers.ByteBuffer): BodyCompression;
/**
* @param flatbuffers.ByteBuffer bb
* @param BodyCompression= obj
* @returns BodyCompression
*/
static getRootAsBodyCompression(bb: flatbuffers.ByteBuffer, obj?: BodyCompression): BodyCompression;
/**
* @param flatbuffers.ByteBuffer bb
* @param BodyCompression= obj
* @returns BodyCompression
*/
static getSizePrefixedRootAsBodyCompression(bb: flatbuffers.ByteBuffer, obj?: BodyCompression): BodyCompression;
/**
* Compressor library
*
* @returns CompressionType
*/
codec(): CompressionType;
/**
* Indicates the way the record batch body was compressed
*
* @returns BodyCompressionMethod
*/
method(): BodyCompressionMethod;
/**
* @param flatbuffers.Builder builder
*/
static startBodyCompression(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param CompressionType codec
*/
static addCodec(builder: flatbuffers.Builder, codec: CompressionType): void;
/**
* @param flatbuffers.Builder builder
* @param BodyCompressionMethod method
*/
static addMethod(builder: flatbuffers.Builder, method: BodyCompressionMethod): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endBodyCompression(builder: flatbuffers.Builder): flatbuffers.Offset;
static createBodyCompression(builder: flatbuffers.Builder, codec: CompressionType, method: BodyCompressionMethod): flatbuffers.Offset;
}
/**
* A data header describing the shared memory layout of a "record" or "row"

@@ -84,90 +164,106 @@ * batch. Some systems call this a "row batch" internally and others a "record

*/
export declare namespace org.apache.arrow.flatbuf {
class RecordBatch {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns RecordBatch
*/
__init(i: number, bb: flatbuffers.ByteBuffer): RecordBatch;
/**
* @param flatbuffers.ByteBuffer bb
* @param RecordBatch= obj
* @returns RecordBatch
*/
static getRootAsRecordBatch(bb: flatbuffers.ByteBuffer, obj?: RecordBatch): RecordBatch;
/**
* number of records / rows. The arrays in the batch should all have this
* length
*
* @returns flatbuffers.Long
*/
length(): flatbuffers.Long;
/**
* Nodes correspond to the pre-ordered flattened logical schema
*
* @param number index
* @param org.apache.arrow.flatbuf.FieldNode= obj
* @returns org.apache.arrow.flatbuf.FieldNode
*/
nodes(index: number, obj?: org.apache.arrow.flatbuf.FieldNode): org.apache.arrow.flatbuf.FieldNode | null;
/**
* @returns number
*/
nodesLength(): number;
/**
* Buffers correspond to the pre-ordered flattened buffer tree
*
* The number of buffers appended to this list depends on the schema. For
* example, most primitive arrays will have 2 buffers, 1 for the validity
* bitmap and 1 for the values. For struct arrays, there will only be a
* single buffer for the validity (nulls) bitmap
*
* @param number index
* @param org.apache.arrow.flatbuf.Buffer= obj
* @returns org.apache.arrow.flatbuf.Buffer
*/
buffers(index: number, obj?: NS7624605610262437867.org.apache.arrow.flatbuf.Buffer): NS7624605610262437867.org.apache.arrow.flatbuf.Buffer | null;
/**
* @returns number
*/
buffersLength(): number;
/**
* @param flatbuffers.Builder builder
*/
static startRecordBatch(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long length
*/
static addLength(builder: flatbuffers.Builder, length: flatbuffers.Long): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset nodesOffset
*/
static addNodes(builder: flatbuffers.Builder, nodesOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startNodesVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset buffersOffset
*/
static addBuffers(builder: flatbuffers.Builder, buffersOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startBuffersVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endRecordBatch(builder: flatbuffers.Builder): flatbuffers.Offset;
static createRecordBatch(builder: flatbuffers.Builder, length: flatbuffers.Long, nodesOffset: flatbuffers.Offset, buffersOffset: flatbuffers.Offset): flatbuffers.Offset;
}
export declare class RecordBatch {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns RecordBatch
*/
__init(i: number, bb: flatbuffers.ByteBuffer): RecordBatch;
/**
* @param flatbuffers.ByteBuffer bb
* @param RecordBatch= obj
* @returns RecordBatch
*/
static getRootAsRecordBatch(bb: flatbuffers.ByteBuffer, obj?: RecordBatch): RecordBatch;
/**
* @param flatbuffers.ByteBuffer bb
* @param RecordBatch= obj
* @returns RecordBatch
*/
static getSizePrefixedRootAsRecordBatch(bb: flatbuffers.ByteBuffer, obj?: RecordBatch): RecordBatch;
/**
* number of records / rows. The arrays in the batch should all have this
* length
*
* @returns flatbuffers.Long
*/
length(): flatbuffers.Long;
/**
* Nodes correspond to the pre-ordered flattened logical schema
*
* @param number index
* @param FieldNode= obj
* @returns FieldNode
*/
nodes(index: number, obj?: FieldNode): FieldNode | null;
/**
* @returns number
*/
nodesLength(): number;
/**
* Buffers correspond to the pre-ordered flattened buffer tree
*
* The number of buffers appended to this list depends on the schema. For
* example, most primitive arrays will have 2 buffers, 1 for the validity
* bitmap and 1 for the values. For struct arrays, there will only be a
* single buffer for the validity (nulls) bitmap
*
* @param number index
* @param Buffer= obj
* @returns Buffer
*/
buffers(index: number, obj?: NS13596923344997147894.Buffer): NS13596923344997147894.Buffer | null;
/**
* @returns number
*/
buffersLength(): number;
/**
* Optional compression of the message body
*
* @param BodyCompression= obj
* @returns BodyCompression|null
*/
compression(obj?: BodyCompression): BodyCompression | null;
/**
* @param flatbuffers.Builder builder
*/
static startRecordBatch(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long length
*/
static addLength(builder: flatbuffers.Builder, length: flatbuffers.Long): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset nodesOffset
*/
static addNodes(builder: flatbuffers.Builder, nodesOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startNodesVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset buffersOffset
*/
static addBuffers(builder: flatbuffers.Builder, buffersOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startBuffersVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset compressionOffset
*/
static addCompression(builder: flatbuffers.Builder, compressionOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endRecordBatch(builder: flatbuffers.Builder): flatbuffers.Offset;
static createRecordBatch(builder: flatbuffers.Builder, length: flatbuffers.Long, nodesOffset: flatbuffers.Offset, buffersOffset: flatbuffers.Offset, compressionOffset: flatbuffers.Offset): flatbuffers.Offset;
}

@@ -184,60 +280,65 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class DictionaryBatch {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns DictionaryBatch
*/
__init(i: number, bb: flatbuffers.ByteBuffer): DictionaryBatch;
/**
* @param flatbuffers.ByteBuffer bb
* @param DictionaryBatch= obj
* @returns DictionaryBatch
*/
static getRootAsDictionaryBatch(bb: flatbuffers.ByteBuffer, obj?: DictionaryBatch): DictionaryBatch;
/**
* @returns flatbuffers.Long
*/
id(): flatbuffers.Long;
/**
* @param org.apache.arrow.flatbuf.RecordBatch= obj
* @returns org.apache.arrow.flatbuf.RecordBatch|null
*/
data(obj?: org.apache.arrow.flatbuf.RecordBatch): org.apache.arrow.flatbuf.RecordBatch | null;
/**
* If isDelta is true the values in the dictionary are to be appended to a
* dictionary with the indicated id
*
* @returns boolean
*/
isDelta(): boolean;
/**
* @param flatbuffers.Builder builder
*/
static startDictionaryBatch(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long id
*/
static addId(builder: flatbuffers.Builder, id: flatbuffers.Long): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset dataOffset
*/
static addData(builder: flatbuffers.Builder, dataOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param boolean isDelta
*/
static addIsDelta(builder: flatbuffers.Builder, isDelta: boolean): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDictionaryBatch(builder: flatbuffers.Builder): flatbuffers.Offset;
static createDictionaryBatch(builder: flatbuffers.Builder, id: flatbuffers.Long, dataOffset: flatbuffers.Offset, isDelta: boolean): flatbuffers.Offset;
}
export declare class DictionaryBatch {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns DictionaryBatch
*/
__init(i: number, bb: flatbuffers.ByteBuffer): DictionaryBatch;
/**
* @param flatbuffers.ByteBuffer bb
* @param DictionaryBatch= obj
* @returns DictionaryBatch
*/
static getRootAsDictionaryBatch(bb: flatbuffers.ByteBuffer, obj?: DictionaryBatch): DictionaryBatch;
/**
* @param flatbuffers.ByteBuffer bb
* @param DictionaryBatch= obj
* @returns DictionaryBatch
*/
static getSizePrefixedRootAsDictionaryBatch(bb: flatbuffers.ByteBuffer, obj?: DictionaryBatch): DictionaryBatch;
/**
* @returns flatbuffers.Long
*/
id(): flatbuffers.Long;
/**
* @param RecordBatch= obj
* @returns RecordBatch|null
*/
data(obj?: RecordBatch): RecordBatch | null;
/**
* If isDelta is true the values in the dictionary are to be appended to a
* dictionary with the indicated id. If isDelta is false this dictionary
* should replace the existing dictionary.
*
* @returns boolean
*/
isDelta(): boolean;
/**
* @param flatbuffers.Builder builder
*/
static startDictionaryBatch(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long id
*/
static addId(builder: flatbuffers.Builder, id: flatbuffers.Long): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset dataOffset
*/
static addData(builder: flatbuffers.Builder, dataOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param boolean isDelta
*/
static addIsDelta(builder: flatbuffers.Builder, isDelta: boolean): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDictionaryBatch(builder: flatbuffers.Builder): flatbuffers.Offset;
static createDictionaryBatch(builder: flatbuffers.Builder, id: flatbuffers.Long, dataOffset: flatbuffers.Offset, isDelta: boolean): flatbuffers.Offset;
}

@@ -247,97 +348,106 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Message {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Message
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Message;
/**
* @param flatbuffers.ByteBuffer bb
* @param Message= obj
* @returns Message
*/
static getRootAsMessage(bb: flatbuffers.ByteBuffer, obj?: Message): Message;
/**
* @returns org.apache.arrow.flatbuf.MetadataVersion
*/
version(): NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion;
/**
* @returns org.apache.arrow.flatbuf.MessageHeader
*/
headerType(): org.apache.arrow.flatbuf.MessageHeader;
/**
* @param flatbuffers.Table obj
* @returns ?flatbuffers.Table
*/
header<T extends flatbuffers.Table>(obj: T): T | null;
/**
* @returns flatbuffers.Long
*/
bodyLength(): flatbuffers.Long;
/**
* @param number index
* @param org.apache.arrow.flatbuf.KeyValue= obj
* @returns org.apache.arrow.flatbuf.KeyValue
*/
customMetadata(index: number, obj?: NS7624605610262437867.org.apache.arrow.flatbuf.KeyValue): NS7624605610262437867.org.apache.arrow.flatbuf.KeyValue | null;
/**
* @returns number
*/
customMetadataLength(): number;
/**
* @param flatbuffers.Builder builder
*/
static startMessage(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.MetadataVersion version
*/
static addVersion(builder: flatbuffers.Builder, version: NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.MessageHeader headerType
*/
static addHeaderType(builder: flatbuffers.Builder, headerType: org.apache.arrow.flatbuf.MessageHeader): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset headerOffset
*/
static addHeader(builder: flatbuffers.Builder, headerOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long bodyLength
*/
static addBodyLength(builder: flatbuffers.Builder, bodyLength: flatbuffers.Long): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset customMetadataOffset
*/
static addCustomMetadata(builder: flatbuffers.Builder, customMetadataOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createCustomMetadataVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startCustomMetadataVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endMessage(builder: flatbuffers.Builder): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishMessageBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
static createMessage(builder: flatbuffers.Builder, version: NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion, headerType: org.apache.arrow.flatbuf.MessageHeader, headerOffset: flatbuffers.Offset, bodyLength: flatbuffers.Long, customMetadataOffset: flatbuffers.Offset): flatbuffers.Offset;
}
export declare class Message {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Message
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Message;
/**
* @param flatbuffers.ByteBuffer bb
* @param Message= obj
* @returns Message
*/
static getRootAsMessage(bb: flatbuffers.ByteBuffer, obj?: Message): Message;
/**
* @param flatbuffers.ByteBuffer bb
* @param Message= obj
* @returns Message
*/
static getSizePrefixedRootAsMessage(bb: flatbuffers.ByteBuffer, obj?: Message): Message;
/**
* @returns MetadataVersion
*/
version(): NS13596923344997147894.MetadataVersion;
/**
* @returns MessageHeader
*/
headerType(): MessageHeader;
/**
* @param flatbuffers.Table obj
* @returns ?flatbuffers.Table
*/
header<T extends flatbuffers.Table>(obj: T): T | null;
/**
* @returns flatbuffers.Long
*/
bodyLength(): flatbuffers.Long;
/**
* @param number index
* @param KeyValue= obj
* @returns KeyValue
*/
customMetadata(index: number, obj?: NS13596923344997147894.KeyValue): NS13596923344997147894.KeyValue | null;
/**
* @returns number
*/
customMetadataLength(): number;
/**
* @param flatbuffers.Builder builder
*/
static startMessage(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param MetadataVersion version
*/
static addVersion(builder: flatbuffers.Builder, version: NS13596923344997147894.MetadataVersion): void;
/**
* @param flatbuffers.Builder builder
* @param MessageHeader headerType
*/
static addHeaderType(builder: flatbuffers.Builder, headerType: MessageHeader): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset headerOffset
*/
static addHeader(builder: flatbuffers.Builder, headerOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long bodyLength
*/
static addBodyLength(builder: flatbuffers.Builder, bodyLength: flatbuffers.Long): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset customMetadataOffset
*/
static addCustomMetadata(builder: flatbuffers.Builder, customMetadataOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createCustomMetadataVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startCustomMetadataVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endMessage(builder: flatbuffers.Builder): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishMessageBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishSizePrefixedMessageBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
static createMessage(builder: flatbuffers.Builder, version: NS13596923344997147894.MetadataVersion, headerType: MessageHeader, headerOffset: flatbuffers.Offset, bodyLength: flatbuffers.Long, customMetadataOffset: flatbuffers.Offset): flatbuffers.Offset;
}
// automatically generated by the FlatBuffers compiler, do not modify
import * as NS7624605610262437867 from './Schema';
export var org;
(function (org) {
var apache;
(function (apache) {
var arrow;
(function (arrow) {
var flatbuf;
(function (flatbuf) {
flatbuf.Schema = NS7624605610262437867.org.apache.arrow.flatbuf.Schema;
})(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));
})(arrow = apache.arrow || (apache.arrow = {}));
})(apache = org.apache || (org.apache = {}));
})(org || (org = {}));
import { flatbuffers } from 'flatbuffers';
import * as NS13596923344997147894 from './Schema';
/**
* @enum {number}
*/
export var CompressionType;
(function (CompressionType) {
CompressionType[CompressionType["LZ4_FRAME"] = 0] = "LZ4_FRAME";
CompressionType[CompressionType["ZSTD"] = 1] = "ZSTD";
})(CompressionType || (CompressionType = {}));
/**
* Provided for forward compatibility in case we need to support different
* strategies for compressing the IPC message body (like whole-body
* compression rather than buffer-level) in the future
*
* @enum {number}
*/
export var BodyCompressionMethod;
(function (BodyCompressionMethod) {
/**
* Each constituent buffer is first compressed with the indicated
* compressor, and then written with the uncompressed length in the first 8
* bytes as a 64-bit little-endian signed integer followed by the compressed
* buffer bytes (and then padding as required by the protocol). The
* uncompressed length may be set to -1 to indicate that the data that
* follows is not compressed, which can be useful for cases where
* compression does not yield appreciable savings.
*/
BodyCompressionMethod[BodyCompressionMethod["BUFFER"] = 0] = "BUFFER";
})(BodyCompressionMethod || (BodyCompressionMethod = {}));
/**
* ----------------------------------------------------------------------

@@ -28,22 +44,11 @@ * The root Message type

*/
(function (org) {
var apache;
(function (apache) {
var arrow;
(function (arrow) {
var flatbuf;
(function (flatbuf) {
let MessageHeader;
(function (MessageHeader) {
MessageHeader[MessageHeader["NONE"] = 0] = "NONE";
MessageHeader[MessageHeader["Schema"] = 1] = "Schema";
MessageHeader[MessageHeader["DictionaryBatch"] = 2] = "DictionaryBatch";
MessageHeader[MessageHeader["RecordBatch"] = 3] = "RecordBatch";
MessageHeader[MessageHeader["Tensor"] = 4] = "Tensor";
MessageHeader[MessageHeader["SparseTensor"] = 5] = "SparseTensor";
})(MessageHeader = flatbuf.MessageHeader || (flatbuf.MessageHeader = {}));
})(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));
})(arrow = apache.arrow || (apache.arrow = {}));
})(apache = org.apache || (org.apache = {}));
})(org || (org = {}));
export var MessageHeader;
(function (MessageHeader) {
MessageHeader[MessageHeader["NONE"] = 0] = "NONE";
MessageHeader[MessageHeader["Schema"] = 1] = "Schema";
MessageHeader[MessageHeader["DictionaryBatch"] = 2] = "DictionaryBatch";
MessageHeader[MessageHeader["RecordBatch"] = 3] = "RecordBatch";
MessageHeader[MessageHeader["Tensor"] = 4] = "Tensor";
MessageHeader[MessageHeader["SparseTensor"] = 5] = "SparseTensor";
})(MessageHeader || (MessageHeader = {}));
/**

@@ -62,62 +67,142 @@ * ----------------------------------------------------------------------

*/
(function (org) {
var apache;
(function (apache) {
var arrow;
(function (arrow) {
var flatbuf;
(function (flatbuf) {
class FieldNode {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns FieldNode
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* The number of value slots in the Arrow array at this level of a nested
* tree
*
* @returns flatbuffers.Long
*/
length() {
return this.bb.readInt64(this.bb_pos);
}
/**
* The number of observed nulls. Fields with null_count == 0 may choose not
* to write their physical validity bitmap out as a materialized buffer,
* instead setting the length of the bitmap buffer to 0.
*
* @returns flatbuffers.Long
*/
nullCount() {
return this.bb.readInt64(this.bb_pos + 8);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long length
* @param flatbuffers.Long null_count
* @returns flatbuffers.Offset
*/
static createFieldNode(builder, length, null_count) {
builder.prep(8, 16);
builder.writeInt64(null_count);
builder.writeInt64(length);
return builder.offset();
}
}
flatbuf.FieldNode = FieldNode;
})(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));
})(arrow = apache.arrow || (apache.arrow = {}));
})(apache = org.apache || (org.apache = {}));
})(org || (org = {}));
export class FieldNode {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns FieldNode
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* The number of value slots in the Arrow array at this level of a nested
* tree
*
* @returns flatbuffers.Long
*/
length() {
return this.bb.readInt64(this.bb_pos);
}
/**
* The number of observed nulls. Fields with null_count == 0 may choose not
* to write their physical validity bitmap out as a materialized buffer,
* instead setting the length of the bitmap buffer to 0.
*
* @returns flatbuffers.Long
*/
nullCount() {
return this.bb.readInt64(this.bb_pos + 8);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long length
* @param flatbuffers.Long null_count
* @returns flatbuffers.Offset
*/
static createFieldNode(builder, length, null_count) {
builder.prep(8, 16);
builder.writeInt64(null_count);
builder.writeInt64(length);
return builder.offset();
}
}
/**
* Optional compression for the memory buffers constituting IPC message
* bodies. Intended for use with RecordBatch but could be used for other
* message types
*
* @constructor
*/
export class BodyCompression {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns BodyCompression
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* @param flatbuffers.ByteBuffer bb
* @param BodyCompression= obj
* @returns BodyCompression
*/
static getRootAsBodyCompression(bb, obj) {
return (obj || new BodyCompression()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @param flatbuffers.ByteBuffer bb
* @param BodyCompression= obj
* @returns BodyCompression
*/
static getSizePrefixedRootAsBodyCompression(bb, obj) {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new BodyCompression()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* Compressor library
*
* @returns CompressionType
*/
codec() {
const offset = this.bb.__offset(this.bb_pos, 4);
return offset ? /** */ (this.bb.readInt8(this.bb_pos + offset)) : CompressionType.LZ4_FRAME;
}
/**
* Indicates the way the record batch body was compressed
*
* @returns BodyCompressionMethod
*/
method() {
const offset = this.bb.__offset(this.bb_pos, 6);
return offset ? /** */ (this.bb.readInt8(this.bb_pos + offset)) : BodyCompressionMethod.BUFFER;
}
/**
* @param flatbuffers.Builder builder
*/
static startBodyCompression(builder) {
builder.startObject(2);
}
/**
* @param flatbuffers.Builder builder
* @param CompressionType codec
*/
static addCodec(builder, codec) {
builder.addFieldInt8(0, codec, CompressionType.LZ4_FRAME);
}
/**
* @param flatbuffers.Builder builder
* @param BodyCompressionMethod method
*/
static addMethod(builder, method) {
builder.addFieldInt8(1, method, BodyCompressionMethod.BUFFER);
}
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endBodyCompression(builder) {
const offset = builder.endObject();
return offset;
}
static createBodyCompression(builder, codec, method) {
BodyCompression.startBodyCompression(builder);
BodyCompression.addCodec(builder, codec);
BodyCompression.addMethod(builder, method);
return BodyCompression.endBodyCompression(builder);
}
}
/**
* A data header describing the shared memory layout of a "record" or "row"

@@ -129,145 +214,160 @@ * batch. Some systems call this a "row batch" internally and others a "record

*/
(function (org) {
var apache;
(function (apache) {
var arrow;
(function (arrow) {
var flatbuf;
(function (flatbuf) {
class RecordBatch {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns RecordBatch
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* @param flatbuffers.ByteBuffer bb
* @param RecordBatch= obj
* @returns RecordBatch
*/
static getRootAsRecordBatch(bb, obj) {
return (obj || new RecordBatch).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* number of records / rows. The arrays in the batch should all have this
* length
*
* @returns flatbuffers.Long
*/
length() {
let offset = this.bb.__offset(this.bb_pos, 4);
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
}
/**
* Nodes correspond to the pre-ordered flattened logical schema
*
* @param number index
* @param org.apache.arrow.flatbuf.FieldNode= obj
* @returns org.apache.arrow.flatbuf.FieldNode
*/
nodes(index, obj) {
let offset = this.bb.__offset(this.bb_pos, 6);
return offset ? (obj || new org.apache.arrow.flatbuf.FieldNode).__init(this.bb.__vector(this.bb_pos + offset) + index * 16, this.bb) : null;
}
/**
* @returns number
*/
nodesLength() {
let offset = this.bb.__offset(this.bb_pos, 6);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* Buffers correspond to the pre-ordered flattened buffer tree
*
* The number of buffers appended to this list depends on the schema. For
* example, most primitive arrays will have 2 buffers, 1 for the validity
* bitmap and 1 for the values. For struct arrays, there will only be a
* single buffer for the validity (nulls) bitmap
*
* @param number index
* @param org.apache.arrow.flatbuf.Buffer= obj
* @returns org.apache.arrow.flatbuf.Buffer
*/
buffers(index, obj) {
let offset = this.bb.__offset(this.bb_pos, 8);
return offset ? (obj || new NS7624605610262437867.org.apache.arrow.flatbuf.Buffer).__init(this.bb.__vector(this.bb_pos + offset) + index * 16, this.bb) : null;
}
/**
* @returns number
*/
buffersLength() {
let offset = this.bb.__offset(this.bb_pos, 8);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* @param flatbuffers.Builder builder
*/
static startRecordBatch(builder) {
builder.startObject(3);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long length
*/
static addLength(builder, length) {
builder.addFieldInt64(0, length, builder.createLong(0, 0));
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset nodesOffset
*/
static addNodes(builder, nodesOffset) {
builder.addFieldOffset(1, nodesOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startNodesVector(builder, numElems) {
builder.startVector(16, numElems, 8);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset buffersOffset
*/
static addBuffers(builder, buffersOffset) {
builder.addFieldOffset(2, buffersOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startBuffersVector(builder, numElems) {
builder.startVector(16, numElems, 8);
}
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endRecordBatch(builder) {
let offset = builder.endObject();
return offset;
}
static createRecordBatch(builder, length, nodesOffset, buffersOffset) {
RecordBatch.startRecordBatch(builder);
RecordBatch.addLength(builder, length);
RecordBatch.addNodes(builder, nodesOffset);
RecordBatch.addBuffers(builder, buffersOffset);
return RecordBatch.endRecordBatch(builder);
}
}
flatbuf.RecordBatch = RecordBatch;
})(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));
})(arrow = apache.arrow || (apache.arrow = {}));
})(apache = org.apache || (org.apache = {}));
})(org || (org = {}));
export class RecordBatch {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns RecordBatch
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* @param flatbuffers.ByteBuffer bb
* @param RecordBatch= obj
* @returns RecordBatch
*/
static getRootAsRecordBatch(bb, obj) {
return (obj || new RecordBatch()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @param flatbuffers.ByteBuffer bb
* @param RecordBatch= obj
* @returns RecordBatch
*/
static getSizePrefixedRootAsRecordBatch(bb, obj) {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new RecordBatch()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* number of records / rows. The arrays in the batch should all have this
* length
*
* @returns flatbuffers.Long
*/
length() {
const offset = this.bb.__offset(this.bb_pos, 4);
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
}
/**
* Nodes correspond to the pre-ordered flattened logical schema
*
* @param number index
* @param FieldNode= obj
* @returns FieldNode
*/
nodes(index, obj) {
const offset = this.bb.__offset(this.bb_pos, 6);
return offset ? (obj || new FieldNode()).__init(this.bb.__vector(this.bb_pos + offset) + index * 16, this.bb) : null;
}
/**
* @returns number
*/
nodesLength() {
const offset = this.bb.__offset(this.bb_pos, 6);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* Buffers correspond to the pre-ordered flattened buffer tree
*
* The number of buffers appended to this list depends on the schema. For
* example, most primitive arrays will have 2 buffers, 1 for the validity
* bitmap and 1 for the values. For struct arrays, there will only be a
* single buffer for the validity (nulls) bitmap
*
* @param number index
* @param Buffer= obj
* @returns Buffer
*/
buffers(index, obj) {
const offset = this.bb.__offset(this.bb_pos, 8);
return offset ? (obj || new NS13596923344997147894.Buffer()).__init(this.bb.__vector(this.bb_pos + offset) + index * 16, this.bb) : null;
}
/**
* @returns number
*/
buffersLength() {
const offset = this.bb.__offset(this.bb_pos, 8);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* Optional compression of the message body
*
* @param BodyCompression= obj
* @returns BodyCompression|null
*/
compression(obj) {
const offset = this.bb.__offset(this.bb_pos, 10);
return offset ? (obj || new BodyCompression()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
}
/**
* @param flatbuffers.Builder builder
*/
static startRecordBatch(builder) {
builder.startObject(4);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long length
*/
static addLength(builder, length) {
builder.addFieldInt64(0, length, builder.createLong(0, 0));
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset nodesOffset
*/
static addNodes(builder, nodesOffset) {
builder.addFieldOffset(1, nodesOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startNodesVector(builder, numElems) {
builder.startVector(16, numElems, 8);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset buffersOffset
*/
static addBuffers(builder, buffersOffset) {
builder.addFieldOffset(2, buffersOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startBuffersVector(builder, numElems) {
builder.startVector(16, numElems, 8);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset compressionOffset
*/
static addCompression(builder, compressionOffset) {
builder.addFieldOffset(3, compressionOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endRecordBatch(builder) {
const offset = builder.endObject();
return offset;
}
static createRecordBatch(builder, length, nodesOffset, buffersOffset, compressionOffset) {
RecordBatch.startRecordBatch(builder);
RecordBatch.addLength(builder, length);
RecordBatch.addNodes(builder, nodesOffset);
RecordBatch.addBuffers(builder, buffersOffset);
RecordBatch.addCompression(builder, compressionOffset);
return RecordBatch.endRecordBatch(builder);
}
}
/**

@@ -283,274 +383,276 @@ * For sending dictionary encoding information. Any Field can be

*/
(function (org) {
var apache;
(function (apache) {
var arrow;
(function (arrow) {
var flatbuf;
(function (flatbuf) {
class DictionaryBatch {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns DictionaryBatch
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* @param flatbuffers.ByteBuffer bb
* @param DictionaryBatch= obj
* @returns DictionaryBatch
*/
static getRootAsDictionaryBatch(bb, obj) {
return (obj || new DictionaryBatch).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @returns flatbuffers.Long
*/
id() {
let offset = this.bb.__offset(this.bb_pos, 4);
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
}
/**
* @param org.apache.arrow.flatbuf.RecordBatch= obj
* @returns org.apache.arrow.flatbuf.RecordBatch|null
*/
data(obj) {
let offset = this.bb.__offset(this.bb_pos, 6);
return offset ? (obj || new org.apache.arrow.flatbuf.RecordBatch).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
}
/**
* If isDelta is true the values in the dictionary are to be appended to a
* dictionary with the indicated id
*
* @returns boolean
*/
isDelta() {
let offset = this.bb.__offset(this.bb_pos, 8);
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
}
/**
* @param flatbuffers.Builder builder
*/
static startDictionaryBatch(builder) {
builder.startObject(3);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long id
*/
static addId(builder, id) {
builder.addFieldInt64(0, id, builder.createLong(0, 0));
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset dataOffset
*/
static addData(builder, dataOffset) {
builder.addFieldOffset(1, dataOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param boolean isDelta
*/
static addIsDelta(builder, isDelta) {
builder.addFieldInt8(2, +isDelta, +false);
}
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDictionaryBatch(builder) {
let offset = builder.endObject();
return offset;
}
static createDictionaryBatch(builder, id, dataOffset, isDelta) {
DictionaryBatch.startDictionaryBatch(builder);
DictionaryBatch.addId(builder, id);
DictionaryBatch.addData(builder, dataOffset);
DictionaryBatch.addIsDelta(builder, isDelta);
return DictionaryBatch.endDictionaryBatch(builder);
}
}
flatbuf.DictionaryBatch = DictionaryBatch;
})(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));
})(arrow = apache.arrow || (apache.arrow = {}));
})(apache = org.apache || (org.apache = {}));
})(org || (org = {}));
export class DictionaryBatch {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns DictionaryBatch
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* @param flatbuffers.ByteBuffer bb
* @param DictionaryBatch= obj
* @returns DictionaryBatch
*/
static getRootAsDictionaryBatch(bb, obj) {
return (obj || new DictionaryBatch()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @param flatbuffers.ByteBuffer bb
* @param DictionaryBatch= obj
* @returns DictionaryBatch
*/
static getSizePrefixedRootAsDictionaryBatch(bb, obj) {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new DictionaryBatch()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @returns flatbuffers.Long
*/
id() {
const offset = this.bb.__offset(this.bb_pos, 4);
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
}
/**
* @param RecordBatch= obj
* @returns RecordBatch|null
*/
data(obj) {
const offset = this.bb.__offset(this.bb_pos, 6);
return offset ? (obj || new RecordBatch()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
}
/**
* If isDelta is true the values in the dictionary are to be appended to a
* dictionary with the indicated id. If isDelta is false this dictionary
* should replace the existing dictionary.
*
* @returns boolean
*/
isDelta() {
const offset = this.bb.__offset(this.bb_pos, 8);
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
}
/**
* @param flatbuffers.Builder builder
*/
static startDictionaryBatch(builder) {
builder.startObject(3);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long id
*/
static addId(builder, id) {
builder.addFieldInt64(0, id, builder.createLong(0, 0));
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset dataOffset
*/
static addData(builder, dataOffset) {
builder.addFieldOffset(1, dataOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param boolean isDelta
*/
static addIsDelta(builder, isDelta) {
builder.addFieldInt8(2, +isDelta, +false);
}
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDictionaryBatch(builder) {
const offset = builder.endObject();
return offset;
}
static createDictionaryBatch(builder, id, dataOffset, isDelta) {
DictionaryBatch.startDictionaryBatch(builder);
DictionaryBatch.addId(builder, id);
DictionaryBatch.addData(builder, dataOffset);
DictionaryBatch.addIsDelta(builder, isDelta);
return DictionaryBatch.endDictionaryBatch(builder);
}
}
/**
* @constructor
*/
(function (org) {
var apache;
(function (apache) {
var arrow;
(function (arrow) {
var flatbuf;
(function (flatbuf) {
class Message {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Message
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* @param flatbuffers.ByteBuffer bb
* @param Message= obj
* @returns Message
*/
static getRootAsMessage(bb, obj) {
return (obj || new Message).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @returns org.apache.arrow.flatbuf.MetadataVersion
*/
version() {
let offset = this.bb.__offset(this.bb_pos, 4);
return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion.V1;
}
/**
* @returns org.apache.arrow.flatbuf.MessageHeader
*/
headerType() {
let offset = this.bb.__offset(this.bb_pos, 6);
return offset ? /** */ (this.bb.readUint8(this.bb_pos + offset)) : org.apache.arrow.flatbuf.MessageHeader.NONE;
}
/**
* @param flatbuffers.Table obj
* @returns ?flatbuffers.Table
*/
header(obj) {
let offset = this.bb.__offset(this.bb_pos, 8);
return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
}
/**
* @returns flatbuffers.Long
*/
bodyLength() {
let offset = this.bb.__offset(this.bb_pos, 10);
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
}
/**
* @param number index
* @param org.apache.arrow.flatbuf.KeyValue= obj
* @returns org.apache.arrow.flatbuf.KeyValue
*/
customMetadata(index, obj) {
let offset = this.bb.__offset(this.bb_pos, 12);
return offset ? (obj || new NS7624605610262437867.org.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
}
/**
* @returns number
*/
customMetadataLength() {
let offset = this.bb.__offset(this.bb_pos, 12);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* @param flatbuffers.Builder builder
*/
static startMessage(builder) {
builder.startObject(5);
}
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.MetadataVersion version
*/
static addVersion(builder, version) {
builder.addFieldInt16(0, version, NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion.V1);
}
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.MessageHeader headerType
*/
static addHeaderType(builder, headerType) {
builder.addFieldInt8(1, headerType, org.apache.arrow.flatbuf.MessageHeader.NONE);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset headerOffset
*/
static addHeader(builder, headerOffset) {
builder.addFieldOffset(2, headerOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long bodyLength
*/
static addBodyLength(builder, bodyLength) {
builder.addFieldInt64(3, bodyLength, builder.createLong(0, 0));
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset customMetadataOffset
*/
static addCustomMetadata(builder, customMetadataOffset) {
builder.addFieldOffset(4, customMetadataOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createCustomMetadataVector(builder, data) {
builder.startVector(4, data.length, 4);
for (let i = data.length - 1; i >= 0; i--) {
builder.addOffset(data[i]);
}
return builder.endVector();
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startCustomMetadataVector(builder, numElems) {
builder.startVector(4, numElems, 4);
}
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endMessage(builder) {
let offset = builder.endObject();
return offset;
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishMessageBuffer(builder, offset) {
builder.finish(offset);
}
static createMessage(builder, version, headerType, headerOffset, bodyLength, customMetadataOffset) {
Message.startMessage(builder);
Message.addVersion(builder, version);
Message.addHeaderType(builder, headerType);
Message.addHeader(builder, headerOffset);
Message.addBodyLength(builder, bodyLength);
Message.addCustomMetadata(builder, customMetadataOffset);
return Message.endMessage(builder);
}
}
flatbuf.Message = Message;
})(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));
})(arrow = apache.arrow || (apache.arrow = {}));
})(apache = org.apache || (org.apache = {}));
})(org || (org = {}));
export class Message {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Message
*/
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* @param flatbuffers.ByteBuffer bb
* @param Message= obj
* @returns Message
*/
static getRootAsMessage(bb, obj) {
return (obj || new Message()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @param flatbuffers.ByteBuffer bb
* @param Message= obj
* @returns Message
*/
static getSizePrefixedRootAsMessage(bb, obj) {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new Message()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
/**
* @returns MetadataVersion
*/
version() {
const offset = this.bb.__offset(this.bb_pos, 4);
return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : NS13596923344997147894.MetadataVersion.V1;
}
/**
* @returns MessageHeader
*/
headerType() {
const offset = this.bb.__offset(this.bb_pos, 6);
return offset ? /** */ (this.bb.readUint8(this.bb_pos + offset)) : MessageHeader.NONE;
}
/**
* @param flatbuffers.Table obj
* @returns ?flatbuffers.Table
*/
header(obj) {
const offset = this.bb.__offset(this.bb_pos, 8);
return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;
}
/**
* @returns flatbuffers.Long
*/
bodyLength() {
const offset = this.bb.__offset(this.bb_pos, 10);
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
}
/**
* @param number index
* @param KeyValue= obj
* @returns KeyValue
*/
customMetadata(index, obj) {
const offset = this.bb.__offset(this.bb_pos, 12);
return offset ? (obj || new NS13596923344997147894.KeyValue()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
}
/**
* @returns number
*/
customMetadataLength() {
const offset = this.bb.__offset(this.bb_pos, 12);
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
}
/**
* @param flatbuffers.Builder builder
*/
static startMessage(builder) {
builder.startObject(5);
}
/**
* @param flatbuffers.Builder builder
* @param MetadataVersion version
*/
static addVersion(builder, version) {
builder.addFieldInt16(0, version, NS13596923344997147894.MetadataVersion.V1);
}
/**
* @param flatbuffers.Builder builder
* @param MessageHeader headerType
*/
static addHeaderType(builder, headerType) {
builder.addFieldInt8(1, headerType, MessageHeader.NONE);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset headerOffset
*/
static addHeader(builder, headerOffset) {
builder.addFieldOffset(2, headerOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long bodyLength
*/
static addBodyLength(builder, bodyLength) {
builder.addFieldInt64(3, bodyLength, builder.createLong(0, 0));
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset customMetadataOffset
*/
static addCustomMetadata(builder, customMetadataOffset) {
builder.addFieldOffset(4, customMetadataOffset, 0);
}
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createCustomMetadataVector(builder, data) {
builder.startVector(4, data.length, 4);
for (let i = data.length - 1; i >= 0; i--) {
builder.addOffset(data[i]);
}
return builder.endVector();
}
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startCustomMetadataVector(builder, numElems) {
builder.startVector(4, numElems, 4);
}
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endMessage(builder) {
const offset = builder.endObject();
return offset;
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishMessageBuffer(builder, offset) {
builder.finish(offset);
}
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishSizePrefixedMessageBuffer(builder, offset) {
builder.finish(offset, undefined, true);
}
static createMessage(builder, version, headerType, headerOffset, bodyLength, customMetadataOffset) {
Message.startMessage(builder);
Message.addVersion(builder, version);
Message.addHeaderType(builder, headerType);
Message.addHeader(builder, headerOffset);
Message.addBodyLength(builder, bodyLength);
Message.addCustomMetadata(builder, customMetadataOffset);
return Message.endMessage(builder);
}
}
//# sourceMappingURL=Message.mjs.map
import { flatbuffers } from 'flatbuffers';
/**
* Logical types, vector layouts, and schemas
*
* @enum {number}
*/
export declare namespace org.apache.arrow.flatbuf {
enum MetadataVersion {
/**
* 0.1.0
*/
V1 = 0,
/**
* 0.2.0
*/
V2 = 1,
/**
* 0.3.0 -> 0.7.1
*/
V3 = 2,
/**
* >= 0.8.0
*/
V4 = 3
}
export declare enum MetadataVersion {
/**
* 0.1.0 (October 2016).
*/
V1 = 0,
/**
* 0.2.0 (February 2017). Non-backwards compatible with V1.
*/
V2 = 1,
/**
* 0.3.0 -> 0.7.1 (May - December 2017). Non-backwards compatible with V2.
*/
V3 = 2,
/**
* >= 0.8.0 (December 2017). Non-backwards compatible with V3.
*/
V4 = 3,
/**
* >= 1.0.0 (July 2020. Backwards compatible with V4 (V5 readers can read V4
* metadata and IPC messages). Implementations are recommended to provide a
* V4 compatibility mode with V5 format changes disabled.
*
* Incompatible changes between V4 and V5:
* - Union buffer layout has changed. In V5, Unions don't have a validity
* bitmap buffer.
*/
V5 = 4
}
/**
* Represents Arrow Features that might not have full support
* within implementations. This is intended to be used in
* two scenarios:
* 1. A mechanism for readers of Arrow Streams
* and files to understand that the stream or file makes
* use of a feature that isn't supported or unknown to
* the implementation (and therefore can meet the Arrow
* forward compatibility guarantees).
* 2. A means of negotiating between a client and server
* what features a stream is allowed to use. The enums
* values here are intented to represent higher level
* features, additional details maybe negotiated
* with key-value pairs specific to the protocol.
*
* Enums added to this list should be assigned power-of-two values
* to facilitate exchanging and comparing bitmaps for supported
* features.
*
* @enum {number}
*/
export declare namespace org.apache.arrow.flatbuf {
enum UnionMode {
Sparse = 0,
Dense = 1
}
export declare enum Feature {
/**
* Needed to make flatbuffers happy.
*/
UNUSED = 0,
/**
* The stream makes use of multiple full dictionaries with the
* same ID and assumes clients implement dictionary replacement
* correctly.
*/
DICTIONARY_REPLACEMENT = 1,
/**
* The stream makes use of compressed bodies as described
* in Message.fbs.
*/
COMPRESSED_BODY = 2
}

@@ -37,8 +76,5 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
enum Precision {
HALF = 0,
SINGLE = 1,
DOUBLE = 2
}
export declare enum UnionMode {
Sparse = 0,
Dense = 1
}

@@ -48,7 +84,6 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
enum DateUnit {
DAY = 0,
MILLISECOND = 1
}
export declare enum Precision {
HALF = 0,
SINGLE = 1,
DOUBLE = 2
}

@@ -58,9 +93,5 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
enum TimeUnit {
SECOND = 0,
MILLISECOND = 1,
MICROSECOND = 2,
NANOSECOND = 3
}
export declare enum DateUnit {
DAY = 0,
MILLISECOND = 1
}

@@ -70,9 +101,16 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
enum IntervalUnit {
YEAR_MONTH = 0,
DAY_TIME = 1
}
export declare enum TimeUnit {
SECOND = 0,
MILLISECOND = 1,
MICROSECOND = 2,
NANOSECOND = 3
}
/**
* @enum {number}
*/
export declare enum IntervalUnit {
YEAR_MONTH = 0,
DAY_TIME = 1
}
/**
* ----------------------------------------------------------------------

@@ -84,30 +122,40 @@ * Top-level Type value, enabling extensible type-specific metadata. We can

*/
export declare namespace org.apache.arrow.flatbuf {
enum Type {
NONE = 0,
Null = 1,
Int = 2,
FloatingPoint = 3,
Binary = 4,
Utf8 = 5,
Bool = 6,
Decimal = 7,
Date = 8,
Time = 9,
Timestamp = 10,
Interval = 11,
List = 12,
Struct_ = 13,
Union = 14,
FixedSizeBinary = 15,
FixedSizeList = 16,
Map = 17,
Duration = 18,
LargeBinary = 19,
LargeUtf8 = 20,
LargeList = 21
}
export declare enum Type {
NONE = 0,
Null = 1,
Int = 2,
FloatingPoint = 3,
Binary = 4,
Utf8 = 5,
Bool = 6,
Decimal = 7,
Date = 8,
Time = 9,
Timestamp = 10,
Interval = 11,
List = 12,
Struct_ = 13,
Union = 14,
FixedSizeBinary = 15,
FixedSizeList = 16,
Map = 17,
Duration = 18,
LargeBinary = 19,
LargeUtf8 = 20,
LargeList = 21
}
/**
* ----------------------------------------------------------------------
* Dictionary encoding metadata
* Maintained for forwards compatibility, in the future
* Dictionaries might be explicit maps between integers and values
* allowing for non-contiguous index values
*
* @enum {number}
*/
export declare enum DictionaryKind {
DenseArray = 0
}
/**
* ----------------------------------------------------------------------
* Endianness of the platform producing the data

@@ -117,7 +165,5 @@ *

*/
export declare namespace org.apache.arrow.flatbuf {
enum Endianness {
Little = 0,
Big = 1
}
export declare enum Endianness {
Little = 0,
Big = 1
}

@@ -129,29 +175,33 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Null {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Null
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Null;
/**
* @param flatbuffers.ByteBuffer bb
* @param Null= obj
* @returns Null
*/
static getRootAsNull(bb: flatbuffers.ByteBuffer, obj?: Null): Null;
/**
* @param flatbuffers.Builder builder
*/
static startNull(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endNull(builder: flatbuffers.Builder): flatbuffers.Offset;
static createNull(builder: flatbuffers.Builder): flatbuffers.Offset;
}
export declare class Null {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Null
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Null;
/**
* @param flatbuffers.ByteBuffer bb
* @param Null= obj
* @returns Null
*/
static getRootAsNull(bb: flatbuffers.ByteBuffer, obj?: Null): Null;
/**
* @param flatbuffers.ByteBuffer bb
* @param Null= obj
* @returns Null
*/
static getSizePrefixedRootAsNull(bb: flatbuffers.ByteBuffer, obj?: Null): Null;
/**
* @param flatbuffers.Builder builder
*/
static startNull(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endNull(builder: flatbuffers.Builder): flatbuffers.Offset;
static createNull(builder: flatbuffers.Builder): flatbuffers.Offset;
}

@@ -165,29 +215,33 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Struct_ {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Struct_
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Struct_;
/**
* @param flatbuffers.ByteBuffer bb
* @param Struct_= obj
* @returns Struct_
*/
static getRootAsStruct_(bb: flatbuffers.ByteBuffer, obj?: Struct_): Struct_;
/**
* @param flatbuffers.Builder builder
*/
static startStruct_(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endStruct_(builder: flatbuffers.Builder): flatbuffers.Offset;
static createStruct_(builder: flatbuffers.Builder): flatbuffers.Offset;
}
export declare class Struct_ {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Struct_
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Struct_;
/**
* @param flatbuffers.ByteBuffer bb
* @param Struct_= obj
* @returns Struct_
*/
static getRootAsStruct_(bb: flatbuffers.ByteBuffer, obj?: Struct_): Struct_;
/**
* @param flatbuffers.ByteBuffer bb
* @param Struct_= obj
* @returns Struct_
*/
static getSizePrefixedRootAsStruct_(bb: flatbuffers.ByteBuffer, obj?: Struct_): Struct_;
/**
* @param flatbuffers.Builder builder
*/
static startStruct_(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endStruct_(builder: flatbuffers.Builder): flatbuffers.Offset;
static createStruct_(builder: flatbuffers.Builder): flatbuffers.Offset;
}

@@ -197,29 +251,33 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class List {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns List
*/
__init(i: number, bb: flatbuffers.ByteBuffer): List;
/**
* @param flatbuffers.ByteBuffer bb
* @param List= obj
* @returns List
*/
static getRootAsList(bb: flatbuffers.ByteBuffer, obj?: List): List;
/**
* @param flatbuffers.Builder builder
*/
static startList(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endList(builder: flatbuffers.Builder): flatbuffers.Offset;
static createList(builder: flatbuffers.Builder): flatbuffers.Offset;
}
export declare class List {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns List
*/
__init(i: number, bb: flatbuffers.ByteBuffer): List;
/**
* @param flatbuffers.ByteBuffer bb
* @param List= obj
* @returns List
*/
static getRootAsList(bb: flatbuffers.ByteBuffer, obj?: List): List;
/**
* @param flatbuffers.ByteBuffer bb
* @param List= obj
* @returns List
*/
static getSizePrefixedRootAsList(bb: flatbuffers.ByteBuffer, obj?: List): List;
/**
* @param flatbuffers.Builder builder
*/
static startList(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endList(builder: flatbuffers.Builder): flatbuffers.Offset;
static createList(builder: flatbuffers.Builder): flatbuffers.Offset;
}

@@ -232,29 +290,33 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class LargeList {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns LargeList
*/
__init(i: number, bb: flatbuffers.ByteBuffer): LargeList;
/**
* @param flatbuffers.ByteBuffer bb
* @param LargeList= obj
* @returns LargeList
*/
static getRootAsLargeList(bb: flatbuffers.ByteBuffer, obj?: LargeList): LargeList;
/**
* @param flatbuffers.Builder builder
*/
static startLargeList(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endLargeList(builder: flatbuffers.Builder): flatbuffers.Offset;
static createLargeList(builder: flatbuffers.Builder): flatbuffers.Offset;
}
export declare class LargeList {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns LargeList
*/
__init(i: number, bb: flatbuffers.ByteBuffer): LargeList;
/**
* @param flatbuffers.ByteBuffer bb
* @param LargeList= obj
* @returns LargeList
*/
static getRootAsLargeList(bb: flatbuffers.ByteBuffer, obj?: LargeList): LargeList;
/**
* @param flatbuffers.ByteBuffer bb
* @param LargeList= obj
* @returns LargeList
*/
static getSizePrefixedRootAsLargeList(bb: flatbuffers.ByteBuffer, obj?: LargeList): LargeList;
/**
* @param flatbuffers.Builder builder
*/
static startLargeList(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endLargeList(builder: flatbuffers.Builder): flatbuffers.Offset;
static createLargeList(builder: flatbuffers.Builder): flatbuffers.Offset;
}

@@ -264,40 +326,44 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class FixedSizeList {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns FixedSizeList
*/
__init(i: number, bb: flatbuffers.ByteBuffer): FixedSizeList;
/**
* @param flatbuffers.ByteBuffer bb
* @param FixedSizeList= obj
* @returns FixedSizeList
*/
static getRootAsFixedSizeList(bb: flatbuffers.ByteBuffer, obj?: FixedSizeList): FixedSizeList;
/**
* Number of list items per value
*
* @returns number
*/
listSize(): number;
/**
* @param flatbuffers.Builder builder
*/
static startFixedSizeList(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param number listSize
*/
static addListSize(builder: flatbuffers.Builder, listSize: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endFixedSizeList(builder: flatbuffers.Builder): flatbuffers.Offset;
static createFixedSizeList(builder: flatbuffers.Builder, listSize: number): flatbuffers.Offset;
}
export declare class FixedSizeList {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns FixedSizeList
*/
__init(i: number, bb: flatbuffers.ByteBuffer): FixedSizeList;
/**
* @param flatbuffers.ByteBuffer bb
* @param FixedSizeList= obj
* @returns FixedSizeList
*/
static getRootAsFixedSizeList(bb: flatbuffers.ByteBuffer, obj?: FixedSizeList): FixedSizeList;
/**
* @param flatbuffers.ByteBuffer bb
* @param FixedSizeList= obj
* @returns FixedSizeList
*/
static getSizePrefixedRootAsFixedSizeList(bb: flatbuffers.ByteBuffer, obj?: FixedSizeList): FixedSizeList;
/**
* Number of list items per value
*
* @returns number
*/
listSize(): number;
/**
* @param flatbuffers.Builder builder
*/
static startFixedSizeList(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param number listSize
*/
static addListSize(builder: flatbuffers.Builder, listSize: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endFixedSizeList(builder: flatbuffers.Builder): flatbuffers.Offset;
static createFixedSizeList(builder: flatbuffers.Builder, listSize: number): flatbuffers.Offset;
}

@@ -307,3 +373,3 @@ /**

*
* List<entry: Struct<key: K, value: V>>
* List<entries: Struct<key: K, value: V>>
*

@@ -313,15 +379,15 @@ * In this layout, the keys and values are each respectively contiguous. We do

* for ensuring that the keys are hashable and unique. Whether the keys are sorted
* may be set in the metadata for this field
* may be set in the metadata for this field.
*
* In a Field with Map type, the Field has a child Struct field, which then
* In a field with Map type, the field has a child Struct field, which then
* has two children: key type and the second the value type. The names of the
* child fields may be respectively "entry", "key", and "value", but this is
* not enforced
* child fields may be respectively "entries", "key", and "value", but this is
* not enforced.
*
* Map
* - child[0] entry: Struct
* - child[0] entries: Struct
* - child[0] key: K
* - child[1] value: V
*
* Neither the "entry" field nor the "key" field may be nullable.
* Neither the "entries" field nor the "key" field may be nullable.
*

@@ -334,40 +400,44 @@ * The metadata is structured so that Arrow systems without special handling

*/
export declare namespace org.apache.arrow.flatbuf {
class Map {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Map
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Map;
/**
* @param flatbuffers.ByteBuffer bb
* @param Map= obj
* @returns Map
*/
static getRootAsMap(bb: flatbuffers.ByteBuffer, obj?: Map): Map;
/**
* Set to true if the keys within each value are sorted
*
* @returns boolean
*/
keysSorted(): boolean;
/**
* @param flatbuffers.Builder builder
*/
static startMap(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param boolean keysSorted
*/
static addKeysSorted(builder: flatbuffers.Builder, keysSorted: boolean): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endMap(builder: flatbuffers.Builder): flatbuffers.Offset;
static createMap(builder: flatbuffers.Builder, keysSorted: boolean): flatbuffers.Offset;
}
export declare class Map {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Map
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Map;
/**
* @param flatbuffers.ByteBuffer bb
* @param Map= obj
* @returns Map
*/
static getRootAsMap(bb: flatbuffers.ByteBuffer, obj?: Map): Map;
/**
* @param flatbuffers.ByteBuffer bb
* @param Map= obj
* @returns Map
*/
static getSizePrefixedRootAsMap(bb: flatbuffers.ByteBuffer, obj?: Map): Map;
/**
* Set to true if the keys within each value are sorted
*
* @returns boolean
*/
keysSorted(): boolean;
/**
* @param flatbuffers.Builder builder
*/
static startMap(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param boolean keysSorted
*/
static addKeysSorted(builder: flatbuffers.Builder, keysSorted: boolean): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endMap(builder: flatbuffers.Builder): flatbuffers.Offset;
static createMap(builder: flatbuffers.Builder, keysSorted: boolean): flatbuffers.Offset;
}

@@ -382,67 +452,71 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Union {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Union
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Union;
/**
* @param flatbuffers.ByteBuffer bb
* @param Union= obj
* @returns Union
*/
static getRootAsUnion(bb: flatbuffers.ByteBuffer, obj?: Union): Union;
/**
* @returns org.apache.arrow.flatbuf.UnionMode
*/
mode(): org.apache.arrow.flatbuf.UnionMode;
/**
* @param number index
* @returns number
*/
typeIds(index: number): number | null;
/**
* @returns number
*/
typeIdsLength(): number;
/**
* @returns Int32Array
*/
typeIdsArray(): Int32Array | null;
/**
* @param flatbuffers.Builder builder
*/
static startUnion(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.UnionMode mode
*/
static addMode(builder: flatbuffers.Builder, mode: org.apache.arrow.flatbuf.UnionMode): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset typeIdsOffset
*/
static addTypeIds(builder: flatbuffers.Builder, typeIdsOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<number> data
* @returns flatbuffers.Offset
*/
static createTypeIdsVector(builder: flatbuffers.Builder, data: number[] | Int32Array): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startTypeIdsVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endUnion(builder: flatbuffers.Builder): flatbuffers.Offset;
static createUnion(builder: flatbuffers.Builder, mode: org.apache.arrow.flatbuf.UnionMode, typeIdsOffset: flatbuffers.Offset): flatbuffers.Offset;
}
export declare class Union {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Union
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Union;
/**
* @param flatbuffers.ByteBuffer bb
* @param Union= obj
* @returns Union
*/
static getRootAsUnion(bb: flatbuffers.ByteBuffer, obj?: Union): Union;
/**
* @param flatbuffers.ByteBuffer bb
* @param Union= obj
* @returns Union
*/
static getSizePrefixedRootAsUnion(bb: flatbuffers.ByteBuffer, obj?: Union): Union;
/**
* @returns UnionMode
*/
mode(): UnionMode;
/**
* @param number index
* @returns number
*/
typeIds(index: number): number | null;
/**
* @returns number
*/
typeIdsLength(): number;
/**
* @returns Int32Array
*/
typeIdsArray(): Int32Array | null;
/**
* @param flatbuffers.Builder builder
*/
static startUnion(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param UnionMode mode
*/
static addMode(builder: flatbuffers.Builder, mode: UnionMode): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset typeIdsOffset
*/
static addTypeIds(builder: flatbuffers.Builder, typeIdsOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<number> data
* @returns flatbuffers.Offset
*/
static createTypeIdsVector(builder: flatbuffers.Builder, data: number[] | Int32Array): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startTypeIdsVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endUnion(builder: flatbuffers.Builder): flatbuffers.Offset;
static createUnion(builder: flatbuffers.Builder, mode: UnionMode, typeIdsOffset: flatbuffers.Offset): flatbuffers.Offset;
}

@@ -452,47 +526,51 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Int {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Int
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Int;
/**
* @param flatbuffers.ByteBuffer bb
* @param Int= obj
* @returns Int
*/
static getRootAsInt(bb: flatbuffers.ByteBuffer, obj?: Int): Int;
/**
* @returns number
*/
bitWidth(): number;
/**
* @returns boolean
*/
isSigned(): boolean;
/**
* @param flatbuffers.Builder builder
*/
static startInt(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param number bitWidth
*/
static addBitWidth(builder: flatbuffers.Builder, bitWidth: number): void;
/**
* @param flatbuffers.Builder builder
* @param boolean isSigned
*/
static addIsSigned(builder: flatbuffers.Builder, isSigned: boolean): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endInt(builder: flatbuffers.Builder): flatbuffers.Offset;
static createInt(builder: flatbuffers.Builder, bitWidth: number, isSigned: boolean): flatbuffers.Offset;
}
export declare class Int {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Int
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Int;
/**
* @param flatbuffers.ByteBuffer bb
* @param Int= obj
* @returns Int
*/
static getRootAsInt(bb: flatbuffers.ByteBuffer, obj?: Int): Int;
/**
* @param flatbuffers.ByteBuffer bb
* @param Int= obj
* @returns Int
*/
static getSizePrefixedRootAsInt(bb: flatbuffers.ByteBuffer, obj?: Int): Int;
/**
* @returns number
*/
bitWidth(): number;
/**
* @returns boolean
*/
isSigned(): boolean;
/**
* @param flatbuffers.Builder builder
*/
static startInt(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param number bitWidth
*/
static addBitWidth(builder: flatbuffers.Builder, bitWidth: number): void;
/**
* @param flatbuffers.Builder builder
* @param boolean isSigned
*/
static addIsSigned(builder: flatbuffers.Builder, isSigned: boolean): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endInt(builder: flatbuffers.Builder): flatbuffers.Offset;
static createInt(builder: flatbuffers.Builder, bitWidth: number, isSigned: boolean): flatbuffers.Offset;
}

@@ -502,38 +580,42 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class FloatingPoint {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns FloatingPoint
*/
__init(i: number, bb: flatbuffers.ByteBuffer): FloatingPoint;
/**
* @param flatbuffers.ByteBuffer bb
* @param FloatingPoint= obj
* @returns FloatingPoint
*/
static getRootAsFloatingPoint(bb: flatbuffers.ByteBuffer, obj?: FloatingPoint): FloatingPoint;
/**
* @returns org.apache.arrow.flatbuf.Precision
*/
precision(): org.apache.arrow.flatbuf.Precision;
/**
* @param flatbuffers.Builder builder
*/
static startFloatingPoint(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.Precision precision
*/
static addPrecision(builder: flatbuffers.Builder, precision: org.apache.arrow.flatbuf.Precision): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endFloatingPoint(builder: flatbuffers.Builder): flatbuffers.Offset;
static createFloatingPoint(builder: flatbuffers.Builder, precision: org.apache.arrow.flatbuf.Precision): flatbuffers.Offset;
}
export declare class FloatingPoint {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns FloatingPoint
*/
__init(i: number, bb: flatbuffers.ByteBuffer): FloatingPoint;
/**
* @param flatbuffers.ByteBuffer bb
* @param FloatingPoint= obj
* @returns FloatingPoint
*/
static getRootAsFloatingPoint(bb: flatbuffers.ByteBuffer, obj?: FloatingPoint): FloatingPoint;
/**
* @param flatbuffers.ByteBuffer bb
* @param FloatingPoint= obj
* @returns FloatingPoint
*/
static getSizePrefixedRootAsFloatingPoint(bb: flatbuffers.ByteBuffer, obj?: FloatingPoint): FloatingPoint;
/**
* @returns Precision
*/
precision(): Precision;
/**
* @param flatbuffers.Builder builder
*/
static startFloatingPoint(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param Precision precision
*/
static addPrecision(builder: flatbuffers.Builder, precision: Precision): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endFloatingPoint(builder: flatbuffers.Builder): flatbuffers.Offset;
static createFloatingPoint(builder: flatbuffers.Builder, precision: Precision): flatbuffers.Offset;
}

@@ -545,29 +627,33 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Utf8 {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Utf8
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Utf8;
/**
* @param flatbuffers.ByteBuffer bb
* @param Utf8= obj
* @returns Utf8
*/
static getRootAsUtf8(bb: flatbuffers.ByteBuffer, obj?: Utf8): Utf8;
/**
* @param flatbuffers.Builder builder
*/
static startUtf8(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endUtf8(builder: flatbuffers.Builder): flatbuffers.Offset;
static createUtf8(builder: flatbuffers.Builder): flatbuffers.Offset;
}
export declare class Utf8 {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Utf8
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Utf8;
/**
* @param flatbuffers.ByteBuffer bb
* @param Utf8= obj
* @returns Utf8
*/
static getRootAsUtf8(bb: flatbuffers.ByteBuffer, obj?: Utf8): Utf8;
/**
* @param flatbuffers.ByteBuffer bb
* @param Utf8= obj
* @returns Utf8
*/
static getSizePrefixedRootAsUtf8(bb: flatbuffers.ByteBuffer, obj?: Utf8): Utf8;
/**
* @param flatbuffers.Builder builder
*/
static startUtf8(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endUtf8(builder: flatbuffers.Builder): flatbuffers.Offset;
static createUtf8(builder: flatbuffers.Builder): flatbuffers.Offset;
}

@@ -579,29 +665,33 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Binary {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Binary
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Binary;
/**
* @param flatbuffers.ByteBuffer bb
* @param Binary= obj
* @returns Binary
*/
static getRootAsBinary(bb: flatbuffers.ByteBuffer, obj?: Binary): Binary;
/**
* @param flatbuffers.Builder builder
*/
static startBinary(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
static createBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
}
export declare class Binary {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Binary
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Binary;
/**
* @param flatbuffers.ByteBuffer bb
* @param Binary= obj
* @returns Binary
*/
static getRootAsBinary(bb: flatbuffers.ByteBuffer, obj?: Binary): Binary;
/**
* @param flatbuffers.ByteBuffer bb
* @param Binary= obj
* @returns Binary
*/
static getSizePrefixedRootAsBinary(bb: flatbuffers.ByteBuffer, obj?: Binary): Binary;
/**
* @param flatbuffers.Builder builder
*/
static startBinary(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
static createBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
}

@@ -614,29 +704,33 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class LargeUtf8 {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns LargeUtf8
*/
__init(i: number, bb: flatbuffers.ByteBuffer): LargeUtf8;
/**
* @param flatbuffers.ByteBuffer bb
* @param LargeUtf8= obj
* @returns LargeUtf8
*/
static getRootAsLargeUtf8(bb: flatbuffers.ByteBuffer, obj?: LargeUtf8): LargeUtf8;
/**
* @param flatbuffers.Builder builder
*/
static startLargeUtf8(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endLargeUtf8(builder: flatbuffers.Builder): flatbuffers.Offset;
static createLargeUtf8(builder: flatbuffers.Builder): flatbuffers.Offset;
}
export declare class LargeUtf8 {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns LargeUtf8
*/
__init(i: number, bb: flatbuffers.ByteBuffer): LargeUtf8;
/**
* @param flatbuffers.ByteBuffer bb
* @param LargeUtf8= obj
* @returns LargeUtf8
*/
static getRootAsLargeUtf8(bb: flatbuffers.ByteBuffer, obj?: LargeUtf8): LargeUtf8;
/**
* @param flatbuffers.ByteBuffer bb
* @param LargeUtf8= obj
* @returns LargeUtf8
*/
static getSizePrefixedRootAsLargeUtf8(bb: flatbuffers.ByteBuffer, obj?: LargeUtf8): LargeUtf8;
/**
* @param flatbuffers.Builder builder
*/
static startLargeUtf8(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endLargeUtf8(builder: flatbuffers.Builder): flatbuffers.Offset;
static createLargeUtf8(builder: flatbuffers.Builder): flatbuffers.Offset;
}

@@ -649,29 +743,33 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class LargeBinary {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns LargeBinary
*/
__init(i: number, bb: flatbuffers.ByteBuffer): LargeBinary;
/**
* @param flatbuffers.ByteBuffer bb
* @param LargeBinary= obj
* @returns LargeBinary
*/
static getRootAsLargeBinary(bb: flatbuffers.ByteBuffer, obj?: LargeBinary): LargeBinary;
/**
* @param flatbuffers.Builder builder
*/
static startLargeBinary(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endLargeBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
static createLargeBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
}
export declare class LargeBinary {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns LargeBinary
*/
__init(i: number, bb: flatbuffers.ByteBuffer): LargeBinary;
/**
* @param flatbuffers.ByteBuffer bb
* @param LargeBinary= obj
* @returns LargeBinary
*/
static getRootAsLargeBinary(bb: flatbuffers.ByteBuffer, obj?: LargeBinary): LargeBinary;
/**
* @param flatbuffers.ByteBuffer bb
* @param LargeBinary= obj
* @returns LargeBinary
*/
static getSizePrefixedRootAsLargeBinary(bb: flatbuffers.ByteBuffer, obj?: LargeBinary): LargeBinary;
/**
* @param flatbuffers.Builder builder
*/
static startLargeBinary(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endLargeBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
static createLargeBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
}

@@ -681,40 +779,44 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class FixedSizeBinary {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns FixedSizeBinary
*/
__init(i: number, bb: flatbuffers.ByteBuffer): FixedSizeBinary;
/**
* @param flatbuffers.ByteBuffer bb
* @param FixedSizeBinary= obj
* @returns FixedSizeBinary
*/
static getRootAsFixedSizeBinary(bb: flatbuffers.ByteBuffer, obj?: FixedSizeBinary): FixedSizeBinary;
/**
* Number of bytes per value
*
* @returns number
*/
byteWidth(): number;
/**
* @param flatbuffers.Builder builder
*/
static startFixedSizeBinary(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param number byteWidth
*/
static addByteWidth(builder: flatbuffers.Builder, byteWidth: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endFixedSizeBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
static createFixedSizeBinary(builder: flatbuffers.Builder, byteWidth: number): flatbuffers.Offset;
}
export declare class FixedSizeBinary {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns FixedSizeBinary
*/
__init(i: number, bb: flatbuffers.ByteBuffer): FixedSizeBinary;
/**
* @param flatbuffers.ByteBuffer bb
* @param FixedSizeBinary= obj
* @returns FixedSizeBinary
*/
static getRootAsFixedSizeBinary(bb: flatbuffers.ByteBuffer, obj?: FixedSizeBinary): FixedSizeBinary;
/**
* @param flatbuffers.ByteBuffer bb
* @param FixedSizeBinary= obj
* @returns FixedSizeBinary
*/
static getSizePrefixedRootAsFixedSizeBinary(bb: flatbuffers.ByteBuffer, obj?: FixedSizeBinary): FixedSizeBinary;
/**
* Number of bytes per value
*
* @returns number
*/
byteWidth(): number;
/**
* @param flatbuffers.Builder builder
*/
static startFixedSizeBinary(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param number byteWidth
*/
static addByteWidth(builder: flatbuffers.Builder, byteWidth: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endFixedSizeBinary(builder: flatbuffers.Builder): flatbuffers.Offset;
static createFixedSizeBinary(builder: flatbuffers.Builder, byteWidth: number): flatbuffers.Offset;
}

@@ -724,82 +826,107 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Bool {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Bool
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Bool;
/**
* @param flatbuffers.ByteBuffer bb
* @param Bool= obj
* @returns Bool
*/
static getRootAsBool(bb: flatbuffers.ByteBuffer, obj?: Bool): Bool;
/**
* @param flatbuffers.Builder builder
*/
static startBool(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endBool(builder: flatbuffers.Builder): flatbuffers.Offset;
static createBool(builder: flatbuffers.Builder): flatbuffers.Offset;
}
export declare class Bool {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Bool
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Bool;
/**
* @param flatbuffers.ByteBuffer bb
* @param Bool= obj
* @returns Bool
*/
static getRootAsBool(bb: flatbuffers.ByteBuffer, obj?: Bool): Bool;
/**
* @param flatbuffers.ByteBuffer bb
* @param Bool= obj
* @returns Bool
*/
static getSizePrefixedRootAsBool(bb: flatbuffers.ByteBuffer, obj?: Bool): Bool;
/**
* @param flatbuffers.Builder builder
*/
static startBool(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endBool(builder: flatbuffers.Builder): flatbuffers.Offset;
static createBool(builder: flatbuffers.Builder): flatbuffers.Offset;
}
/**
* Exact decimal value represented as an integer value in two's
* complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers
* are used. The representation uses the endianness indicated
* in the Schema.
*
* @constructor
*/
export declare namespace org.apache.arrow.flatbuf {
class Decimal {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Decimal
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Decimal;
/**
* @param flatbuffers.ByteBuffer bb
* @param Decimal= obj
* @returns Decimal
*/
static getRootAsDecimal(bb: flatbuffers.ByteBuffer, obj?: Decimal): Decimal;
/**
* Total number of decimal digits
*
* @returns number
*/
precision(): number;
/**
* Number of digits after the decimal point "."
*
* @returns number
*/
scale(): number;
/**
* @param flatbuffers.Builder builder
*/
static startDecimal(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param number precision
*/
static addPrecision(builder: flatbuffers.Builder, precision: number): void;
/**
* @param flatbuffers.Builder builder
* @param number scale
*/
static addScale(builder: flatbuffers.Builder, scale: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDecimal(builder: flatbuffers.Builder): flatbuffers.Offset;
static createDecimal(builder: flatbuffers.Builder, precision: number, scale: number): flatbuffers.Offset;
}
export declare class Decimal {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Decimal
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Decimal;
/**
* @param flatbuffers.ByteBuffer bb
* @param Decimal= obj
* @returns Decimal
*/
static getRootAsDecimal(bb: flatbuffers.ByteBuffer, obj?: Decimal): Decimal;
/**
* @param flatbuffers.ByteBuffer bb
* @param Decimal= obj
* @returns Decimal
*/
static getSizePrefixedRootAsDecimal(bb: flatbuffers.ByteBuffer, obj?: Decimal): Decimal;
/**
* Total number of decimal digits
*
* @returns number
*/
precision(): number;
/**
* Number of digits after the decimal point "."
*
* @returns number
*/
scale(): number;
/**
* Number of bits per value. The only accepted widths are 128 and 256.
* We use bitWidth for consistency with Int::bitWidth.
*
* @returns number
*/
bitWidth(): number;
/**
* @param flatbuffers.Builder builder
*/
static startDecimal(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param number precision
*/
static addPrecision(builder: flatbuffers.Builder, precision: number): void;
/**
* @param flatbuffers.Builder builder
* @param number scale
*/
static addScale(builder: flatbuffers.Builder, scale: number): void;
/**
* @param flatbuffers.Builder builder
* @param number bitWidth
*/
static addBitWidth(builder: flatbuffers.Builder, bitWidth: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDecimal(builder: flatbuffers.Builder): flatbuffers.Offset;
static createDecimal(builder: flatbuffers.Builder, precision: number, scale: number, bitWidth: number): flatbuffers.Offset;
}

@@ -816,38 +943,42 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Date {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Date
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Date;
/**
* @param flatbuffers.ByteBuffer bb
* @param Date= obj
* @returns Date
*/
static getRootAsDate(bb: flatbuffers.ByteBuffer, obj?: Date): Date;
/**
* @returns org.apache.arrow.flatbuf.DateUnit
*/
unit(): org.apache.arrow.flatbuf.DateUnit;
/**
* @param flatbuffers.Builder builder
*/
static startDate(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.DateUnit unit
*/
static addUnit(builder: flatbuffers.Builder, unit: org.apache.arrow.flatbuf.DateUnit): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDate(builder: flatbuffers.Builder): flatbuffers.Offset;
static createDate(builder: flatbuffers.Builder, unit: org.apache.arrow.flatbuf.DateUnit): flatbuffers.Offset;
}
export declare class Date {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Date
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Date;
/**
* @param flatbuffers.ByteBuffer bb
* @param Date= obj
* @returns Date
*/
static getRootAsDate(bb: flatbuffers.ByteBuffer, obj?: Date): Date;
/**
* @param flatbuffers.ByteBuffer bb
* @param Date= obj
* @returns Date
*/
static getSizePrefixedRootAsDate(bb: flatbuffers.ByteBuffer, obj?: Date): Date;
/**
* @returns DateUnit
*/
unit(): DateUnit;
/**
* @param flatbuffers.Builder builder
*/
static startDate(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param DateUnit unit
*/
static addUnit(builder: flatbuffers.Builder, unit: DateUnit): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDate(builder: flatbuffers.Builder): flatbuffers.Offset;
static createDate(builder: flatbuffers.Builder, unit: DateUnit): flatbuffers.Offset;
}

@@ -861,47 +992,51 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Time {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Time
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Time;
/**
* @param flatbuffers.ByteBuffer bb
* @param Time= obj
* @returns Time
*/
static getRootAsTime(bb: flatbuffers.ByteBuffer, obj?: Time): Time;
/**
* @returns org.apache.arrow.flatbuf.TimeUnit
*/
unit(): org.apache.arrow.flatbuf.TimeUnit;
/**
* @returns number
*/
bitWidth(): number;
/**
* @param flatbuffers.Builder builder
*/
static startTime(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.TimeUnit unit
*/
static addUnit(builder: flatbuffers.Builder, unit: org.apache.arrow.flatbuf.TimeUnit): void;
/**
* @param flatbuffers.Builder builder
* @param number bitWidth
*/
static addBitWidth(builder: flatbuffers.Builder, bitWidth: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endTime(builder: flatbuffers.Builder): flatbuffers.Offset;
static createTime(builder: flatbuffers.Builder, unit: org.apache.arrow.flatbuf.TimeUnit, bitWidth: number): flatbuffers.Offset;
}
export declare class Time {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Time
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Time;
/**
* @param flatbuffers.ByteBuffer bb
* @param Time= obj
* @returns Time
*/
static getRootAsTime(bb: flatbuffers.ByteBuffer, obj?: Time): Time;
/**
* @param flatbuffers.ByteBuffer bb
* @param Time= obj
* @returns Time
*/
static getSizePrefixedRootAsTime(bb: flatbuffers.ByteBuffer, obj?: Time): Time;
/**
* @returns TimeUnit
*/
unit(): TimeUnit;
/**
* @returns number
*/
bitWidth(): number;
/**
* @param flatbuffers.Builder builder
*/
static startTime(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param TimeUnit unit
*/
static addUnit(builder: flatbuffers.Builder, unit: TimeUnit): void;
/**
* @param flatbuffers.Builder builder
* @param number bitWidth
*/
static addBitWidth(builder: flatbuffers.Builder, bitWidth: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endTime(builder: flatbuffers.Builder): flatbuffers.Offset;
static createTime(builder: flatbuffers.Builder, unit: TimeUnit, bitWidth: number): flatbuffers.Offset;
}

@@ -918,70 +1053,74 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Timestamp {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Timestamp
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Timestamp;
/**
* @param flatbuffers.ByteBuffer bb
* @param Timestamp= obj
* @returns Timestamp
*/
static getRootAsTimestamp(bb: flatbuffers.ByteBuffer, obj?: Timestamp): Timestamp;
/**
* @returns org.apache.arrow.flatbuf.TimeUnit
*/
unit(): org.apache.arrow.flatbuf.TimeUnit;
/**
* The time zone is a string indicating the name of a time zone, one of:
*
* * As used in the Olson time zone database (the "tz database" or
* "tzdata"), such as "America/New_York"
* * An absolute time zone offset of the form +XX:XX or -XX:XX, such as +07:30
*
* Whether a timezone string is present indicates different semantics about
* the data:
*
* * If the time zone is null or equal to an empty string, the data is "time
* zone naive" and shall be displayed *as is* to the user, not localized
* to the locale of the user. This data can be though of as UTC but
* without having "UTC" as the time zone, it is not considered to be
* localized to any time zone
*
* * If the time zone is set to a valid value, values can be displayed as
* "localized" to that time zone, even though the underlying 64-bit
* integers are identical to the same data stored in UTC. Converting
* between time zones is a metadata-only operation and does not change the
* underlying values
*
* @param flatbuffers.Encoding= optionalEncoding
* @returns string|Uint8Array|null
*/
timezone(): string | null;
timezone(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
/**
* @param flatbuffers.Builder builder
*/
static startTimestamp(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.TimeUnit unit
*/
static addUnit(builder: flatbuffers.Builder, unit: org.apache.arrow.flatbuf.TimeUnit): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset timezoneOffset
*/
static addTimezone(builder: flatbuffers.Builder, timezoneOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endTimestamp(builder: flatbuffers.Builder): flatbuffers.Offset;
static createTimestamp(builder: flatbuffers.Builder, unit: org.apache.arrow.flatbuf.TimeUnit, timezoneOffset: flatbuffers.Offset): flatbuffers.Offset;
}
export declare class Timestamp {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Timestamp
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Timestamp;
/**
* @param flatbuffers.ByteBuffer bb
* @param Timestamp= obj
* @returns Timestamp
*/
static getRootAsTimestamp(bb: flatbuffers.ByteBuffer, obj?: Timestamp): Timestamp;
/**
* @param flatbuffers.ByteBuffer bb
* @param Timestamp= obj
* @returns Timestamp
*/
static getSizePrefixedRootAsTimestamp(bb: flatbuffers.ByteBuffer, obj?: Timestamp): Timestamp;
/**
* @returns TimeUnit
*/
unit(): TimeUnit;
/**
* The time zone is a string indicating the name of a time zone, one of:
*
* * As used in the Olson time zone database (the "tz database" or
* "tzdata"), such as "America/New_York"
* * An absolute time zone offset of the form +XX:XX or -XX:XX, such as +07:30
*
* Whether a timezone string is present indicates different semantics about
* the data:
*
* * If the time zone is null or equal to an empty string, the data is "time
* zone naive" and shall be displayed *as is* to the user, not localized
* to the locale of the user. This data can be though of as UTC but
* without having "UTC" as the time zone, it is not considered to be
* localized to any time zone
*
* * If the time zone is set to a valid value, values can be displayed as
* "localized" to that time zone, even though the underlying 64-bit
* integers are identical to the same data stored in UTC. Converting
* between time zones is a metadata-only operation and does not change the
* underlying values
*
* @param flatbuffers.Encoding= optionalEncoding
* @returns string|Uint8Array|null
*/
timezone(): string | null;
timezone(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
/**
* @param flatbuffers.Builder builder
*/
static startTimestamp(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param TimeUnit unit
*/
static addUnit(builder: flatbuffers.Builder, unit: TimeUnit): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset timezoneOffset
*/
static addTimezone(builder: flatbuffers.Builder, timezoneOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endTimestamp(builder: flatbuffers.Builder): flatbuffers.Offset;
static createTimestamp(builder: flatbuffers.Builder, unit: TimeUnit, timezoneOffset: flatbuffers.Offset): flatbuffers.Offset;
}

@@ -991,38 +1130,42 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Interval {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Interval
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Interval;
/**
* @param flatbuffers.ByteBuffer bb
* @param Interval= obj
* @returns Interval
*/
static getRootAsInterval(bb: flatbuffers.ByteBuffer, obj?: Interval): Interval;
/**
* @returns org.apache.arrow.flatbuf.IntervalUnit
*/
unit(): org.apache.arrow.flatbuf.IntervalUnit;
/**
* @param flatbuffers.Builder builder
*/
static startInterval(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.IntervalUnit unit
*/
static addUnit(builder: flatbuffers.Builder, unit: org.apache.arrow.flatbuf.IntervalUnit): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endInterval(builder: flatbuffers.Builder): flatbuffers.Offset;
static createInterval(builder: flatbuffers.Builder, unit: org.apache.arrow.flatbuf.IntervalUnit): flatbuffers.Offset;
}
export declare class Interval {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Interval
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Interval;
/**
* @param flatbuffers.ByteBuffer bb
* @param Interval= obj
* @returns Interval
*/
static getRootAsInterval(bb: flatbuffers.ByteBuffer, obj?: Interval): Interval;
/**
* @param flatbuffers.ByteBuffer bb
* @param Interval= obj
* @returns Interval
*/
static getSizePrefixedRootAsInterval(bb: flatbuffers.ByteBuffer, obj?: Interval): Interval;
/**
* @returns IntervalUnit
*/
unit(): IntervalUnit;
/**
* @param flatbuffers.Builder builder
*/
static startInterval(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param IntervalUnit unit
*/
static addUnit(builder: flatbuffers.Builder, unit: IntervalUnit): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endInterval(builder: flatbuffers.Builder): flatbuffers.Offset;
static createInterval(builder: flatbuffers.Builder, unit: IntervalUnit): flatbuffers.Offset;
}

@@ -1032,38 +1175,42 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Duration {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Duration
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Duration;
/**
* @param flatbuffers.ByteBuffer bb
* @param Duration= obj
* @returns Duration
*/
static getRootAsDuration(bb: flatbuffers.ByteBuffer, obj?: Duration): Duration;
/**
* @returns org.apache.arrow.flatbuf.TimeUnit
*/
unit(): org.apache.arrow.flatbuf.TimeUnit;
/**
* @param flatbuffers.Builder builder
*/
static startDuration(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.TimeUnit unit
*/
static addUnit(builder: flatbuffers.Builder, unit: org.apache.arrow.flatbuf.TimeUnit): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDuration(builder: flatbuffers.Builder): flatbuffers.Offset;
static createDuration(builder: flatbuffers.Builder, unit: org.apache.arrow.flatbuf.TimeUnit): flatbuffers.Offset;
}
export declare class Duration {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Duration
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Duration;
/**
* @param flatbuffers.ByteBuffer bb
* @param Duration= obj
* @returns Duration
*/
static getRootAsDuration(bb: flatbuffers.ByteBuffer, obj?: Duration): Duration;
/**
* @param flatbuffers.ByteBuffer bb
* @param Duration= obj
* @returns Duration
*/
static getSizePrefixedRootAsDuration(bb: flatbuffers.ByteBuffer, obj?: Duration): Duration;
/**
* @returns TimeUnit
*/
unit(): TimeUnit;
/**
* @param flatbuffers.Builder builder
*/
static startDuration(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param TimeUnit unit
*/
static addUnit(builder: flatbuffers.Builder, unit: TimeUnit): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDuration(builder: flatbuffers.Builder): flatbuffers.Offset;
static createDuration(builder: flatbuffers.Builder, unit: TimeUnit): flatbuffers.Offset;
}

@@ -1077,125 +1224,142 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class KeyValue {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns KeyValue
*/
__init(i: number, bb: flatbuffers.ByteBuffer): KeyValue;
/**
* @param flatbuffers.ByteBuffer bb
* @param KeyValue= obj
* @returns KeyValue
*/
static getRootAsKeyValue(bb: flatbuffers.ByteBuffer, obj?: KeyValue): KeyValue;
/**
* @param flatbuffers.Encoding= optionalEncoding
* @returns string|Uint8Array|null
*/
key(): string | null;
key(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
/**
* @param flatbuffers.Encoding= optionalEncoding
* @returns string|Uint8Array|null
*/
value(): string | null;
value(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
/**
* @param flatbuffers.Builder builder
*/
static startKeyValue(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset keyOffset
*/
static addKey(builder: flatbuffers.Builder, keyOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset valueOffset
*/
static addValue(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endKeyValue(builder: flatbuffers.Builder): flatbuffers.Offset;
static createKeyValue(builder: flatbuffers.Builder, keyOffset: flatbuffers.Offset, valueOffset: flatbuffers.Offset): flatbuffers.Offset;
}
export declare class KeyValue {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns KeyValue
*/
__init(i: number, bb: flatbuffers.ByteBuffer): KeyValue;
/**
* @param flatbuffers.ByteBuffer bb
* @param KeyValue= obj
* @returns KeyValue
*/
static getRootAsKeyValue(bb: flatbuffers.ByteBuffer, obj?: KeyValue): KeyValue;
/**
* @param flatbuffers.ByteBuffer bb
* @param KeyValue= obj
* @returns KeyValue
*/
static getSizePrefixedRootAsKeyValue(bb: flatbuffers.ByteBuffer, obj?: KeyValue): KeyValue;
/**
* @param flatbuffers.Encoding= optionalEncoding
* @returns string|Uint8Array|null
*/
key(): string | null;
key(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
/**
* @param flatbuffers.Encoding= optionalEncoding
* @returns string|Uint8Array|null
*/
value(): string | null;
value(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
/**
* @param flatbuffers.Builder builder
*/
static startKeyValue(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset keyOffset
*/
static addKey(builder: flatbuffers.Builder, keyOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset valueOffset
*/
static addValue(builder: flatbuffers.Builder, valueOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endKeyValue(builder: flatbuffers.Builder): flatbuffers.Offset;
static createKeyValue(builder: flatbuffers.Builder, keyOffset: flatbuffers.Offset, valueOffset: flatbuffers.Offset): flatbuffers.Offset;
}
/**
* ----------------------------------------------------------------------
* Dictionary encoding metadata
*
* @constructor
*/
export declare namespace org.apache.arrow.flatbuf {
class DictionaryEncoding {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns DictionaryEncoding
*/
__init(i: number, bb: flatbuffers.ByteBuffer): DictionaryEncoding;
/**
* @param flatbuffers.ByteBuffer bb
* @param DictionaryEncoding= obj
* @returns DictionaryEncoding
*/
static getRootAsDictionaryEncoding(bb: flatbuffers.ByteBuffer, obj?: DictionaryEncoding): DictionaryEncoding;
/**
* The known dictionary id in the application where this data is used. In
* the file or streaming formats, the dictionary ids are found in the
* DictionaryBatch messages
*
* @returns flatbuffers.Long
*/
id(): flatbuffers.Long;
/**
* The dictionary indices are constrained to be positive integers. If this
* field is null, the indices must be signed int32
*
* @param org.apache.arrow.flatbuf.Int= obj
* @returns org.apache.arrow.flatbuf.Int|null
*/
indexType(obj?: org.apache.arrow.flatbuf.Int): org.apache.arrow.flatbuf.Int | null;
/**
* By default, dictionaries are not ordered, or the order does not have
* semantic meaning. In some statistical, applications, dictionary-encoding
* is used to represent ordered categorical data, and we provide a way to
* preserve that metadata here
*
* @returns boolean
*/
isOrdered(): boolean;
/**
* @param flatbuffers.Builder builder
*/
static startDictionaryEncoding(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long id
*/
static addId(builder: flatbuffers.Builder, id: flatbuffers.Long): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset indexTypeOffset
*/
static addIndexType(builder: flatbuffers.Builder, indexTypeOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param boolean isOrdered
*/
static addIsOrdered(builder: flatbuffers.Builder, isOrdered: boolean): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDictionaryEncoding(builder: flatbuffers.Builder): flatbuffers.Offset;
static createDictionaryEncoding(builder: flatbuffers.Builder, id: flatbuffers.Long, indexTypeOffset: flatbuffers.Offset, isOrdered: boolean): flatbuffers.Offset;
}
export declare class DictionaryEncoding {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns DictionaryEncoding
*/
__init(i: number, bb: flatbuffers.ByteBuffer): DictionaryEncoding;
/**
* @param flatbuffers.ByteBuffer bb
* @param DictionaryEncoding= obj
* @returns DictionaryEncoding
*/
static getRootAsDictionaryEncoding(bb: flatbuffers.ByteBuffer, obj?: DictionaryEncoding): DictionaryEncoding;
/**
* @param flatbuffers.ByteBuffer bb
* @param DictionaryEncoding= obj
* @returns DictionaryEncoding
*/
static getSizePrefixedRootAsDictionaryEncoding(bb: flatbuffers.ByteBuffer, obj?: DictionaryEncoding): DictionaryEncoding;
/**
* The known dictionary id in the application where this data is used. In
* the file or streaming formats, the dictionary ids are found in the
* DictionaryBatch messages
*
* @returns flatbuffers.Long
*/
id(): flatbuffers.Long;
/**
* The dictionary indices are constrained to be non-negative integers. If
* this field is null, the indices must be signed int32. To maximize
* cross-language compatibility and performance, implementations are
* recommended to prefer signed integer types over unsigned integer types
* and to avoid uint64 indices unless they are required by an application.
*
* @param Int= obj
* @returns Int|null
*/
indexType(obj?: Int): Int | null;
/**
* By default, dictionaries are not ordered, or the order does not have
* semantic meaning. In some statistical, applications, dictionary-encoding
* is used to represent ordered categorical data, and we provide a way to
* preserve that metadata here
*
* @returns boolean
*/
isOrdered(): boolean;
/**
* @returns DictionaryKind
*/
dictionaryKind(): DictionaryKind;
/**
* @param flatbuffers.Builder builder
*/
static startDictionaryEncoding(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long id
*/
static addId(builder: flatbuffers.Builder, id: flatbuffers.Long): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset indexTypeOffset
*/
static addIndexType(builder: flatbuffers.Builder, indexTypeOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param boolean isOrdered
*/
static addIsOrdered(builder: flatbuffers.Builder, isOrdered: boolean): void;
/**
* @param flatbuffers.Builder builder
* @param DictionaryKind dictionaryKind
*/
static addDictionaryKind(builder: flatbuffers.Builder, dictionaryKind: DictionaryKind): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endDictionaryEncoding(builder: flatbuffers.Builder): flatbuffers.Offset;
static createDictionaryEncoding(builder: flatbuffers.Builder, id: flatbuffers.Long, indexTypeOffset: flatbuffers.Offset, isOrdered: boolean, dictionaryKind: DictionaryKind): flatbuffers.Offset;
}

@@ -1209,143 +1373,147 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Field {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Field
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Field;
/**
* @param flatbuffers.ByteBuffer bb
* @param Field= obj
* @returns Field
*/
static getRootAsField(bb: flatbuffers.ByteBuffer, obj?: Field): Field;
/**
* Name is not required, in i.e. a List
*
* @param flatbuffers.Encoding= optionalEncoding
* @returns string|Uint8Array|null
*/
name(): string | null;
name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
/**
* Whether or not this field can contain nulls. Should be true in general.
*
* @returns boolean
*/
nullable(): boolean;
/**
* @returns org.apache.arrow.flatbuf.Type
*/
typeType(): org.apache.arrow.flatbuf.Type;
/**
* This is the type of the decoded value if the field is dictionary encoded.
*
* @param flatbuffers.Table obj
* @returns ?flatbuffers.Table
*/
type<T extends flatbuffers.Table>(obj: T): T | null;
/**
* Present only if the field is dictionary encoded.
*
* @param org.apache.arrow.flatbuf.DictionaryEncoding= obj
* @returns org.apache.arrow.flatbuf.DictionaryEncoding|null
*/
dictionary(obj?: org.apache.arrow.flatbuf.DictionaryEncoding): org.apache.arrow.flatbuf.DictionaryEncoding | null;
/**
* children apply only to nested data types like Struct, List and Union. For
* primitive types children will have length 0.
*
* @param number index
* @param org.apache.arrow.flatbuf.Field= obj
* @returns org.apache.arrow.flatbuf.Field
*/
children(index: number, obj?: org.apache.arrow.flatbuf.Field): org.apache.arrow.flatbuf.Field | null;
/**
* @returns number
*/
childrenLength(): number;
/**
* User-defined metadata
*
* @param number index
* @param org.apache.arrow.flatbuf.KeyValue= obj
* @returns org.apache.arrow.flatbuf.KeyValue
*/
customMetadata(index: number, obj?: org.apache.arrow.flatbuf.KeyValue): org.apache.arrow.flatbuf.KeyValue | null;
/**
* @returns number
*/
customMetadataLength(): number;
/**
* @param flatbuffers.Builder builder
*/
static startField(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset nameOffset
*/
static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param boolean nullable
*/
static addNullable(builder: flatbuffers.Builder, nullable: boolean): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.Type typeType
*/
static addTypeType(builder: flatbuffers.Builder, typeType: org.apache.arrow.flatbuf.Type): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset typeOffset
*/
static addType(builder: flatbuffers.Builder, typeOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset dictionaryOffset
*/
static addDictionary(builder: flatbuffers.Builder, dictionaryOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset childrenOffset
*/
static addChildren(builder: flatbuffers.Builder, childrenOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createChildrenVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startChildrenVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset customMetadataOffset
*/
static addCustomMetadata(builder: flatbuffers.Builder, customMetadataOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createCustomMetadataVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startCustomMetadataVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endField(builder: flatbuffers.Builder): flatbuffers.Offset;
static createField(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset, nullable: boolean, typeType: org.apache.arrow.flatbuf.Type, typeOffset: flatbuffers.Offset, dictionaryOffset: flatbuffers.Offset, childrenOffset: flatbuffers.Offset, customMetadataOffset: flatbuffers.Offset): flatbuffers.Offset;
}
export declare class Field {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Field
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Field;
/**
* @param flatbuffers.ByteBuffer bb
* @param Field= obj
* @returns Field
*/
static getRootAsField(bb: flatbuffers.ByteBuffer, obj?: Field): Field;
/**
* @param flatbuffers.ByteBuffer bb
* @param Field= obj
* @returns Field
*/
static getSizePrefixedRootAsField(bb: flatbuffers.ByteBuffer, obj?: Field): Field;
/**
* Name is not required, in i.e. a List
*
* @param flatbuffers.Encoding= optionalEncoding
* @returns string|Uint8Array|null
*/
name(): string | null;
name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
/**
* Whether or not this field can contain nulls. Should be true in general.
*
* @returns boolean
*/
nullable(): boolean;
/**
* @returns Type
*/
typeType(): Type;
/**
* This is the type of the decoded value if the field is dictionary encoded.
*
* @param flatbuffers.Table obj
* @returns ?flatbuffers.Table
*/
type<T extends flatbuffers.Table>(obj: T): T | null;
/**
* Present only if the field is dictionary encoded.
*
* @param DictionaryEncoding= obj
* @returns DictionaryEncoding|null
*/
dictionary(obj?: DictionaryEncoding): DictionaryEncoding | null;
/**
* children apply only to nested data types like Struct, List and Union. For
* primitive types children will have length 0.
*
* @param number index
* @param Field= obj
* @returns Field
*/
children(index: number, obj?: Field): Field | null;
/**
* @returns number
*/
childrenLength(): number;
/**
* User-defined metadata
*
* @param number index
* @param KeyValue= obj
* @returns KeyValue
*/
customMetadata(index: number, obj?: KeyValue): KeyValue | null;
/**
* @returns number
*/
customMetadataLength(): number;
/**
* @param flatbuffers.Builder builder
*/
static startField(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset nameOffset
*/
static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param boolean nullable
*/
static addNullable(builder: flatbuffers.Builder, nullable: boolean): void;
/**
* @param flatbuffers.Builder builder
* @param Type typeType
*/
static addTypeType(builder: flatbuffers.Builder, typeType: Type): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset typeOffset
*/
static addType(builder: flatbuffers.Builder, typeOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset dictionaryOffset
*/
static addDictionary(builder: flatbuffers.Builder, dictionaryOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset childrenOffset
*/
static addChildren(builder: flatbuffers.Builder, childrenOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createChildrenVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startChildrenVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset customMetadataOffset
*/
static addCustomMetadata(builder: flatbuffers.Builder, customMetadataOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createCustomMetadataVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startCustomMetadataVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endField(builder: flatbuffers.Builder): flatbuffers.Offset;
static createField(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset, nullable: boolean, typeType: Type, typeOffset: flatbuffers.Offset, dictionaryOffset: flatbuffers.Offset, childrenOffset: flatbuffers.Offset, customMetadataOffset: flatbuffers.Offset): flatbuffers.Offset;
}

@@ -1358,34 +1526,35 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Buffer {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Buffer
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Buffer;
/**
* The relative offset into the shared memory page where the bytes for this
* buffer starts
*
* @returns flatbuffers.Long
*/
offset(): flatbuffers.Long;
/**
* The absolute length (in bytes) of the memory buffer. The memory is found
* from offset (inclusive) to offset + length (non-inclusive).
*
* @returns flatbuffers.Long
*/
length(): flatbuffers.Long;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long offset
* @param flatbuffers.Long length
* @returns flatbuffers.Offset
*/
static createBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Long, length: flatbuffers.Long): flatbuffers.Offset;
}
export declare class Buffer {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Buffer
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Buffer;
/**
* The relative offset into the shared memory page where the bytes for this
* buffer starts
*
* @returns flatbuffers.Long
*/
offset(): flatbuffers.Long;
/**
* The absolute length (in bytes) of the memory buffer. The memory is found
* from offset (inclusive) to offset + length (non-inclusive). When building
* messages using the encapsulated IPC message, padding bytes may be written
* after a buffer, but such padding bytes do not need to be accounted for in
* the size here.
*
* @returns flatbuffers.Long
*/
length(): flatbuffers.Long;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Long offset
* @param flatbuffers.Long length
* @returns flatbuffers.Offset
*/
static createBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Long, length: flatbuffers.Long): flatbuffers.Offset;
}

@@ -1398,99 +1567,135 @@ /**

*/
export declare namespace org.apache.arrow.flatbuf {
class Schema {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Schema
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Schema;
/**
* @param flatbuffers.ByteBuffer bb
* @param Schema= obj
* @returns Schema
*/
static getRootAsSchema(bb: flatbuffers.ByteBuffer, obj?: Schema): Schema;
/**
* endianness of the buffer
* it is Little Endian by default
* if endianness doesn't match the underlying system then the vectors need to be converted
*
* @returns org.apache.arrow.flatbuf.Endianness
*/
endianness(): org.apache.arrow.flatbuf.Endianness;
/**
* @param number index
* @param org.apache.arrow.flatbuf.Field= obj
* @returns org.apache.arrow.flatbuf.Field
*/
fields(index: number, obj?: org.apache.arrow.flatbuf.Field): org.apache.arrow.flatbuf.Field | null;
/**
* @returns number
*/
fieldsLength(): number;
/**
* @param number index
* @param org.apache.arrow.flatbuf.KeyValue= obj
* @returns org.apache.arrow.flatbuf.KeyValue
*/
customMetadata(index: number, obj?: org.apache.arrow.flatbuf.KeyValue): org.apache.arrow.flatbuf.KeyValue | null;
/**
* @returns number
*/
customMetadataLength(): number;
/**
* @param flatbuffers.Builder builder
*/
static startSchema(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param org.apache.arrow.flatbuf.Endianness endianness
*/
static addEndianness(builder: flatbuffers.Builder, endianness: org.apache.arrow.flatbuf.Endianness): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset fieldsOffset
*/
static addFields(builder: flatbuffers.Builder, fieldsOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createFieldsVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startFieldsVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset customMetadataOffset
*/
static addCustomMetadata(builder: flatbuffers.Builder, customMetadataOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createCustomMetadataVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startCustomMetadataVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endSchema(builder: flatbuffers.Builder): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishSchemaBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
static createSchema(builder: flatbuffers.Builder, endianness: org.apache.arrow.flatbuf.Endianness, fieldsOffset: flatbuffers.Offset, customMetadataOffset: flatbuffers.Offset): flatbuffers.Offset;
}
export declare class Schema {
bb: flatbuffers.ByteBuffer | null;
bb_pos: number;
/**
* @param number i
* @param flatbuffers.ByteBuffer bb
* @returns Schema
*/
__init(i: number, bb: flatbuffers.ByteBuffer): Schema;
/**
* @param flatbuffers.ByteBuffer bb
* @param Schema= obj
* @returns Schema
*/
static getRootAsSchema(bb: flatbuffers.ByteBuffer, obj?: Schema): Schema;
/**
* @param flatbuffers.ByteBuffer bb
* @param Schema= obj
* @returns Schema
*/
static getSizePrefixedRootAsSchema(bb: flatbuffers.ByteBuffer, obj?: Schema): Schema;
/**
* endianness of the buffer
* it is Little Endian by default
* if endianness doesn't match the underlying system then the vectors need to be converted
*
* @returns Endianness
*/
endianness(): Endianness;
/**
* @param number index
* @param Field= obj
* @returns Field
*/
fields(index: number, obj?: Field): Field | null;
/**
* @returns number
*/
fieldsLength(): number;
/**
* @param number index
* @param KeyValue= obj
* @returns KeyValue
*/
customMetadata(index: number, obj?: KeyValue): KeyValue | null;
/**
* @returns number
*/
customMetadataLength(): number;
/**
* Features used in the stream/file.
*
* @param number index
* @returns flatbuffers.Long
*/
features(index: number): flatbuffers.Long | null;
/**
* @returns number
*/
featuresLength(): number;
/**
* @param flatbuffers.Builder builder
*/
static startSchema(builder: flatbuffers.Builder): void;
/**
* @param flatbuffers.Builder builder
* @param Endianness endianness
*/
static addEndianness(builder: flatbuffers.Builder, endianness: Endianness): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset fieldsOffset
*/
static addFields(builder: flatbuffers.Builder, fieldsOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createFieldsVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startFieldsVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset customMetadataOffset
*/
static addCustomMetadata(builder: flatbuffers.Builder, customMetadataOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Offset> data
* @returns flatbuffers.Offset
*/
static createCustomMetadataVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startCustomMetadataVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset featuresOffset
*/
static addFeatures(builder: flatbuffers.Builder, featuresOffset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param Array.<flatbuffers.Long> data
* @returns flatbuffers.Offset
*/
static createFeaturesVector(builder: flatbuffers.Builder, data: flatbuffers.Long[]): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param number numElems
*/
static startFeaturesVector(builder: flatbuffers.Builder, numElems: number): void;
/**
* @param flatbuffers.Builder builder
* @returns flatbuffers.Offset
*/
static endSchema(builder: flatbuffers.Builder): flatbuffers.Offset;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishSchemaBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
/**
* @param flatbuffers.Builder builder
* @param flatbuffers.Offset offset
*/
static finishSizePrefixedSchemaBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
static createSchema(builder: flatbuffers.Builder, endianness: Endianness, fieldsOffset: flatbuffers.Offset, customMetadataOffset: flatbuffers.Offset, featuresOffset: flatbuffers.Offset): flatbuffers.Offset;
}

@@ -58,3 +58,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

// initialize the iterator
let it = toUint8ArrayIterator(source)[Symbol.iterator]();
const it = toUint8ArrayIterator(source)[Symbol.iterator]();
try {

@@ -101,3 +101,3 @@ do {

// initialize the iterator
let it = toUint8ArrayAsyncIterator(source)[Symbol.asyncIterator]();
const it = toUint8ArrayAsyncIterator(source)[Symbol.asyncIterator]();
try {

@@ -148,3 +148,3 @@ do {

// initialize the reader and lock the stream
let it = new AdaptiveByteReader(source);
const it = new AdaptiveByteReader(source);
try {

@@ -188,3 +188,3 @@ do {

catch (e) {
this.supportsBYOB = !!!(this.reader = this.getDefaultReader());
this.supportsBYOB = !(this.reader = this.getDefaultReader());
}

@@ -265,3 +265,3 @@ }

const onEvent = (stream, event) => {
let handler = (_) => resolve([event, _]);
const handler = (_) => resolve([event, _]);
let resolve;

@@ -272,3 +272,3 @@ return [event, handler, new Promise((r) => (resolve = r) && stream['once'](event, handler))];

async function* fromNodeStream(stream) {
let events = [];
const events = [];
let event = 'error';

@@ -340,3 +340,3 @@ let done = false, err = null;

buffer = buffers = null;
return new Promise(async (resolve, reject) => {
return new Promise((resolve, reject) => {
for (const [evt, fn] of events) {

@@ -343,0 +343,0 @@ stream['off'](evt, fn);

@@ -88,4 +88,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

let pos = position, offset = 0, bytesRead = 0;
let end = Math.min(size, pos + Math.min(size - pos, nBytes));
let buffer = new Uint8Array(Math.max(0, (this.position = end) - pos));
const end = Math.min(size, pos + Math.min(size - pos, nBytes));
const buffer = new Uint8Array(Math.max(0, (this.position = end) - pos));
while ((pos += bytesRead) < end && (offset += bytesRead) < buffer.byteLength) {

@@ -92,0 +92,0 @@ ({ bytesRead } = await file.read(buffer, offset, buffer.byteLength - offset, pos));

@@ -22,3 +22,2 @@ // Licensed to the Apache Software Foundation (ASF) under one

export class ArrowJSON {
// @ts-ignore
constructor(_json) {

@@ -25,0 +24,0 @@ this._json = _json;

@@ -45,3 +45,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

_destroy(e, cb) {
let it = this._iterator, fn;
const it = this._iterator;
let fn;
it && (fn = e != null && it.throw || it.return);

@@ -83,3 +84,4 @@ fn && fn.call(it, e);

_destroy(e, cb) {
let it = this._iterator, fn;
const it = this._iterator;
let fn;
it && (fn = e != null && it.throw || it.return);

@@ -86,0 +88,0 @@ fn && fn.call(it, e).then(() => cb && cb(null)) || (cb && cb(null));

@@ -36,3 +36,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

return sync ? joinUint8Arrays(this._values)[0] : (async () => {
let buffers = [], byteLength = 0;
const buffers = [];
let byteLength = 0;
for await (const chunk of this) {

@@ -39,0 +40,0 @@ buffers.push(chunk);

@@ -1,6 +0,5 @@

import * as File_ from '../../fb/File';
import { Block as _Block } from '../../fb/File';
import { flatbuffers } from 'flatbuffers';
import Long = flatbuffers.Long;
import Builder = flatbuffers.Builder;
import _Block = File_.org.apache.arrow.flatbuf.Block;
import { Schema } from '../../schema';

@@ -7,0 +6,0 @@ import { MetadataVersion } from '../../enum';

@@ -17,4 +17,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

// under the License.
/* tslint:disable:class-name */
import * as File_ from '../../fb/File';
/* eslint-disable @typescript-eslint/naming-convention */
import { Block as _Block, Footer as _Footer } from '../../fb/File';
import { flatbuffers } from 'flatbuffers';

@@ -24,4 +24,2 @@ var Long = flatbuffers.Long;

var ByteBuffer = flatbuffers.ByteBuffer;
var _Block = File_.org.apache.arrow.flatbuf.Block;
var _Footer = File_.org.apache.arrow.flatbuf.Footer;
import { Schema } from '../../schema';

@@ -28,0 +26,0 @@ import { MetadataVersion } from '../../enum';

@@ -17,2 +17,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

// under the License.
/* eslint-disable brace-style */
import { Schema, Field } from '../../schema';

@@ -79,3 +80,2 @@ import { Dictionary, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Union, Bool, Null, Int, Float, Date_, Time, Interval, Timestamp, Int32, } from '../../type';

}
// tslint:disable
// If dictionary encoded and the first time we've seen this dictionary id, decode

@@ -82,0 +82,0 @@ // the data type and child fields, then wrap in a Dictionary type and insert the

import { flatbuffers } from 'flatbuffers';
import * as Schema_ from '../../fb/Schema';
import * as Message_ from '../../fb/Message';
import { Field as _Field, Schema as _Schema, Buffer as _Buffer } from '../../fb/Schema';
import { FieldNode as _FieldNode, RecordBatch as _RecordBatch, DictionaryBatch as _DictionaryBatch } from '../../fb/Message';
import { Schema, Field } from '../../schema';

@@ -10,8 +10,2 @@ import { ArrayBufferViewInput } from '../../util/buffer';

import Builder = flatbuffers.Builder;
import _Field = Schema_.org.apache.arrow.flatbuf.Field;
import _Schema = Schema_.org.apache.arrow.flatbuf.Schema;
import _Buffer = Schema_.org.apache.arrow.flatbuf.Buffer;
import _FieldNode = Message_.org.apache.arrow.flatbuf.FieldNode;
import _RecordBatch = Message_.org.apache.arrow.flatbuf.RecordBatch;
import _DictionaryBatch = Message_.org.apache.arrow.flatbuf.DictionaryBatch;
import { DataType } from '../../type';

@@ -18,0 +12,0 @@ /**

@@ -17,5 +17,6 @@ // Licensed to the Apache Software Foundation (ASF) under one

// under the License.
/* eslint-disable brace-style */
import { flatbuffers } from 'flatbuffers';
import * as Schema_ from '../../fb/Schema';
import * as Message_ from '../../fb/Message';
import { Type, Int as _Int, Field as _Field, Schema as _Schema, Buffer as _Buffer, KeyValue as _KeyValue, Endianness as _Endianness, FloatingPoint as _FloatingPoint, Decimal as _Decimal, Date as _Date, Time as _Time, Timestamp as _Timestamp, Interval as _Interval, Union as _Union, FixedSizeBinary as _FixedSizeBinary, FixedSizeList as _FixedSizeList, Map as _Map, } from '../../fb/Schema';
import { Message as _Message, FieldNode as _FieldNode, RecordBatch as _RecordBatch, DictionaryBatch as _DictionaryBatch, } from '../../fb/Message';
import { Schema, Field } from '../../schema';

@@ -29,12 +30,2 @@ import { toUint8Array } from '../../util/buffer';

var ByteBuffer = flatbuffers.ByteBuffer;
var Type = Schema_.org.apache.arrow.flatbuf.Type;
var _Field = Schema_.org.apache.arrow.flatbuf.Field;
var _Schema = Schema_.org.apache.arrow.flatbuf.Schema;
var _Buffer = Schema_.org.apache.arrow.flatbuf.Buffer;
var _Message = Message_.org.apache.arrow.flatbuf.Message;
var _KeyValue = Schema_.org.apache.arrow.flatbuf.KeyValue;
var _FieldNode = Message_.org.apache.arrow.flatbuf.FieldNode;
var _Endianness = Schema_.org.apache.arrow.flatbuf.Endianness;
var _RecordBatch = Message_.org.apache.arrow.flatbuf.RecordBatch;
var _DictionaryBatch = Message_.org.apache.arrow.flatbuf.DictionaryBatch;
import { DataType, Dictionary, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Union, Bool, Null, Int, Float, Date_, Time, Interval, Timestamp, Int32, } from '../../type';

@@ -72,3 +63,4 @@ /**

static encode(message) {
let b = new Builder(), headerOffset = -1;
const b = new Builder();
let headerOffset = -1;
if (message.isSchema()) {

@@ -282,3 +274,2 @@ headerOffset = Schema.encode(b, message.header());

}
// tslint:disable
// If dictionary encoded and the first time we've seen this dictionary id, decode

@@ -324,53 +315,53 @@ // the data type and child fields, then wrap in a Dictionary type and insert the

switch (typeId) {
case Type.NONE: return new Null();
case Type.Null: return new Null();
case Type.Binary: return new Binary();
case Type.Utf8: return new Utf8();
case Type.Bool: return new Bool();
case Type.List: return new List((children || [])[0]);
case Type.Struct_: return new Struct(children || []);
case Type['NONE']: return new Null();
case Type['Null']: return new Null();
case Type['Binary']: return new Binary();
case Type['Utf8']: return new Utf8();
case Type['Bool']: return new Bool();
case Type['List']: return new List((children || [])[0]);
case Type['Struct_']: return new Struct(children || []);
}
switch (typeId) {
case Type.Int: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.Int());
case Type['Int']: {
const t = f.type(new _Int());
return new Int(t.isSigned(), t.bitWidth());
}
case Type.FloatingPoint: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.FloatingPoint());
case Type['FloatingPoint']: {
const t = f.type(new _FloatingPoint());
return new Float(t.precision());
}
case Type.Decimal: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.Decimal());
case Type['Decimal']: {
const t = f.type(new _Decimal());
return new Decimal(t.scale(), t.precision());
}
case Type.Date: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.Date());
case Type['Date']: {
const t = f.type(new _Date());
return new Date_(t.unit());
}
case Type.Time: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.Time());
case Type['Time']: {
const t = f.type(new _Time());
return new Time(t.unit(), t.bitWidth());
}
case Type.Timestamp: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.Timestamp());
case Type['Timestamp']: {
const t = f.type(new _Timestamp());
return new Timestamp(t.unit(), t.timezone());
}
case Type.Interval: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.Interval());
case Type['Interval']: {
const t = f.type(new _Interval());
return new Interval(t.unit());
}
case Type.Union: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.Union());
case Type['Union']: {
const t = f.type(new _Union());
return new Union(t.mode(), t.typeIdsArray() || [], children || []);
}
case Type.FixedSizeBinary: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.FixedSizeBinary());
case Type['FixedSizeBinary']: {
const t = f.type(new _FixedSizeBinary());
return new FixedSizeBinary(t.byteWidth());
}
case Type.FixedSizeList: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.FixedSizeList());
case Type['FixedSizeList']: {
const t = f.type(new _FixedSizeList());
return new FixedSizeList(t.listSize(), (children || [])[0]);
}
case Type.Map: {
const t = f.type(new Schema_.org.apache.arrow.flatbuf.Map());
case Type['Map']: {
const t = f.type(new _Map());
return new Map_((children || [])[0], t.keysSorted());

@@ -408,3 +399,3 @@ }

let dictionaryOffset = -1;
let type = field.type;
const type = field.type;
let typeId = field.typeId;

@@ -411,0 +402,0 @@ if (!DataType.isDictionary(type)) {

@@ -236,3 +236,3 @@ /// <reference types="node" />

} = any> implements RecordBatchReaderImpl<T> {
schema: Schema;
schema: Schema<T>;
closed: boolean;

@@ -239,0 +239,0 @@ autoDestroy: boolean;

@@ -264,3 +264,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

}
let message, { _reader: reader } = this;
let message;
const { _reader: reader } = this;
while (message = this._readNextMessageAndValidate()) {

@@ -338,3 +339,4 @@ if (message.isSchema()) {

}
let message, { _reader: reader } = this;
let message;
const { _reader: reader } = this;
while (message = await this._readNextMessageAndValidate()) {

@@ -341,0 +343,0 @@ if (message.isSchema()) {

@@ -26,2 +26,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

import { MessageHeader, MetadataVersion } from '../enum';
import { compareSchemas } from '../visitor/typecomparator';
import { AsyncByteQueue } from '../io/stream';

@@ -112,3 +113,3 @@ import { VectorAssembler } from '../visitor/vectorassembler';

this._dictionaryDeltaOffsets = new Map();
if (!schema || !(schema.compareTo(this._schema))) {
if (!schema || !(compareSchemas(schema, this._schema))) {
if (schema === null) {

@@ -140,3 +141,3 @@ this._position = 0;

}
if (schema && !schema.compareTo(this._schema)) {
if (schema && !compareSchemas(schema, this._schema)) {
if (this._started && this._autoDestroy) {

@@ -143,0 +144,0 @@ return this.close();

{
"version": "3.0.0",
"version": "4.0.0",
"name": "@apache-arrow/esnext-esm",

@@ -7,2 +7,3 @@ "browser": "Arrow.dom.js",

"module": "Arrow.dom.js",
"sideEffects": false,
"esm": {

@@ -29,12 +30,12 @@ "mode": "auto",

"dependencies": {
"@types/flatbuffers": "^1.9.1",
"@types/node": "^12.0.4",
"@types/flatbuffers": "^1.10.0",
"@types/node": "^14.14.37",
"@types/text-encoding-utf-8": "^1.0.1",
"command-line-args": "5.0.2",
"command-line-usage": "5.0.5",
"flatbuffers": "1.11.0",
"command-line-args": "5.1.1",
"command-line-usage": "6.1.1",
"flatbuffers": "1.12.0",
"json-bignum": "^0.0.3",
"pad-left": "^2.1.0",
"text-encoding-utf-8": "^1.0.2",
"tslib": "^1.12.0"
"tslib": "^2.2.0"
},

@@ -41,0 +42,0 @@ "bin": {

@@ -23,4 +23,2 @@ <!---

[![npm version](https://img.shields.io/npm/v/apache-arrow.svg)](https://www.npmjs.com/package/apache-arrow)
[![Build Status](https://travis-ci.org/apache/arrow.svg?branch=master)](https://travis-ci.org/apache/arrow)
[![Coverage Status](https://coveralls.io/repos/github/apache/arrow/badge.svg)](https://coveralls.io/github/apache/arrow)

@@ -228,3 +226,3 @@ Arrow is a set of technologies that enable big data systems to process and transfer data quickly.

```sh
npm install apache-arrow # <-- combined es5/UMD, es2015/CommonJS/ESModules/UMD, and TypeScript package
npm install apache-arrow # <-- combined es2015/UMD + esnext/CommonJS/ESModules/UMD
npm install @apache-arrow/ts # standalone TypeScript package

@@ -231,0 +229,0 @@ npm install @apache-arrow/es5-cjs # standalone es5/CommonJS package

@@ -31,3 +31,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

let data;
let schema = args[0];
const schema = args[0];
let children;

@@ -88,3 +88,3 @@ if (args[1] instanceof Data) {

*/
/* tslint:disable:class-name */
/* eslint-disable @typescript-eslint/naming-convention */
export class _InternalEmptyPlaceholderRecordBatch extends RecordBatch {

@@ -91,0 +91,0 @@ constructor(schema) {

@@ -1,34 +0,5 @@

import { Data } from './data';
import { Vector } from './vector';
import { DataType } from './type';
declare type VectorMap = {
[key: string]: Vector;
};
declare type Fields<T extends {
[key: string]: DataType;
}> = (keyof T)[] | Field<T[keyof T]>[];
declare type ChildData<T extends {
[key: string]: DataType;
}> = T[keyof T][] | Data<T[keyof T]>[] | Vector<T[keyof T]>[];
export declare class Schema<T extends {
[key: string]: DataType;
} = any> {
static from<T extends {
[key: string]: DataType;
} = any>(children: T): Schema<T>;
static from<T extends VectorMap = any>(children: T): Schema<{
[P in keyof T]: T[P]['type'];
}>;
static from<T extends {
[key: string]: DataType;
} = any>(children: ChildData<T>, fields?: Fields<T>): Schema<T>;
static new<T extends {
[key: string]: DataType;
} = any>(children: T): Schema<T>;
static new<T extends VectorMap = any>(children: T): Schema<{
[P in keyof T]: T[P]['type'];
}>;
static new<T extends {
[key: string]: DataType;
} = any>(children: ChildData<T>, fields?: Fields<T>): Schema<T>;
readonly fields: Field<T[keyof T]>[];

@@ -40,3 +11,2 @@ readonly metadata: Map<string, string>;

toString(): string;
compareTo(other?: Schema | null): other is Schema<T>;
select<K extends keyof T = any>(...columnNames: K[]): Schema<{ [P in K]: T[P]; }>;

@@ -69,3 +39,2 @@ selectAt<K extends T[keyof T] = any>(...columnIndices: number[]): Schema<{

toString(): string;
compareTo(other?: Field | null): other is Field<T>;
clone<R extends DataType = T>(props: {

@@ -79,2 +48,1 @@ name?: string | number;

}
export {};

@@ -18,5 +18,2 @@ // Licensed to the Apache Software Foundation (ASF) under one

import { DataType } from './type';
import { selectArgs } from './util/args';
import { selectFieldArgs } from './util/args';
import { instance as comparer } from './visitor/typecomparator';
export class Schema {

@@ -31,10 +28,2 @@ constructor(fields = [], metadata, dictionaries) {

}
/** @nocollapse */
static from(...args) {
return Schema.new(args[0], args[1]);
}
/** @nocollapse */
static new(...args) {
return new Schema(selectFieldArgs(args)[0]);
}
get [Symbol.toStringTag]() { return 'Schema'; }

@@ -44,5 +33,2 @@ toString() {

}
compareTo(other) {
return comparer.compareSchemas(this, other);
}
select(...columnNames) {

@@ -56,4 +42,7 @@ const names = columnNames.reduce((xs, x) => (xs[x] = true) && xs, Object.create(null));

assign(...args) {
const other = args[0] instanceof Schema ? args[0]
: new Schema(selectArgs(Field, args));
const other = (args[0] instanceof Schema
? args[0]
: Array.isArray(args[0])
? new Schema(args[0])
: new Schema(args));
const curFields = [...this.fields];

@@ -92,5 +81,2 @@ const metadata = mergeMaps(mergeMaps(new Map(), this.metadata), other.metadata);

toString() { return `${this.name}: ${this.type}`; }
compareTo(other) {
return comparer.compareField(this, other);
}
clone(...args) {

@@ -97,0 +83,0 @@ let [name, type, nullable, metadata] = args;

@@ -41,4 +41,4 @@ import { Data } from './data';

[key: string]: DataType;
} = {}>(schema?: Schema<T>): Table<T>;
static from(): Table<{}>;
} = Record<string, never>>(schema?: Schema<T>): Table<T>;
static from(): Table<Record<string, never>>;
static from<T extends {

@@ -45,0 +45,0 @@ [key: string]: DataType;

@@ -33,3 +33,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

}
let chunks = selectArgs(RecordBatch, args);
const chunks = selectArgs(RecordBatch, args);
if (!schema && !(schema = chunks[0] && chunks[0].schema)) {

@@ -51,3 +51,3 @@ throw new TypeError('Table must be initialized with a Schema or at least one RecordBatch');

if (typeof input === 'object') {
let table = isIterable(input['values']) ? tableFromIterable(input)
const table = isIterable(input['values']) ? tableFromIterable(input)
: isAsyncIterable(input['values']) ? tableFromAsyncIterable(input)

@@ -71,3 +71,3 @@ : null;

if (schema) {
for await (let batch of reader) {
for await (const batch of reader) {
batches.push(batch);

@@ -74,0 +74,0 @@ }

import { Field } from './schema';
import { flatbuffers } from 'flatbuffers';
import { VectorType as V } from './interfaces';
import { TypedArrayConstructor } from './interfaces';
import { VectorType as V, TypeToDataType } from './interfaces';
import Long = flatbuffers.Long;

@@ -66,3 +66,2 @@ import { Type, Precision, UnionMode, DateUnit, TimeUnit, IntervalUnit } from './enum';

get typeId(): TType;
compareTo(other: DataType): other is TypeToDataType<TType>;
protected static [Symbol.toStringTag]: string;

@@ -69,0 +68,0 @@ }

@@ -17,3 +17,2 @@ // Licensed to the Apache Software Foundation (ASF) under one

// under the License.
import { instance as comparer } from './visitor/typecomparator';
import { Type, Precision, UnionMode, DateUnit, TimeUnit, IntervalUnit } from './enum';

@@ -44,5 +43,2 @@ /**

get typeId() { return Type.NONE; }
compareTo(other) {
return comparer.visit(this, other);
}
}

@@ -468,3 +464,3 @@ DataType[Symbol.toStringTag] = ((proto) => {

export function strideForType(type) {
let t = type;
const t = type;
switch (type.typeId) {

@@ -471,0 +467,0 @@ case Type.Decimal: return 4;

@@ -44,3 +44,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

let value, j = idx;
let i = -1, n = vals.length;
let i = -1;
const n = vals.length;
while (++i < n) {

@@ -59,3 +60,4 @@ if (isArray(value = vals[i])) {

let value, j = idx;
let i = -1, n = vals.length;
let i = -1;
const n = vals.length;
while (++i < n) {

@@ -77,3 +79,4 @@ if (isArray(value = vals[i])) {

let value, j = idx;
let i = -1, n = vals.length;
let i = -1;
const n = vals.length;
while (++i < n) {

@@ -95,3 +98,4 @@ if (isArray(value = vals[i])) {

let value, j = idx;
let i = -1, n = vals.length;
let i = -1;
const n = vals.length;
while (++i < n) {

@@ -114,3 +118,4 @@ if (isArray(value = vals[i])) {

function _selectFieldArgs(vals, ret) {
let keys, n;
let keys;
let n;
switch (n = vals.length) {

@@ -137,6 +142,7 @@ case 0: return ret;

let valueIndex = -1;
let idx = -1, len = vals.length;
let idx = -1;
const len = vals.length;
let field;
let val;
let [fields, values] = ret;
const [fields, values] = ret;
while (++idx < len) {

@@ -143,0 +149,0 @@ val = vals[idx];

@@ -12,3 +12,15 @@ /** @ignore */

/** @ignore */
export declare function iterateBits<T>(bytes: Uint8Array, begin: number, length: number, context: any, get: (context: any, index: number, byte: number, bit: number) => T): Generator<T, void, unknown>;
export declare class BitIterator<T> implements IterableIterator<T> {
private bytes;
private length;
private context;
private get;
bit: number;
byte: number;
byteIndex: number;
index: number;
constructor(bytes: Uint8Array, begin: number, length: number, context: any, get: (context: any, index: number, byte: number, bit: number) => T);
next(): IteratorResult<T>;
[Symbol.iterator](): this;
}
/**

@@ -15,0 +27,0 @@ * Compute the population count (the number of bits set to 1) for a range of bits in a Uint8Array.

@@ -39,3 +39,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

// Otherwise iterate each bit from the offset and return a new one
packBools(iterateBits(bitmap, offset, length, null, getBool)).subarray(0, alignedSize));
packBools(new BitIterator(bitmap, offset, length, null, getBool)).subarray(0, alignedSize));
return bytes;

@@ -47,3 +47,3 @@ }

export function packBools(values) {
let xs = [];
const xs = [];
let i = 0, bit = 0, byte = 0;

@@ -60,3 +60,3 @@ for (const value of values) {

}
let b = new Uint8Array((xs.length + 7) & ~7);
const b = new Uint8Array((xs.length + 7) & ~7);
b.set(xs);

@@ -66,12 +66,28 @@ return b;

/** @ignore */
export function* iterateBits(bytes, begin, length, context, get) {
let bit = begin % 8;
let byteIndex = begin >> 3;
let index = 0, remaining = length;
for (; remaining > 0; bit = 0) {
let byte = bytes[byteIndex++];
do {
yield get(context, index++, byte, bit);
} while (--remaining > 0 && ++bit < 8);
export class BitIterator {
constructor(bytes, begin, length, context, get) {
this.bytes = bytes;
this.length = length;
this.context = context;
this.get = get;
this.bit = begin % 8;
this.byteIndex = begin >> 3;
this.byte = bytes[this.byteIndex++];
this.index = 0;
}
next() {
if (this.index < this.length) {
if (this.bit === 8) {
this.bit = 0;
this.byte = this.bytes[this.byteIndex++];
}
return {
value: this.get(this.context, this.index++, this.byte, this.bit++)
};
}
return { done: true, value: null };
}
[Symbol.iterator]() {
return this;
}
}

@@ -92,3 +108,3 @@ /**

let sum = 0;
for (const bit of iterateBits(data, lhs, rhs - lhs, data, getBit)) {
for (const bit of new BitIterator(data, lhs, rhs - lhs, data, getBit)) {
sum += bit;

@@ -95,0 +111,0 @@ }

@@ -55,5 +55,7 @@ // Licensed to the Apache Software Foundation (ASF) under one

function bignumToNumber(bn) {
let { buffer, byteOffset, length, 'signed': signed } = bn;
let words = new Int32Array(buffer, byteOffset, length);
let number = 0, i = 0, n = words.length, hi, lo;
const { buffer, byteOffset, length, 'signed': signed } = bn;
const words = new Int32Array(buffer, byteOffset, length);
let number = 0, i = 0;
const n = words.length;
let hi, lo;
while (i < n) {

@@ -82,6 +84,7 @@ lo = words[i++];

let digits = '';
let base64 = new Uint32Array(2);
const base64 = new Uint32Array(2);
let base32 = new Uint16Array(a.buffer, a.byteOffset, a.byteLength / 2);
let checks = new Uint32Array((base32 = new Uint16Array(base32).reverse()).buffer);
let i = -1, n = base32.length - 1;
const checks = new Uint32Array((base32 = new Uint16Array(base32).reverse()).buffer);
let i = -1;
const n = base32.length - 1;
do {

@@ -88,0 +91,0 @@ for (base64[0] = base32[i = 0]; i < n;) {

@@ -25,3 +25,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

function collapseContiguousByteRanges(chunks) {
let result = chunks[0] ? [chunks[0]] : [];
const result = chunks[0] ? [chunks[0]] : [];
let xOffset, yOffset, xLen, yLen;

@@ -60,6 +60,7 @@ for (let x, y, i = 0, j = 0, n = chunks.length; ++i < n;) {

// streaming, where we may be reading partial byte ranges out of the same underlying ArrayBuffer
let result = collapseContiguousByteRanges(chunks);
let byteLength = result.reduce((x, b) => x + b.byteLength, 0);
const result = collapseContiguousByteRanges(chunks);
const byteLength = result.reduce((x, b) => x + b.byteLength, 0);
let source, sliced, buffer;
let offset = 0, index = -1, length = Math.min(size || Infinity, byteLength);
let offset = 0, index = -1;
const length = Math.min(size || Infinity, byteLength);
for (let n = result.length; ++index < n;) {

@@ -202,3 +203,4 @@ source = result[index];

export function compareArrayLike(a, b) {
let i = 0, n = a.length;
let i = 0;
const n = a.length;
if (n !== b.length) {

@@ -205,0 +207,0 @@ return false;

/// <reference types="node" />
/// <reference types="graceful-fs" />
import { ArrowJSONLike } from '../io/interfaces';

@@ -47,3 +46,3 @@ /** @ignore */

/** @ignore */
export declare const isFileHandle: (x: any) => x is import("fs").promises.FileHandle;
export declare const isFileHandle: (x: any) => x is import("node:fs/promises").FileHandle;
/** @ignore */

@@ -50,0 +49,0 @@ export declare const isFSReadStream: (x: any) => x is import("fs").ReadStream;

@@ -55,2 +55,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

/** @ignore */
// eslint-disable-next-line @typescript-eslint/ban-types
export const isObject = (x) => x != null && Object(x) === x;

@@ -57,0 +58,0 @@ /** @ignore */

@@ -123,3 +123,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

const length = str.length;
let out = new Uint64(out_buffer);
const out = new Uint64(out_buffer);
for (let posn = 0; posn < length;) {

@@ -146,3 +146,3 @@ const group = kInt32DecimalDigits < length - posn ?

static multiply(left, right) {
let rtrn = new Uint64(new Uint32Array(left.buffer));
const rtrn = new Uint64(new Uint32Array(left.buffer));
return rtrn.times(right);

@@ -152,3 +152,3 @@ }

static add(left, right) {
let rtrn = new Uint64(new Uint32Array(left.buffer));
const rtrn = new Uint64(new Uint32Array(left.buffer));
return rtrn.plus(right);

@@ -201,3 +201,3 @@ }

const length = str.length;
let out = new Int64(out_buffer);
const out = new Int64(out_buffer);
for (let posn = negate ? 1 : 0; posn < length;) {

@@ -224,3 +224,3 @@ const group = kInt32DecimalDigits < length - posn ?

static multiply(left, right) {
let rtrn = new Int64(new Uint32Array(left.buffer));
const rtrn = new Int64(new Uint32Array(left.buffer));
return rtrn.times(right);

@@ -230,3 +230,3 @@ }

static add(left, right) {
let rtrn = new Int64(new Uint32Array(left.buffer));
const rtrn = new Int64(new Uint32Array(left.buffer));
return rtrn.plus(right);

@@ -279,3 +279,3 @@ }

this.buffer[0] = product.low();
let sum = new Uint64(new Uint32Array([product.high(), 0]));
const sum = new Uint64(new Uint32Array([product.high(), 0]));
product = Uint64.multiply(L2, R3);

@@ -288,3 +288,3 @@ sum.plus(product);

this.buffer[2] = sum.high();
let high = new Uint64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2));
const high = new Uint64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2));
high.plus(Uint64.multiply(L1, R3))

@@ -300,3 +300,3 @@ .plus(Uint64.multiply(L2, R2))

plus(other) {
let sums = new Uint32Array(4);
const sums = new Uint32Array(4);
sums[3] = (this.buffer[3] + other.buffer[3]) >>> 0;

@@ -326,3 +326,3 @@ sums[2] = (this.buffer[2] + other.buffer[2]) >>> 0;

static multiply(left, right) {
let rtrn = new Int128(new Uint32Array(left.buffer));
const rtrn = new Int128(new Uint32Array(left.buffer));
return rtrn.times(right);

@@ -332,3 +332,3 @@ }

static add(left, right) {
let rtrn = new Int128(new Uint32Array(left.buffer));
const rtrn = new Int128(new Uint32Array(left.buffer));
return rtrn.plus(right);

@@ -355,3 +355,3 @@ }

const length = str.length;
let out = new Int128(out_buffer);
const out = new Int128(out_buffer);
for (let posn = negate ? 1 : 0; posn < length;) {

@@ -358,0 +358,0 @@ const group = kInt32DecimalDigits < length - posn ?

@@ -27,5 +27,5 @@ // Licensed to the Apache Software Foundation (ASF) under one

export function uint16ToFloat64(h) {
let expo = (h & 0x7C00) >> 10;
let sigf = (h & 0x03FF) / 1024;
let sign = (-1) ** ((h & 0x8000) >> 15);
const expo = (h & 0x7C00) >> 10;
const sigf = (h & 0x03FF) / 1024;
const sign = (-1) ** ((h & 0x8000) >> 15);
switch (expo) {

@@ -53,3 +53,3 @@ case 0x1F: return sign * (sigf ? NaN : 1 / 0);

// 0x000fffff = 00000000 00001111 11111111 11111111 -- masks the 1st-20th bit
let sign = (u32[1] & 0x80000000) >> 16 & 0xFFFF;
const sign = (u32[1] & 0x80000000) >> 16 & 0xFFFF;
let expo = (u32[1] & 0x7ff00000), sigf = 0x0000;

@@ -56,0 +56,0 @@ if (expo >= 0x40f00000) {

@@ -29,3 +29,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

let field;
let i = -1, n = chunks.length;
let i = -1;
const n = chunks.length;
const fields = [...schema.fields];

@@ -60,3 +61,4 @@ const batchData = [];

let numBatches = 0, batchLength = 0;
let i = -1, numColumns = columns.length;
let i = -1;
const numColumns = columns.length;
let child, childData = [];

@@ -84,3 +86,4 @@ while (memo.numBatches-- > 0) {

let field;
let length = 0, i = -1, n = columns.length;
let length = 0, i = -1;
const n = columns.length;
const bitmapLength = ((batchLength + 63) & ~63) >> 3;

@@ -87,0 +90,0 @@ while (++i < n) {

/** @ignore */
export declare const decodeUtf8: (input: ArrayBufferLike | ArrayBufferView) => string;
export declare const decodeUtf8: (input: ArrayBufferLike | ArrayBufferView) => any;
/** @ignore */
export declare const encodeUtf8: (value?: string | undefined) => Uint8Array;

@@ -20,3 +20,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

/** @ignore @suppress {missingRequire} */
const _Buffer = typeof Buffer === 'function' ? Buffer : null;
const _Buffer = eval("typeof Buffer === 'function' ? Buffer : null");
/** @ignore */

@@ -23,0 +23,0 @@ const useNativeEncoders = typeof TextDecoder === 'function' && typeof TextEncoder === 'function';

@@ -34,3 +34,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

// slice(-1, 5) or slice(5, -1)
let { length: len = 0 } = source;
const { length: len = 0 } = source;
let lhs = typeof begin !== 'number' ? 0 : begin;

@@ -51,3 +51,3 @@ let rhs = typeof end !== 'number' ? len : end;

export function createElementComparator(search) {
let typeofSearch = typeof search;
const typeofSearch = typeof search;
// Compare primitives

@@ -170,3 +170,3 @@ if (typeofSearch !== 'object' || search === null) {

let i = 0;
let n = comparators.length;
const n = comparators.length;
let rVal = rValItr.next();

@@ -173,0 +173,0 @@ let lKey = lKeyItr.next();

@@ -22,2 +22,28 @@ // Licensed to the Apache Software Foundation (ASF) under one

/** @ignore */
class ChunkedIterator {
constructor(chunks) {
this.chunks = chunks;
this.chunkIndex = 0;
this.chunkIterator = this.getChunkIterator();
}
next() {
while (this.chunkIndex < this.chunks.length) {
const next = this.chunkIterator.next();
if (!next.done) {
return next;
}
if (++this.chunkIndex < this.chunks.length) {
this.chunkIterator = this.getChunkIterator();
}
}
return { done: true, value: null };
}
getChunkIterator() {
return this.chunks[this.chunkIndex][Symbol.iterator]();
}
[Symbol.iterator]() {
return this;
}
}
/** @ignore */
export class Chunked extends AbstractVector {

@@ -81,6 +107,4 @@ constructor(type, chunks = [], offsets = calculateOffsets(chunks)) {

}
*[Symbol.iterator]() {
for (const chunk of this._chunks) {
yield* chunk;
}
[Symbol.iterator]() {
return new ChunkedIterator(this._chunks);
}

@@ -100,3 +124,3 @@ clone(chunks = this._chunks) {

}
let columns = this._children || (this._children = []);
const columns = this._children || (this._children = []);
let child, field, chunks;

@@ -117,5 +141,6 @@ if (child = columns[index]) {

search(index, then) {
let idx = index;
const idx = index;
// binary search to find the child vector and value indices
let offsets = this._chunkOffsets, rhs = offsets.length - 1;
const offsets = this._chunkOffsets;
let rhs = offsets.length - 1;
// return early if out of bounds, or if there's just one child

@@ -166,3 +191,4 @@ if (idx < 0) {

}
let len = 0, src = new Array(n);
let len = 0;
const src = new Array(n);
for (let i = -1; ++i < n;) {

@@ -174,4 +200,4 @@ len += (src[i] = chunks[i].toArray()).length;

}
let dst = new ArrayType(len);
let set = ArrayType === Array ? arraySet : typedSet;
const dst = new ArrayType(len);
const set = ArrayType === Array ? arraySet : typedSet;
for (let i = -1, idx = 0; ++i < n;) {

@@ -185,3 +211,4 @@ idx = set(src[i], dst, idx);

indexOfInternal({ _chunks }, chunkIndex, fromIndex, element) {
let i = chunkIndex - 1, n = _chunks.length;
let i = chunkIndex - 1;
const n = _chunks.length;
let start = fromIndex, offset = 0, found = -1;

@@ -227,4 +254,5 @@ while (++i < n) {

function calculateOffsets(vectors) {
let offsets = new Uint32Array((vectors || []).length + 1);
let offset = offsets[0] = 0, length = offsets.length;
const offsets = new Uint32Array((vectors || []).length + 1);
let offset = offsets[0] = 0;
const length = offsets.length;
for (let index = 0; ++index < length;) {

@@ -231,0 +259,0 @@ offsets[index] = (offset += vectors[index - 1].length);

@@ -28,3 +28,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) {
let InputType = arrayTypeToDataType(input.constructor) || ArrowType;
const InputType = arrayTypeToDataType(input.constructor) || ArrowType;
// Special case, infer the Arrow DataType from the input if calling the base

@@ -38,4 +38,4 @@ // FloatVector.from with a TypedArray, e.g. `FloatVector.from(new Float32Array())`

if (ArrowType && ArrowType === InputType) {
let type = new ArrowType();
let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT;
const type = new ArrowType();
const length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT;
// If the ArrowType is Float16 but the input type isn't a Uint16Array,

@@ -42,0 +42,0 @@ // let the Float16Builder handle casting the input values to Uint16s.

@@ -28,6 +28,6 @@ // Licensed to the Apache Software Foundation (ASF) under one

static from(...args) {
let [input, is64bit = false] = args;
const [input, is64bit = false] = args;
let ArrowType = vectorTypeToDataType(this, is64bit);
if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) {
let InputType = arrayTypeToDataType(input.constructor, is64bit) || ArrowType;
const InputType = arrayTypeToDataType(input.constructor, is64bit) || ArrowType;
// Special case, infer the Arrow DataType from the input if calling the base

@@ -41,3 +41,3 @@ // IntVector.from with a TypedArray, e.g. `IntVector.from(new Int32Array())`

if (ArrowType && ArrowType === InputType) {
let type = new ArrowType();
const type = new ArrowType();
let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT;

@@ -44,0 +44,0 @@ // If the ArrowType is 64bit but the input type is 32bit pairs, update the logical length

@@ -174,3 +174,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

return (row) => {
let idx = -1, ktoi = row[kKeyToIdx] || (row[kKeyToIdx] = new Map());
let idx = -1;
const ktoi = row[kKeyToIdx] || (row[kKeyToIdx] = new Map());
const getter = (key) => function () { return this.get(key); };

@@ -182,4 +183,4 @@ const setter = (key) => function (val) { return this.set(key, val); };

desc.set = setter(key);
row.hasOwnProperty(key) || (desc.enumerable = true, Object.defineProperty(row, key, desc));
row.hasOwnProperty(idx) || (desc.enumerable = false, Object.defineProperty(row, idx, desc));
Object.prototype.hasOwnProperty.call(row, key) || (desc.enumerable = true, Object.defineProperty(row, key, desc));
Object.prototype.hasOwnProperty.call(row, idx) || (desc.enumerable = false, Object.defineProperty(row, idx, desc));
}

@@ -186,0 +187,0 @@ desc.get = desc.set = null;

@@ -54,15 +54,10 @@ // Licensed to the Apache Software Foundation (ASF) under one

let dtype = Type.NONE;
// tslint:disable
if (node instanceof Data) {
if (node instanceof Data)
dtype = inferDType(node.type);
}
else if (node instanceof Vector) {
else if (node instanceof Vector)
dtype = inferDType(node.type);
}
else if (node instanceof DataType) {
else if (node instanceof DataType)
dtype = inferDType(node);
}
else if (typeof (dtype = node) !== 'number') {
else if (typeof (dtype = node) !== 'number')
dtype = Type[node];
}
switch (dtype) {

@@ -209,3 +204,3 @@ case Type.Null:

case Type.Null: return Type.Null;
case Type.Int:
case Type.Int: {
const { bitWidth, isSigned } = type;

@@ -220,2 +215,3 @@ switch (bitWidth) {

return Type.Int;
}
case Type.Float:

@@ -222,0 +218,0 @@ switch (type.precision) {

@@ -18,3 +18,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

import { Visitor } from '../visitor';
import { getBool, iterateBits } from '../util/bit';
import { getBool, BitIterator } from '../util/bit';
import { createElementComparator } from '../util/vector';

@@ -36,3 +36,3 @@ /** @ignore */

let i = 0;
for (const isValid of iterateBits(nullBitmap, vector.data.offset + (fromIndex || 0), vector.length, nullBitmap, getBool)) {
for (const isValid of new BitIterator(nullBitmap, vector.data.offset + (fromIndex || 0), vector.length, nullBitmap, getBool)) {
if (!isValid) {

@@ -39,0 +39,0 @@ return i;

@@ -19,3 +19,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

import { Visitor } from '../visitor';
import { iterateBits } from '../util/bit';
import { BitIterator } from '../util/bit';
import { instance as getVisitor } from './get';

@@ -28,5 +28,24 @@ /** @ignore */

const getFn = getVisitor.getVisitFn(vector);
return iterateBits(vector.data.nullBitmap, vector.data.offset, vector.length, vector, (vec, idx, nullByte, nullBit) => ((nullByte & 1 << nullBit) !== 0) ? getFn(vec, idx) : null);
return new BitIterator(vector.data.nullBitmap, vector.data.offset, vector.length, vector, (vec, idx, nullByte, nullBit) => ((nullByte & 1 << nullBit) !== 0) ? getFn(vec, idx) : null);
}
/** @ignore */
class VectorIterator {
constructor(vector, getFn) {
this.vector = vector;
this.getFn = getFn;
this.index = 0;
}
next() {
if (this.index < this.vector.length) {
return {
value: this.getFn(this.vector, this.index++)
};
}
return { done: true, value: null };
}
[Symbol.iterator]() {
return this;
}
}
/** @ignore */
function vectorIterator(vector) {

@@ -46,7 +65,3 @@ // If nullable, iterate manually

// Otherwise, iterate manually
return (function* (getFn) {
for (let index = -1; ++index < length;) {
yield getFn(vector, index);
}
})(getVisitor.getVisitFn(vector));
return new VectorIterator(vector, getVisitor.getVisitFn(vector));
}

@@ -53,0 +68,0 @@ IteratorVisitor.prototype.visitNull = vectorIterator;

@@ -5,3 +5,3 @@ import * as type from '../type';

export interface JSONTypeAssembler extends Visitor {
visit<T extends type.DataType>(node: T): object | undefined;
visit<T extends type.DataType>(node: T): Record<string, unknown> | undefined;
}

@@ -65,3 +65,3 @@ /** @ignore */

};
visitDictionary<T extends type.Dictionary>(node: T): object | undefined;
visitDictionary<T extends type.Dictionary>(node: T): Record<string, unknown> | undefined;
visitFixedSizeBinary<T extends type.FixedSizeBinary>({ typeId, byteWidth }: T): {

@@ -68,0 +68,0 @@ name: string;

@@ -18,3 +18,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

import { Visitor } from '../visitor';
import { ArrowType, Precision, DateUnit, TimeUnit, IntervalUnit, UnionMode } from '../enum';
import { Type as ArrowType } from '../fb/Schema';
import { Precision, DateUnit, TimeUnit, IntervalUnit, UnionMode } from '../enum';
/** @ignore */

@@ -21,0 +22,0 @@ export class JSONTypeAssembler extends Visitor {

@@ -8,4 +8,4 @@ import { Column } from '../column';

export interface JSONVectorAssembler extends Visitor {
visit<T extends Column>(node: T): object;
visitMany<T extends Column>(cols: T[]): object[];
visit<T extends Column>(node: T): Record<string, unknown>;
visitMany<T extends Column>(cols: T[]): Record<string, unknown>[];
getVisitFn<T extends DataType>(node: Column<T>): (column: Column<T>) => {

@@ -20,3 +20,3 @@ name: string;

};
visitNull<T extends Null>(vector: V<T>): {};
visitNull<T extends Null>(vector: V<T>): Record<string, never>;
visitBool<T extends Bool>(vector: V<T>): {

@@ -78,3 +78,3 @@ DATA: boolean[];

/** @nocollapse */
static assemble<T extends Column | RecordBatch>(...args: (T | T[])[]): object[];
static assemble<T extends Column | RecordBatch>(...args: (T | T[])[]): Record<string, unknown>[];
}

@@ -24,3 +24,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

import { UnionMode, DateUnit, TimeUnit } from '../enum';
import { iterateBits, getBit, getBool } from '../util/bit';
import { BitIterator, getBit, getBool } from '../util/bit';
import { selectColumnChildrenArgs } from '../util/args';

@@ -44,3 +44,3 @@ import { DataType, } from '../type';

: nullCount <= 0 ? Array.from({ length }, () => 1)
: [...iterateBits(nullBitmap, offset, length, null, getBit)],
: [...new BitIterator(nullBitmap, offset, length, null, getBit)],
...super.visit(Vector.new(data.clone(type, offset, length, 0, buffers)))

@@ -51,3 +51,3 @@ };

visitBool({ values, offset, length }) {
return { 'DATA': [...iterateBits(values, offset, length, null, getBool)] };
return { 'DATA': [...new BitIterator(values, offset, length, null, getBool)] };
}

@@ -54,0 +54,0 @@ visitInt(vector) {

@@ -73,3 +73,3 @@ // Licensed to the Apache Software Foundation (ASF) under one

break;
default:
default: {
const val = value;

@@ -79,2 +79,3 @@ const { stride, ArrayType } = vector;

vector.values.set(long.subarray(0, stride), stride * index);
}
}

@@ -81,0 +82,0 @@ };

@@ -19,22 +19,4 @@ // Licensed to the Apache Software Foundation (ASF) under one

var Long = flatbuffers.Long;
import * as Schema_ from '../fb/Schema';
import { Visitor } from '../visitor';
var Null = Schema_.org.apache.arrow.flatbuf.Null;
var Int = Schema_.org.apache.arrow.flatbuf.Int;
var FloatingPoint = Schema_.org.apache.arrow.flatbuf.FloatingPoint;
var Binary = Schema_.org.apache.arrow.flatbuf.Binary;
var Bool = Schema_.org.apache.arrow.flatbuf.Bool;
var Utf8 = Schema_.org.apache.arrow.flatbuf.Utf8;
var Decimal = Schema_.org.apache.arrow.flatbuf.Decimal;
var Date = Schema_.org.apache.arrow.flatbuf.Date;
var Time = Schema_.org.apache.arrow.flatbuf.Time;
var Timestamp = Schema_.org.apache.arrow.flatbuf.Timestamp;
var Interval = Schema_.org.apache.arrow.flatbuf.Interval;
var List = Schema_.org.apache.arrow.flatbuf.List;
var Struct = Schema_.org.apache.arrow.flatbuf.Struct_;
var Union = Schema_.org.apache.arrow.flatbuf.Union;
var DictionaryEncoding = Schema_.org.apache.arrow.flatbuf.DictionaryEncoding;
var FixedSizeBinary = Schema_.org.apache.arrow.flatbuf.FixedSizeBinary;
var FixedSizeList = Schema_.org.apache.arrow.flatbuf.FixedSizeList;
var Map_ = Schema_.org.apache.arrow.flatbuf.Map;
import { Null, Int, FloatingPoint, Binary, Bool, Utf8, Decimal, Date, Time, Timestamp, Interval, List, Struct_ as Struct, Union, DictionaryEncoding, FixedSizeBinary, FixedSizeList, Map as Map_, } from '../fb/Schema';
/** @ignore */

@@ -41,0 +23,0 @@ export class TypeAssembler extends Visitor {

@@ -60,8 +60,13 @@ import { Data } from '../data';

}>(schema: Schema<T>, other?: Schema | null): other is Schema<T>;
compareFields<T extends {
compareManyFields<T extends {
[key: string]: DataType;
}>(fields: Field<T[keyof T]>[], others?: Field[] | null): others is Field<T[keyof T]>[];
compareField<T extends DataType = any>(field: Field<T>, other?: Field | null): other is Field<T>;
compareFields<T extends DataType = any>(field: Field<T>, other?: Field | null): other is Field<T>;
}
/** @ignore */
export declare const instance: TypeComparator;
export declare function compareSchemas<T extends {
[key: string]: DataType;
}>(schema: Schema<T>, other?: Schema | null): other is Schema<T>;
export declare function compareFields<T extends DataType = any>(field: Field<T>, other?: Field | null): other is Field<T>;
export declare function compareTypes<A extends DataType = any>(type: A, other?: DataType): other is A;

@@ -22,15 +22,15 @@ // Licensed to the Apache Software Foundation (ASF) under one

return (schema === other) || (other instanceof schema.constructor &&
instance.compareFields(schema.fields, other.fields));
this.compareManyFields(schema.fields, other.fields));
}
compareFields(fields, others) {
compareManyFields(fields, others) {
return (fields === others) || (Array.isArray(fields) &&
Array.isArray(others) &&
fields.length === others.length &&
fields.every((f, i) => instance.compareField(f, others[i])));
fields.every((f, i) => this.compareFields(f, others[i])));
}
compareField(field, other) {
compareFields(field, other) {
return (field === other) || (other instanceof field.constructor &&
field.name === other.name &&
field.nullable === other.nullable &&
instance.visit(field.type, other.type));
this.visit(field.type, other.type));
}

@@ -74,3 +74,3 @@ }

type.children.length === other.children.length &&
instance.compareFields(type.children, other.children));
instance.compareManyFields(type.children, other.children));
}

@@ -80,3 +80,3 @@ function compareStruct(type, other) {

type.children.length === other.children.length &&
instance.compareFields(type.children, other.children));
instance.compareManyFields(type.children, other.children));
}

@@ -87,3 +87,3 @@ function compareUnion(type, other) {

type.typeIds.every((x, i) => x === other.typeIds[i]) &&
instance.compareFields(type.children, other.children));
instance.compareManyFields(type.children, other.children));
}

@@ -105,3 +105,3 @@ function compareDictionary(type, other) {

type.children.length === other.children.length &&
instance.compareFields(type.children, other.children));
instance.compareManyFields(type.children, other.children));
}

@@ -112,3 +112,3 @@ function compareMap(type, other) {

type.children.length === other.children.length &&
instance.compareFields(type.children, other.children));
instance.compareManyFields(type.children, other.children));
}

@@ -160,3 +160,12 @@ TypeComparator.prototype.visitNull = compareAny;

export const instance = new TypeComparator();
export function compareSchemas(schema, other) {
return instance.compareSchemas(schema, other);
}
export function compareFields(field, other) {
return instance.compareFields(field, other);
}
export function compareTypes(type, other) {
return instance.visit(type, other);
}
//# sourceMappingURL=typecomparator.mjs.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc