@loaders.gl/schema 3.1.3 → 4.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +2 -2
- package/dist/bundle.js.map +1 -0
- package/dist/category/common.d.ts +1 -2
- package/dist/category/common.d.ts.map +1 -1
- package/dist/category/common.js +2 -10
- package/dist/{es5/category → category}/common.js.map +0 -0
- package/dist/category/gis.js +2 -2
- package/dist/{es5/category → category}/gis.js.map +0 -0
- package/dist/category/image/image.d.ts +18 -0
- package/dist/category/image/image.d.ts.map +1 -0
- package/dist/category/image/image.js +2 -0
- package/dist/{esm/category/gis.js.map → category/image/image.js.map} +1 -1
- package/dist/category/mesh/convert-mesh.js +31 -37
- package/dist/category/mesh/convert-mesh.js.map +1 -0
- package/dist/category/mesh/deduce-mesh-schema.js +37 -57
- package/dist/category/mesh/deduce-mesh-schema.js.map +1 -0
- package/dist/category/mesh/mesh-to-arrow-table.d.ts +10 -0
- package/dist/category/mesh/mesh-to-arrow-table.d.ts.map +1 -1
- package/dist/category/mesh/mesh-to-arrow-table.js +15 -28
- package/dist/category/mesh/mesh-to-arrow-table.js.map +1 -0
- package/dist/category/mesh/mesh-types.js +2 -2
- package/dist/{es5/category → category}/mesh/mesh-types.js.map +0 -0
- package/dist/category/mesh/mesh-utils.js +35 -48
- package/dist/category/mesh/mesh-utils.js.map +1 -0
- package/dist/category/table/deduce-table-schema.js +39 -94
- package/dist/category/table/deduce-table-schema.js.map +1 -0
- package/dist/category/table/table-types.d.ts +1 -3
- package/dist/category/table/table-types.d.ts.map +1 -1
- package/dist/category/table/table-types.js +2 -2
- package/dist/{es5/category → category}/table/table-types.js.map +0 -0
- package/dist/category/texture/texture.d.ts +18 -0
- package/dist/category/texture/texture.d.ts.map +1 -0
- package/dist/category/texture/texture.js +2 -0
- package/dist/{esm/category/common.js.map → category/texture/texture.js.map} +1 -1
- package/dist/dist.min.js +15078 -208
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -75
- package/dist/index.js.map +1 -0
- package/dist/lib/arrow/arrow-like-type-utils.js +31 -26
- package/dist/lib/arrow/arrow-like-type-utils.js.map +1 -0
- package/dist/lib/arrow/arrow-type-utils.d.ts +5 -0
- package/dist/lib/arrow/arrow-type-utils.d.ts.map +1 -1
- package/dist/lib/arrow/arrow-type-utils.js +20 -28
- package/dist/lib/arrow/arrow-type-utils.js.map +1 -0
- package/dist/lib/arrow/get-type-info.js +19 -23
- package/dist/lib/arrow/get-type-info.js.map +1 -0
- package/dist/lib/batches/base-table-batch-aggregator.js +68 -52
- package/dist/lib/batches/base-table-batch-aggregator.js.map +1 -0
- package/dist/lib/batches/columnar-table-batch-aggregator.js +92 -82
- package/dist/lib/batches/columnar-table-batch-aggregator.js.map +1 -0
- package/dist/lib/batches/row-table-batch-aggregator.js +88 -72
- package/dist/lib/batches/row-table-batch-aggregator.js.map +1 -0
- package/dist/lib/batches/table-batch-aggregator.js +2 -2
- package/dist/{es5/lib → lib}/batches/table-batch-aggregator.js.map +0 -0
- package/dist/lib/batches/table-batch-builder.js +166 -137
- package/dist/lib/batches/table-batch-builder.js.map +1 -0
- package/dist/lib/schema/impl/enum.js +48 -96
- package/dist/lib/schema/impl/enum.js.map +1 -0
- package/dist/lib/schema/impl/field.js +34 -31
- package/dist/lib/schema/impl/field.js.map +1 -0
- package/dist/lib/schema/impl/schema.js +81 -72
- package/dist/lib/schema/impl/schema.js.map +1 -0
- package/dist/lib/schema/impl/type.js +490 -454
- package/dist/lib/schema/impl/type.js.map +1 -0
- package/dist/lib/schema/schema.js +5 -90
- package/dist/lib/schema/schema.js.map +1 -0
- package/dist/lib/schema-utils/deduce-column-type.js +20 -89
- package/dist/lib/schema-utils/deduce-column-type.js.map +1 -0
- package/dist/lib/utils/assert.js +5 -11
- package/dist/lib/utils/assert.js.map +1 -0
- package/dist/lib/utils/async-queue.js +109 -82
- package/dist/lib/utils/async-queue.js.map +1 -0
- package/dist/lib/utils/row-utils.js +33 -31
- package/dist/lib/utils/row-utils.js.map +1 -0
- package/dist/types.js +2 -2
- package/dist/{es5/types.js.map → types.js.map} +0 -0
- package/package.json +6 -5
- package/src/category/common.ts +1 -2
- package/src/category/image/image.ts +19 -0
- package/src/category/mesh/convert-mesh.ts +6 -6
- package/src/category/mesh/mesh-to-arrow-table.ts +2 -4
- package/src/category/table/table-types.ts +1 -4
- package/src/category/texture/texture.ts +28 -0
- package/src/index.ts +6 -1
- package/src/lib/arrow/arrow-type-utils.ts +0 -2
- package/dist/es5/bundle.js +0 -7
- package/dist/es5/bundle.js.map +0 -1
- package/dist/es5/category/common.js +0 -2
- package/dist/es5/category/gis.js +0 -2
- package/dist/es5/category/mesh/convert-mesh.js +0 -43
- package/dist/es5/category/mesh/convert-mesh.js.map +0 -1
- package/dist/es5/category/mesh/deduce-mesh-schema.js +0 -54
- package/dist/es5/category/mesh/deduce-mesh-schema.js.map +0 -1
- package/dist/es5/category/mesh/mesh-to-arrow-table.js +0 -2
- package/dist/es5/category/mesh/mesh-to-arrow-table.js.map +0 -1
- package/dist/es5/category/mesh/mesh-types.js +0 -2
- package/dist/es5/category/mesh/mesh-utils.js +0 -47
- package/dist/es5/category/mesh/mesh-utils.js.map +0 -1
- package/dist/es5/category/table/deduce-table-schema.js +0 -58
- package/dist/es5/category/table/deduce-table-schema.js.map +0 -1
- package/dist/es5/category/table/table-types.js +0 -2
- package/dist/es5/index.js +0 -344
- package/dist/es5/index.js.map +0 -1
- package/dist/es5/lib/arrow/arrow-like-type-utils.js +0 -40
- package/dist/es5/lib/arrow/arrow-like-type-utils.js.map +0 -1
- package/dist/es5/lib/arrow/arrow-type-utils.js +0 -2
- package/dist/es5/lib/arrow/arrow-type-utils.js.map +0 -1
- package/dist/es5/lib/arrow/get-type-info.js +0 -33
- package/dist/es5/lib/arrow/get-type-info.js.map +0 -1
- package/dist/es5/lib/batches/base-table-batch-aggregator.js +0 -92
- package/dist/es5/lib/batches/base-table-batch-aggregator.js.map +0 -1
- package/dist/es5/lib/batches/columnar-table-batch-aggregator.js +0 -128
- package/dist/es5/lib/batches/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/es5/lib/batches/row-table-batch-aggregator.js +0 -113
- package/dist/es5/lib/batches/row-table-batch-aggregator.js.map +0 -1
- package/dist/es5/lib/batches/table-batch-aggregator.js +0 -2
- package/dist/es5/lib/batches/table-batch-builder.js +0 -207
- package/dist/es5/lib/batches/table-batch-builder.js.map +0 -1
- package/dist/es5/lib/schema/impl/enum.js +0 -56
- package/dist/es5/lib/schema/impl/enum.js.map +0 -1
- package/dist/es5/lib/schema/impl/field.js +0 -56
- package/dist/es5/lib/schema/impl/field.js.map +0 -1
- package/dist/es5/lib/schema/impl/schema.js +0 -168
- package/dist/es5/lib/schema/impl/schema.js.map +0 -1
- package/dist/es5/lib/schema/impl/type.js +0 -927
- package/dist/es5/lib/schema/impl/type.js.map +0 -1
- package/dist/es5/lib/schema/schema.js +0 -236
- package/dist/es5/lib/schema/schema.js.map +0 -1
- package/dist/es5/lib/schema-utils/deduce-column-type.js +0 -32
- package/dist/es5/lib/schema-utils/deduce-column-type.js.map +0 -1
- package/dist/es5/lib/utils/assert.js +0 -13
- package/dist/es5/lib/utils/assert.js.map +0 -1
- package/dist/es5/lib/utils/async-queue.js +0 -213
- package/dist/es5/lib/utils/async-queue.js.map +0 -1
- package/dist/es5/lib/utils/row-utils.js +0 -44
- package/dist/es5/lib/utils/row-utils.js.map +0 -1
- package/dist/es5/types.js +0 -2
- package/dist/esm/bundle.js +0 -5
- package/dist/esm/bundle.js.map +0 -1
- package/dist/esm/category/common.js +0 -2
- package/dist/esm/category/gis.js +0 -2
- package/dist/esm/category/mesh/convert-mesh.js +0 -26
- package/dist/esm/category/mesh/convert-mesh.js.map +0 -1
- package/dist/esm/category/mesh/deduce-mesh-schema.js +0 -42
- package/dist/esm/category/mesh/deduce-mesh-schema.js.map +0 -1
- package/dist/esm/category/mesh/mesh-to-arrow-table.js +0 -2
- package/dist/esm/category/mesh/mesh-to-arrow-table.js.map +0 -1
- package/dist/esm/category/mesh/mesh-types.js +0 -2
- package/dist/esm/category/mesh/mesh-types.js.map +0 -1
- package/dist/esm/category/mesh/mesh-utils.js +0 -38
- package/dist/esm/category/mesh/mesh-utils.js.map +0 -1
- package/dist/esm/category/table/deduce-table-schema.js +0 -51
- package/dist/esm/category/table/deduce-table-schema.js.map +0 -1
- package/dist/esm/category/table/table-types.js +0 -2
- package/dist/esm/category/table/table-types.js.map +0 -1
- package/dist/esm/index.js +0 -13
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lib/arrow/arrow-like-type-utils.js +0 -32
- package/dist/esm/lib/arrow/arrow-like-type-utils.js.map +0 -1
- package/dist/esm/lib/arrow/arrow-type-utils.js +0 -2
- package/dist/esm/lib/arrow/arrow-type-utils.js.map +0 -1
- package/dist/esm/lib/arrow/get-type-info.js +0 -24
- package/dist/esm/lib/arrow/get-type-info.js.map +0 -1
- package/dist/esm/lib/batches/base-table-batch-aggregator.js +0 -74
- package/dist/esm/lib/batches/base-table-batch-aggregator.js.map +0 -1
- package/dist/esm/lib/batches/columnar-table-batch-aggregator.js +0 -100
- package/dist/esm/lib/batches/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/esm/lib/batches/row-table-batch-aggregator.js +0 -95
- package/dist/esm/lib/batches/row-table-batch-aggregator.js.map +0 -1
- package/dist/esm/lib/batches/table-batch-aggregator.js +0 -2
- package/dist/esm/lib/batches/table-batch-aggregator.js.map +0 -1
- package/dist/esm/lib/batches/table-batch-builder.js +0 -182
- package/dist/esm/lib/batches/table-batch-builder.js.map +0 -1
- package/dist/esm/lib/schema/impl/enum.js +0 -49
- package/dist/esm/lib/schema/impl/enum.js.map +0 -1
- package/dist/esm/lib/schema/impl/field.js +0 -35
- package/dist/esm/lib/schema/impl/field.js.map +0 -1
- package/dist/esm/lib/schema/impl/schema.js +0 -92
- package/dist/esm/lib/schema/impl/schema.js.map +0 -1
- package/dist/esm/lib/schema/impl/type.js +0 -498
- package/dist/esm/lib/schema/impl/type.js.map +0 -1
- package/dist/esm/lib/schema/schema.js +0 -5
- package/dist/esm/lib/schema/schema.js.map +0 -1
- package/dist/esm/lib/schema-utils/deduce-column-type.js +0 -23
- package/dist/esm/lib/schema-utils/deduce-column-type.js.map +0 -1
- package/dist/esm/lib/utils/assert.js +0 -6
- package/dist/esm/lib/utils/assert.js.map +0 -1
- package/dist/esm/lib/utils/async-queue.js +0 -119
- package/dist/esm/lib/utils/async-queue.js.map +0 -1
- package/dist/esm/lib/utils/row-utils.js +0 -35
- package/dist/esm/lib/utils/row-utils.js.map +0 -1
- package/dist/esm/types.js +0 -2
- package/dist/esm/types.js.map +0 -1
|
@@ -1,462 +1,498 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
|
|
3
|
+
let _Symbol$toStringTag, _Symbol$toStringTag2, _Symbol$toStringTag3, _Symbol$toStringTag4, _Symbol$toStringTag5, _Symbol$toStringTag6, _Symbol$toStringTag7, _Symbol$toStringTag8;
|
|
4
|
+
|
|
5
|
+
import { Type } from './enum';
|
|
6
|
+
export { Type } from './enum';
|
|
7
|
+
export class DataType {
|
|
8
|
+
static isNull(x) {
|
|
9
|
+
return x && x.typeId === Type.Null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static isInt(x) {
|
|
13
|
+
return x && x.typeId === Type.Int;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static isFloat(x) {
|
|
17
|
+
return x && x.typeId === Type.Float;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static isBinary(x) {
|
|
21
|
+
return x && x.typeId === Type.Binary;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static isUtf8(x) {
|
|
25
|
+
return x && x.typeId === Type.Utf8;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static isBool(x) {
|
|
29
|
+
return x && x.typeId === Type.Bool;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static isDecimal(x) {
|
|
33
|
+
return x && x.typeId === Type.Decimal;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static isDate(x) {
|
|
37
|
+
return x && x.typeId === Type.Date;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static isTime(x) {
|
|
41
|
+
return x && x.typeId === Type.Time;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static isTimestamp(x) {
|
|
45
|
+
return x && x.typeId === Type.Timestamp;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static isInterval(x) {
|
|
49
|
+
return x && x.typeId === Type.Interval;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static isList(x) {
|
|
53
|
+
return x && x.typeId === Type.List;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static isStruct(x) {
|
|
57
|
+
return x && x.typeId === Type.Struct;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
static isUnion(x) {
|
|
61
|
+
return x && x.typeId === Type.Union;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
static isFixedSizeBinary(x) {
|
|
65
|
+
return x && x.typeId === Type.FixedSizeBinary;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static isFixedSizeList(x) {
|
|
69
|
+
return x && x.typeId === Type.FixedSizeList;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
static isMap(x) {
|
|
73
|
+
return x && x.typeId === Type.Map;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
static isDictionary(x) {
|
|
77
|
+
return x && x.typeId === Type.Dictionary;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
get typeId() {
|
|
81
|
+
return Type.NONE;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
compareTo(other) {
|
|
85
|
+
return this === other;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
export class Null extends DataType {
|
|
90
|
+
get typeId() {
|
|
91
|
+
return Type.Null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
get [Symbol.toStringTag]() {
|
|
95
|
+
return 'Null';
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
toString() {
|
|
99
|
+
return 'Null';
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
}
|
|
103
|
+
export class Bool extends DataType {
|
|
104
|
+
get typeId() {
|
|
105
|
+
return Type.Bool;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
get [Symbol.toStringTag]() {
|
|
109
|
+
return 'Bool';
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
toString() {
|
|
113
|
+
return 'Bool';
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
_Symbol$toStringTag = Symbol.toStringTag;
|
|
118
|
+
export class Int extends DataType {
|
|
119
|
+
constructor(isSigned, bitWidth) {
|
|
120
|
+
super();
|
|
121
|
+
|
|
122
|
+
_defineProperty(this, "isSigned", void 0);
|
|
123
|
+
|
|
124
|
+
_defineProperty(this, "bitWidth", void 0);
|
|
125
|
+
|
|
126
|
+
this.isSigned = isSigned;
|
|
127
|
+
this.bitWidth = bitWidth;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
get typeId() {
|
|
131
|
+
return Type.Int;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
get [_Symbol$toStringTag]() {
|
|
135
|
+
return 'Int';
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
toString() {
|
|
139
|
+
return "".concat(this.isSigned ? 'I' : 'Ui', "nt").concat(this.bitWidth);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
}
|
|
143
|
+
export class Int8 extends Int {
|
|
144
|
+
constructor() {
|
|
145
|
+
super(true, 8);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
}
|
|
149
|
+
export class Int16 extends Int {
|
|
150
|
+
constructor() {
|
|
151
|
+
super(true, 16);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
}
|
|
155
|
+
export class Int32 extends Int {
|
|
156
|
+
constructor() {
|
|
157
|
+
super(true, 32);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
}
|
|
161
|
+
export class Int64 extends Int {
|
|
162
|
+
constructor() {
|
|
163
|
+
super(true, 64);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
}
|
|
167
|
+
export class Uint8 extends Int {
|
|
168
|
+
constructor() {
|
|
169
|
+
super(false, 8);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
}
|
|
173
|
+
export class Uint16 extends Int {
|
|
174
|
+
constructor() {
|
|
175
|
+
super(false, 16);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
}
|
|
179
|
+
export class Uint32 extends Int {
|
|
180
|
+
constructor() {
|
|
181
|
+
super(false, 32);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
}
|
|
185
|
+
export class Uint64 extends Int {
|
|
186
|
+
constructor() {
|
|
187
|
+
super(false, 64);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
}
|
|
187
191
|
const Precision = {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
192
|
+
HALF: 16,
|
|
193
|
+
SINGLE: 32,
|
|
194
|
+
DOUBLE: 64
|
|
191
195
|
};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
return 'Utf8';
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
exports.Utf8 = Utf8;
|
|
269
|
-
// DATES, TIMES AND INTERVALS
|
|
196
|
+
_Symbol$toStringTag2 = Symbol.toStringTag;
|
|
197
|
+
export class Float extends DataType {
|
|
198
|
+
constructor(precision) {
|
|
199
|
+
super();
|
|
200
|
+
|
|
201
|
+
_defineProperty(this, "precision", void 0);
|
|
202
|
+
|
|
203
|
+
this.precision = precision;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
get typeId() {
|
|
207
|
+
return Type.Float;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
get [_Symbol$toStringTag2]() {
|
|
211
|
+
return 'Float';
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
toString() {
|
|
215
|
+
return "Float".concat(this.precision);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
}
|
|
219
|
+
export class Float16 extends Float {
|
|
220
|
+
constructor() {
|
|
221
|
+
super(Precision.HALF);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
}
|
|
225
|
+
export class Float32 extends Float {
|
|
226
|
+
constructor() {
|
|
227
|
+
super(Precision.SINGLE);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
}
|
|
231
|
+
export class Float64 extends Float {
|
|
232
|
+
constructor() {
|
|
233
|
+
super(Precision.DOUBLE);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
}
|
|
237
|
+
export class Binary extends DataType {
|
|
238
|
+
constructor() {
|
|
239
|
+
super();
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
get typeId() {
|
|
243
|
+
return Type.Binary;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
toString() {
|
|
247
|
+
return 'Binary';
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
get [Symbol.toStringTag]() {
|
|
251
|
+
return 'Binary';
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
}
|
|
255
|
+
export class Utf8 extends DataType {
|
|
256
|
+
get typeId() {
|
|
257
|
+
return Type.Utf8;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
get [Symbol.toStringTag]() {
|
|
261
|
+
return 'Utf8';
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
toString() {
|
|
265
|
+
return 'Utf8';
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
}
|
|
270
269
|
const DateUnit = {
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
DAY: 0,
|
|
271
|
+
MILLISECOND: 1
|
|
273
272
|
};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
273
|
+
_Symbol$toStringTag3 = Symbol.toStringTag;
|
|
274
|
+
export class Date extends DataType {
|
|
275
|
+
constructor(unit) {
|
|
276
|
+
super();
|
|
277
|
+
|
|
278
|
+
_defineProperty(this, "unit", void 0);
|
|
279
|
+
|
|
280
|
+
this.unit = unit;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
get typeId() {
|
|
284
|
+
return Type.Date;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
get [_Symbol$toStringTag3]() {
|
|
288
|
+
return 'Date';
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
toString() {
|
|
292
|
+
return "Date".concat((this.unit + 1) * 32, "<").concat(DateUnit[this.unit], ">");
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
}
|
|
296
|
+
export class DateDay extends Date {
|
|
297
|
+
constructor() {
|
|
298
|
+
super(DateUnit.DAY);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
}
|
|
302
|
+
export class DateMillisecond extends Date {
|
|
303
|
+
constructor() {
|
|
304
|
+
super(DateUnit.MILLISECOND);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
}
|
|
305
308
|
const TimeUnit = {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
309
|
+
SECOND: 1,
|
|
310
|
+
MILLISECOND: 1e3,
|
|
311
|
+
MICROSECOND: 1e6,
|
|
312
|
+
NANOSECOND: 1e9
|
|
310
313
|
};
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
|
|
314
|
+
_Symbol$toStringTag4 = Symbol.toStringTag;
|
|
315
|
+
export class Time extends DataType {
|
|
316
|
+
constructor(unit, bitWidth) {
|
|
317
|
+
super();
|
|
318
|
+
|
|
319
|
+
_defineProperty(this, "unit", void 0);
|
|
320
|
+
|
|
321
|
+
_defineProperty(this, "bitWidth", void 0);
|
|
322
|
+
|
|
323
|
+
this.unit = unit;
|
|
324
|
+
this.bitWidth = bitWidth;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
get typeId() {
|
|
328
|
+
return Type.Time;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
toString() {
|
|
332
|
+
return "Time".concat(this.bitWidth, "<").concat(TimeUnit[this.unit], ">");
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
get [_Symbol$toStringTag4]() {
|
|
336
|
+
return 'Time';
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
}
|
|
340
|
+
export class TimeSecond extends Time {
|
|
341
|
+
constructor() {
|
|
342
|
+
super(TimeUnit.SECOND, 32);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
}
|
|
346
|
+
export class TimeMillisecond extends Time {
|
|
347
|
+
constructor() {
|
|
348
|
+
super(TimeUnit.MILLISECOND, 32);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
}
|
|
352
|
+
_Symbol$toStringTag5 = Symbol.toStringTag;
|
|
353
|
+
export class Timestamp extends DataType {
|
|
354
|
+
constructor(unit, timezone = null) {
|
|
355
|
+
super();
|
|
356
|
+
|
|
357
|
+
_defineProperty(this, "unit", void 0);
|
|
358
|
+
|
|
359
|
+
_defineProperty(this, "timezone", void 0);
|
|
360
|
+
|
|
361
|
+
this.unit = unit;
|
|
362
|
+
this.timezone = timezone;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
get typeId() {
|
|
366
|
+
return Type.Timestamp;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
get [_Symbol$toStringTag5]() {
|
|
370
|
+
return 'Timestamp';
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
toString() {
|
|
374
|
+
return "Timestamp<".concat(TimeUnit[this.unit]).concat(this.timezone ? ", ".concat(this.timezone) : '', ">");
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
}
|
|
378
|
+
export class TimestampSecond extends Timestamp {
|
|
379
|
+
constructor(timezone = null) {
|
|
380
|
+
super(TimeUnit.SECOND, timezone);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
}
|
|
384
|
+
export class TimestampMillisecond extends Timestamp {
|
|
385
|
+
constructor(timezone = null) {
|
|
386
|
+
super(TimeUnit.MILLISECOND, timezone);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
}
|
|
390
|
+
export class TimestampMicrosecond extends Timestamp {
|
|
391
|
+
constructor(timezone = null) {
|
|
392
|
+
super(TimeUnit.MICROSECOND, timezone);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
}
|
|
396
|
+
export class TimestampNanosecond extends Timestamp {
|
|
397
|
+
constructor(timezone = null) {
|
|
398
|
+
super(TimeUnit.NANOSECOND, timezone);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
}
|
|
386
402
|
const IntervalUnit = {
|
|
387
|
-
|
|
388
|
-
|
|
403
|
+
DAY_TIME: 0,
|
|
404
|
+
YEAR_MONTH: 1
|
|
389
405
|
};
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
406
|
+
_Symbol$toStringTag6 = Symbol.toStringTag;
|
|
407
|
+
export class Interval extends DataType {
|
|
408
|
+
constructor(unit) {
|
|
409
|
+
super();
|
|
410
|
+
|
|
411
|
+
_defineProperty(this, "unit", void 0);
|
|
412
|
+
|
|
413
|
+
this.unit = unit;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
get typeId() {
|
|
417
|
+
return Type.Interval;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
get [_Symbol$toStringTag6]() {
|
|
421
|
+
return 'Interval';
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
toString() {
|
|
425
|
+
return "Interval<".concat(IntervalUnit[this.unit], ">");
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
}
|
|
429
|
+
export class IntervalDayTime extends Interval {
|
|
430
|
+
constructor() {
|
|
431
|
+
super(IntervalUnit.DAY_TIME);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
}
|
|
435
|
+
export class IntervalYearMonth extends Interval {
|
|
436
|
+
constructor() {
|
|
437
|
+
super(IntervalUnit.YEAR_MONTH);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
}
|
|
441
|
+
_Symbol$toStringTag7 = Symbol.toStringTag;
|
|
442
|
+
export class FixedSizeList extends DataType {
|
|
443
|
+
constructor(listSize, child) {
|
|
444
|
+
super();
|
|
445
|
+
|
|
446
|
+
_defineProperty(this, "listSize", void 0);
|
|
447
|
+
|
|
448
|
+
_defineProperty(this, "children", void 0);
|
|
449
|
+
|
|
450
|
+
this.listSize = listSize;
|
|
451
|
+
this.children = [child];
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
get typeId() {
|
|
455
|
+
return Type.FixedSizeList;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
get valueType() {
|
|
459
|
+
return this.children[0].type;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
get valueField() {
|
|
463
|
+
return this.children[0];
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
get [_Symbol$toStringTag7]() {
|
|
467
|
+
return 'FixedSizeList';
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
toString() {
|
|
471
|
+
return "FixedSizeList[".concat(this.listSize, "]<").concat(this.valueType, ">");
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
}
|
|
475
|
+
_Symbol$toStringTag8 = Symbol.toStringTag;
|
|
476
|
+
export class Struct extends DataType {
|
|
477
|
+
constructor(children) {
|
|
478
|
+
super();
|
|
479
|
+
|
|
480
|
+
_defineProperty(this, "children", void 0);
|
|
481
|
+
|
|
482
|
+
this.children = children;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
get typeId() {
|
|
486
|
+
return Type.Struct;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
toString() {
|
|
490
|
+
return "Struct<{".concat(this.children.map(f => "".concat(f.name, ":").concat(f.type)).join(', '), "}>");
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
get [_Symbol$toStringTag8]() {
|
|
494
|
+
return 'Struct';
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
}
|
|
498
|
+
//# sourceMappingURL=type.js.map
|