UNPKG

apache-arrow

Version:
134 lines (132 loc) 6.85 kB
"use strict"; // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. Object.defineProperty(exports, "__esModule", { value: true }); exports.BufferType = exports.Type = exports.MessageHeader = exports.IntervalUnit = exports.TimeUnit = exports.DateUnit = exports.Precision = exports.UnionMode = exports.MetadataVersion = void 0; var metadata_version_js_1 = require("./fb/metadata-version.js"); Object.defineProperty(exports, "MetadataVersion", { enumerable: true, get: function () { return metadata_version_js_1.MetadataVersion; } }); var union_mode_js_1 = require("./fb/union-mode.js"); Object.defineProperty(exports, "UnionMode", { enumerable: true, get: function () { return union_mode_js_1.UnionMode; } }); var precision_js_1 = require("./fb/precision.js"); Object.defineProperty(exports, "Precision", { enumerable: true, get: function () { return precision_js_1.Precision; } }); var date_unit_js_1 = require("./fb/date-unit.js"); Object.defineProperty(exports, "DateUnit", { enumerable: true, get: function () { return date_unit_js_1.DateUnit; } }); var time_unit_js_1 = require("./fb/time-unit.js"); Object.defineProperty(exports, "TimeUnit", { enumerable: true, get: function () { return time_unit_js_1.TimeUnit; } }); var interval_unit_js_1 = require("./fb/interval-unit.js"); Object.defineProperty(exports, "IntervalUnit", { enumerable: true, get: function () { return interval_unit_js_1.IntervalUnit; } }); var message_header_js_1 = require("./fb/message-header.js"); Object.defineProperty(exports, "MessageHeader", { enumerable: true, get: function () { return message_header_js_1.MessageHeader; } }); /** * Main data type enumeration. * * Data types in this library are all *logical*. They can be expressed as * either a primitive physical type (bytes or bits of some fixed size), a * nested type consisting of other data types, or another data type (e.g. a * timestamp encoded as an int64). * * **Note**: Only non-negative enum values are written to an Arrow IPC payload. * * The rest of the values are specified here so TypeScript can narrow the type * signatures further beyond the base Arrow Types. The Arrow DataTypes include * metadata like `bitWidth` that impact the type signatures of the values we * accept and return. * * For example, the `Int8Vector` reads 1-byte numbers from an `Int8Array`, an * `Int32Vector` reads a 4-byte number from an `Int32Array`, and an `Int64Vector` * reads a pair of 4-byte lo, hi 32-bit integers as a zero-copy slice from the * underlying `Int32Array`. * * Library consumers benefit by knowing the narrowest type, since we can ensure * the types across all public methods are propagated, and never bail to `any`. * These values are _never_ used at runtime, and they will _never_ be written * to the flatbuffers metadata of serialized Arrow IPC payloads. */ var Type; (function (Type) { Type[Type["NONE"] = 0] = "NONE"; Type[Type["Null"] = 1] = "Null"; Type[Type["Int"] = 2] = "Int"; Type[Type["Float"] = 3] = "Float"; Type[Type["Binary"] = 4] = "Binary"; Type[Type["Utf8"] = 5] = "Utf8"; Type[Type["Bool"] = 6] = "Bool"; Type[Type["Decimal"] = 7] = "Decimal"; Type[Type["Date"] = 8] = "Date"; Type[Type["Time"] = 9] = "Time"; Type[Type["Timestamp"] = 10] = "Timestamp"; Type[Type["Interval"] = 11] = "Interval"; Type[Type["List"] = 12] = "List"; Type[Type["Struct"] = 13] = "Struct"; Type[Type["Union"] = 14] = "Union"; Type[Type["FixedSizeBinary"] = 15] = "FixedSizeBinary"; Type[Type["FixedSizeList"] = 16] = "FixedSizeList"; Type[Type["Map"] = 17] = "Map"; Type[Type["Duration"] = 18] = "Duration"; Type[Type["LargeBinary"] = 19] = "LargeBinary"; Type[Type["LargeUtf8"] = 20] = "LargeUtf8"; Type[Type["Dictionary"] = -1] = "Dictionary"; Type[Type["Int8"] = -2] = "Int8"; Type[Type["Int16"] = -3] = "Int16"; Type[Type["Int32"] = -4] = "Int32"; Type[Type["Int64"] = -5] = "Int64"; Type[Type["Uint8"] = -6] = "Uint8"; Type[Type["Uint16"] = -7] = "Uint16"; Type[Type["Uint32"] = -8] = "Uint32"; Type[Type["Uint64"] = -9] = "Uint64"; Type[Type["Float16"] = -10] = "Float16"; Type[Type["Float32"] = -11] = "Float32"; Type[Type["Float64"] = -12] = "Float64"; Type[Type["DateDay"] = -13] = "DateDay"; Type[Type["DateMillisecond"] = -14] = "DateMillisecond"; Type[Type["TimestampSecond"] = -15] = "TimestampSecond"; Type[Type["TimestampMillisecond"] = -16] = "TimestampMillisecond"; Type[Type["TimestampMicrosecond"] = -17] = "TimestampMicrosecond"; Type[Type["TimestampNanosecond"] = -18] = "TimestampNanosecond"; Type[Type["TimeSecond"] = -19] = "TimeSecond"; Type[Type["TimeMillisecond"] = -20] = "TimeMillisecond"; Type[Type["TimeMicrosecond"] = -21] = "TimeMicrosecond"; Type[Type["TimeNanosecond"] = -22] = "TimeNanosecond"; Type[Type["DenseUnion"] = -23] = "DenseUnion"; Type[Type["SparseUnion"] = -24] = "SparseUnion"; Type[Type["IntervalDayTime"] = -25] = "IntervalDayTime"; Type[Type["IntervalYearMonth"] = -26] = "IntervalYearMonth"; Type[Type["DurationSecond"] = -27] = "DurationSecond"; Type[Type["DurationMillisecond"] = -28] = "DurationMillisecond"; Type[Type["DurationMicrosecond"] = -29] = "DurationMicrosecond"; Type[Type["DurationNanosecond"] = -30] = "DurationNanosecond"; })(Type || (exports.Type = Type = {})); var BufferType; (function (BufferType) { /** * used in List type, Dense Union and variable length primitive types (String, Binary) */ BufferType[BufferType["OFFSET"] = 0] = "OFFSET"; /** * actual data, either fixed width primitive types in slots or variable width delimited by an OFFSET vector */ BufferType[BufferType["DATA"] = 1] = "DATA"; /** * Bit vector indicating if each value is null */ BufferType[BufferType["VALIDITY"] = 2] = "VALIDITY"; /** * Type vector used in Union type */ BufferType[BufferType["TYPE"] = 3] = "TYPE"; })(BufferType || (exports.BufferType = BufferType = {})); //# sourceMappingURL=enum.js.map