apache-arrow
Version:
Apache Arrow columnar in-memory format
1 lines • 3.2 kB
Source Map (JSON)
{"version":3,"sources":["vector.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,+DAA+D;AAC/D,wDAAwD;AACxD,6DAA6D;AAC7D,oDAAoD;AACpD,6DAA6D;AAC7D,6DAA6D;AAC7D,EAAE;AACF,+CAA+C;AAC/C,EAAE;AACF,6DAA6D;AAC7D,8DAA8D;AAC9D,yDAAyD;AACzD,4DAA4D;AAC5D,0DAA0D;AAC1D,qBAAqB;AAgCrB,MAAM,OAAgB,cAAc;CAqBnC;AAEA,cAAc,CAAC,SAAiB,CAAC,IAAI,GAAG,IAAI,CAAC;AAE9C,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,CAAC","file":"vector.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Data } from './data';\nimport { DataType } from './type';\nimport { Chunked } from './vector/chunked';\n\n/** @ignore */\nexport interface Clonable<R extends AbstractVector> {\n clone(...args: any[]): R;\n}\n\n/** @ignore */\nexport interface Sliceable<R extends AbstractVector> {\n slice(begin?: number, end?: number): R;\n}\n\n/** @ignore */\nexport interface Applicative<T extends DataType, R extends Chunked> {\n concat(...others: Vector<T>[]): R;\n readonly [Symbol.isConcatSpreadable]: boolean;\n}\n\nexport interface AbstractVector<T extends DataType = any>\n extends Clonable<AbstractVector<T>>,\n Sliceable<AbstractVector<T>>,\n Applicative<T, Chunked<T>> {\n\n readonly TType: T['TType'];\n readonly TArray: T['TArray'];\n readonly TValue: T['TValue'];\n}\n\nexport abstract class AbstractVector<T extends DataType = any> implements Iterable<T['TValue'] | null> {\n\n public abstract readonly data: Data<T>;\n public abstract readonly type: T;\n public abstract readonly typeId: T['TType'];\n public abstract readonly length: number;\n public abstract readonly stride: number;\n public abstract readonly nullCount: number;\n public abstract readonly byteLength: number;\n public abstract readonly numChildren: number;\n\n public abstract readonly ArrayType: T['ArrayType'];\n\n public abstract isValid(index: number): boolean;\n public abstract get(index: number): T['TValue'] | null;\n public abstract set(index: number, value: T['TValue'] | null): void;\n public abstract indexOf(value: T['TValue'] | null, fromIndex?: number): number;\n public abstract [Symbol.iterator](): IterableIterator<T['TValue'] | null>;\n\n public abstract toArray(): T['TArray'];\n public abstract getChildAt<R extends DataType = any>(index: number): Vector<R> | null;\n}\n\n(AbstractVector.prototype as any).data = null;\n\nexport { AbstractVector as Vector };\n"]}