@loaders.gl/schema 3.1.0-alpha.1 → 3.1.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.d.ts +1 -0
- package/dist/category/common.d.ts +18 -0
- package/dist/category/gis.d.ts +50 -0
- package/dist/category/mesh/convert-mesh.d.ts +14 -0
- package/dist/category/mesh/deduce-mesh-schema.d.ts +23 -0
- package/dist/category/mesh/mesh-to-arrow-table.d.ts +10 -0
- package/dist/category/mesh/mesh-types.d.ts +49 -0
- package/dist/category/mesh/mesh-utils.d.ts +22 -0
- package/dist/category/table/deduce-table-schema.d.ts +8 -0
- package/dist/category/table/table-types.d.ts +75 -0
- package/dist/dist.min.js +1 -1
- package/dist/dist.min.js.map +1 -1
- package/dist/es5/bundle.js +7 -0
- package/dist/es5/bundle.js.map +1 -0
- package/dist/es5/category/common.js +2 -0
- package/dist/{category → es5/category}/common.js.map +0 -0
- package/dist/es5/category/gis.js +2 -0
- package/dist/{category → es5/category}/gis.js.map +0 -0
- package/dist/es5/category/mesh/convert-mesh.js +43 -0
- package/dist/{category → es5/category}/mesh/convert-mesh.js.map +1 -1
- package/dist/es5/category/mesh/deduce-mesh-schema.js +54 -0
- package/dist/es5/category/mesh/deduce-mesh-schema.js.map +1 -0
- package/dist/es5/category/mesh/mesh-to-arrow-table.js +41 -0
- package/dist/es5/category/mesh/mesh-to-arrow-table.js.map +1 -0
- package/dist/es5/category/mesh/mesh-types.js +2 -0
- package/dist/{category → es5/category}/mesh/mesh-types.js.map +0 -0
- package/dist/es5/category/mesh/mesh-utils.js +47 -0
- package/dist/es5/category/mesh/mesh-utils.js.map +1 -0
- package/dist/es5/category/table/deduce-table-schema.js +58 -0
- package/dist/es5/category/table/deduce-table-schema.js.map +1 -0
- package/dist/es5/category/table/table-types.js +2 -0
- package/dist/{category → es5/category}/table/table-types.js.map +0 -0
- package/dist/es5/index.js +344 -0
- package/dist/es5/index.js.map +1 -0
- package/dist/es5/lib/arrow/arrow-like-type-utils.js +40 -0
- package/dist/es5/lib/arrow/arrow-like-type-utils.js.map +1 -0
- package/dist/es5/lib/arrow/arrow-type-utils.js +72 -0
- package/dist/es5/lib/arrow/arrow-type-utils.js.map +1 -0
- package/dist/es5/lib/arrow/get-type-info.js +33 -0
- package/dist/es5/lib/arrow/get-type-info.js.map +1 -0
- package/dist/es5/lib/batches/base-table-batch-aggregator.js +81 -0
- package/dist/es5/lib/batches/base-table-batch-aggregator.js.map +1 -0
- package/dist/es5/lib/batches/columnar-table-batch-aggregator.js +109 -0
- package/dist/es5/lib/batches/columnar-table-batch-aggregator.js.map +1 -0
- package/dist/es5/lib/batches/row-table-batch-aggregator.js +102 -0
- package/dist/es5/lib/batches/row-table-batch-aggregator.js.map +1 -0
- package/dist/es5/lib/batches/table-batch-aggregator.js +2 -0
- package/dist/{lib → es5/lib}/batches/table-batch-aggregator.js.map +0 -0
- package/dist/es5/lib/batches/table-batch-builder.js +187 -0
- package/dist/es5/lib/batches/table-batch-builder.js.map +1 -0
- package/dist/es5/lib/schema/impl/enum.js +56 -0
- package/dist/es5/lib/schema/impl/enum.js.map +1 -0
- package/dist/es5/lib/schema/impl/field.js +43 -0
- package/dist/es5/lib/schema/impl/field.js.map +1 -0
- package/dist/es5/lib/schema/impl/schema.js +103 -0
- package/dist/es5/lib/schema/impl/schema.js.map +1 -0
- package/dist/es5/lib/schema/impl/type.js +594 -0
- package/dist/es5/lib/schema/impl/type.js.map +1 -0
- package/dist/es5/lib/schema/index.js +236 -0
- package/dist/es5/lib/schema/index.js.map +1 -0
- package/dist/es5/lib/schema-utils/deduce-column-type.js +32 -0
- package/dist/es5/lib/schema-utils/deduce-column-type.js.map +1 -0
- package/dist/es5/lib/utils/assert.js +13 -0
- package/dist/es5/lib/utils/assert.js.map +1 -0
- package/dist/es5/lib/utils/async-queue.js +130 -0
- package/dist/es5/lib/utils/async-queue.js.map +1 -0
- package/dist/es5/lib/utils/row-utils.js +44 -0
- package/dist/es5/lib/utils/row-utils.js.map +1 -0
- package/dist/es5/types.js +2 -0
- package/dist/{types.js.map → es5/types.js.map} +0 -0
- package/dist/esm/bundle.js +5 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/{category → esm/category}/common.js +0 -0
- package/dist/esm/category/common.js.map +1 -0
- package/dist/{category → esm/category}/gis.js +0 -0
- package/dist/esm/category/gis.js.map +1 -0
- package/dist/{category → esm/category}/mesh/convert-mesh.js +1 -1
- package/dist/esm/category/mesh/convert-mesh.js.map +1 -0
- package/dist/{category → esm/category}/mesh/deduce-mesh-schema.js +0 -0
- package/dist/esm/category/mesh/deduce-mesh-schema.js.map +1 -0
- package/dist/{category → esm/category}/mesh/mesh-to-arrow-table.js +1 -1
- package/dist/esm/category/mesh/mesh-to-arrow-table.js.map +1 -0
- package/dist/{category → esm/category}/mesh/mesh-types.js +0 -0
- package/dist/esm/category/mesh/mesh-types.js.map +1 -0
- package/dist/{category → esm/category}/mesh/mesh-utils.js +0 -0
- package/dist/esm/category/mesh/mesh-utils.js.map +1 -0
- package/dist/{category → esm/category}/table/deduce-table-schema.js +0 -0
- package/dist/esm/category/table/deduce-table-schema.js.map +1 -0
- package/dist/{category → esm/category}/table/table-types.js +0 -0
- package/dist/esm/category/table/table-types.js.map +1 -0
- package/dist/{index.js → esm/index.js} +0 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/{lib → esm/lib}/arrow/arrow-like-type-utils.js +0 -0
- package/dist/esm/lib/arrow/arrow-like-type-utils.js.map +1 -0
- package/dist/{lib → esm/lib}/arrow/arrow-type-utils.js +1 -1
- package/dist/esm/lib/arrow/arrow-type-utils.js.map +1 -0
- package/dist/{lib → esm/lib}/arrow/get-type-info.js +0 -0
- package/dist/esm/lib/arrow/get-type-info.js.map +1 -0
- package/dist/{lib → esm/lib}/batches/base-table-batch-aggregator.js +0 -0
- package/dist/esm/lib/batches/base-table-batch-aggregator.js.map +1 -0
- package/dist/{lib → esm/lib}/batches/columnar-table-batch-aggregator.js +0 -0
- package/dist/esm/lib/batches/columnar-table-batch-aggregator.js.map +1 -0
- package/dist/{lib → esm/lib}/batches/row-table-batch-aggregator.js +0 -0
- package/dist/esm/lib/batches/row-table-batch-aggregator.js.map +1 -0
- package/dist/{lib → esm/lib}/batches/table-batch-aggregator.js +0 -0
- package/dist/esm/lib/batches/table-batch-aggregator.js.map +1 -0
- package/dist/{lib → esm/lib}/batches/table-batch-builder.js +0 -0
- package/dist/esm/lib/batches/table-batch-builder.js.map +1 -0
- package/dist/{lib → esm/lib}/schema/impl/enum.js +0 -0
- package/dist/esm/lib/schema/impl/enum.js.map +1 -0
- package/dist/{lib → esm/lib}/schema/impl/field.js +1 -1
- package/dist/esm/lib/schema/impl/field.js.map +1 -0
- package/dist/{lib → esm/lib}/schema/impl/schema.js +0 -0
- package/dist/esm/lib/schema/impl/schema.js.map +1 -0
- package/dist/{lib → esm/lib}/schema/impl/type.js +8 -8
- package/dist/esm/lib/schema/impl/type.js.map +1 -0
- package/dist/{lib → esm/lib}/schema/index.js +0 -0
- package/dist/esm/lib/schema/index.js.map +1 -0
- package/dist/{lib → esm/lib}/schema-utils/deduce-column-type.js +0 -0
- package/dist/esm/lib/schema-utils/deduce-column-type.js.map +1 -0
- package/dist/{lib → esm/lib}/utils/assert.js +0 -0
- package/dist/esm/lib/utils/assert.js.map +1 -0
- package/dist/{lib → esm/lib}/utils/async-queue.js +0 -0
- package/dist/esm/lib/utils/async-queue.js.map +1 -0
- package/dist/{lib → esm/lib}/utils/row-utils.js +0 -0
- package/dist/esm/lib/utils/row-utils.js.map +1 -0
- package/dist/{types.js → esm/types.js} +0 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/lib/arrow/arrow-like-type-utils.d.ts +3 -0
- package/dist/lib/arrow/arrow-type-utils.d.ts +5 -0
- package/dist/lib/arrow/get-type-info.d.ts +13 -0
- package/dist/lib/batches/base-table-batch-aggregator.d.ts +18 -0
- package/dist/lib/batches/columnar-table-batch-aggregator.d.ts +22 -0
- package/dist/lib/batches/row-table-batch-aggregator.d.ts +21 -0
- package/dist/lib/batches/table-batch-aggregator.d.ts +24 -0
- package/dist/lib/batches/table-batch-builder.d.ts +52 -0
- package/dist/lib/schema/impl/enum.d.ts +91 -0
- package/dist/lib/schema/impl/field.d.ts +18 -0
- package/dist/lib/schema/impl/schema.d.ts +15 -0
- package/dist/lib/schema/impl/type.d.ts +175 -0
- package/dist/lib/schema/index.d.ts +4 -0
- package/dist/lib/schema-utils/deduce-column-type.d.ts +2 -0
- package/dist/lib/utils/assert.d.ts +1 -0
- package/dist/lib/utils/async-queue.d.ts +17 -0
- package/dist/lib/utils/row-utils.d.ts +8 -0
- package/dist/types.d.ts +7 -0
- package/package.json +7 -7
- package/src/bundle.ts +2 -3
- package/src/category/gis.ts +1 -0
- package/src/category/mesh/mesh-to-arrow-table.ts +1 -1
- package/src/category/table/table-types.ts +1 -1
- package/src/lib/arrow/arrow-type-utils.ts +1 -1
- package/dist/bundle.js +0 -7
- package/dist/bundle.js.map +0 -1
- package/dist/category/mesh/deduce-mesh-schema.js.map +0 -1
- package/dist/category/mesh/mesh-to-arrow-table.js.map +0 -1
- package/dist/category/mesh/mesh-utils.js.map +0 -1
- package/dist/category/table/deduce-table-schema.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/arrow/arrow-like-type-utils.js.map +0 -1
- package/dist/lib/arrow/arrow-type-utils.js.map +0 -1
- package/dist/lib/arrow/get-type-info.js.map +0 -1
- package/dist/lib/batches/base-table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/row-table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/table-batch-builder.js.map +0 -1
- package/dist/lib/schema/impl/enum.js.map +0 -1
- package/dist/lib/schema/impl/field.js.map +0 -1
- package/dist/lib/schema/impl/schema.js.map +0 -1
- package/dist/lib/schema/impl/type.js.map +0 -1
- package/dist/lib/schema/index.js.map +0 -1
- package/dist/lib/schema-utils/deduce-column-type.js.map +0 -1
- package/dist/lib/utils/assert.js.map +0 -1
- package/dist/lib/utils/async-queue.js.map +0 -1
- package/dist/lib/utils/row-utils.js.map +0 -1
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "TableBatchBuilder", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _tableBatchBuilder.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "RowTableBatchAggregator", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return _rowTableBatchAggregator.default;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "ColumnarTableBatchAggregator", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return _columnarTableBatchAggregator.default;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "convertToObjectRow", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return _rowUtils.convertToObjectRow;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "convertToArrayRow", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _rowUtils.convertToArrayRow;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "getMeshSize", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _meshUtils.getMeshSize;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "getMeshBoundingBox", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () {
|
|
47
|
+
return _meshUtils.getMeshBoundingBox;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "convertMesh", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () {
|
|
53
|
+
return _convertMesh.convertMesh;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "deduceMeshSchema", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () {
|
|
59
|
+
return _deduceMeshSchema.deduceMeshSchema;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "deduceMeshField", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () {
|
|
65
|
+
return _deduceMeshSchema.deduceMeshField;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "makeMeshAttributeMetadata", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () {
|
|
71
|
+
return _deduceMeshSchema.makeMeshAttributeMetadata;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "Schema", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function () {
|
|
77
|
+
return _schema.Schema;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "Field", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function () {
|
|
83
|
+
return _schema.Field;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "DataType", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () {
|
|
89
|
+
return _schema.DataType;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "Null", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function () {
|
|
95
|
+
return _schema.Null;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "Binary", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () {
|
|
101
|
+
return _schema.Binary;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(exports, "Bool", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function () {
|
|
107
|
+
return _schema.Bool;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "Int", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () {
|
|
113
|
+
return _schema.Int;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "Int8", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () {
|
|
119
|
+
return _schema.Int8;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
Object.defineProperty(exports, "Int16", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function () {
|
|
125
|
+
return _schema.Int16;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, "Int32", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function () {
|
|
131
|
+
return _schema.Int32;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
Object.defineProperty(exports, "Int64", {
|
|
135
|
+
enumerable: true,
|
|
136
|
+
get: function () {
|
|
137
|
+
return _schema.Int64;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, "Uint8", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function () {
|
|
143
|
+
return _schema.Uint8;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
Object.defineProperty(exports, "Uint16", {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
get: function () {
|
|
149
|
+
return _schema.Uint16;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
Object.defineProperty(exports, "Uint32", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function () {
|
|
155
|
+
return _schema.Uint32;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
Object.defineProperty(exports, "Uint64", {
|
|
159
|
+
enumerable: true,
|
|
160
|
+
get: function () {
|
|
161
|
+
return _schema.Uint64;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(exports, "Float", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function () {
|
|
167
|
+
return _schema.Float;
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
Object.defineProperty(exports, "Float16", {
|
|
171
|
+
enumerable: true,
|
|
172
|
+
get: function () {
|
|
173
|
+
return _schema.Float16;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
Object.defineProperty(exports, "Float32", {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: function () {
|
|
179
|
+
return _schema.Float32;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
Object.defineProperty(exports, "Float64", {
|
|
183
|
+
enumerable: true,
|
|
184
|
+
get: function () {
|
|
185
|
+
return _schema.Float64;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
Object.defineProperty(exports, "Utf8", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function () {
|
|
191
|
+
return _schema.Utf8;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
Object.defineProperty(exports, "Date", {
|
|
195
|
+
enumerable: true,
|
|
196
|
+
get: function () {
|
|
197
|
+
return _schema.Date;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
Object.defineProperty(exports, "DateDay", {
|
|
201
|
+
enumerable: true,
|
|
202
|
+
get: function () {
|
|
203
|
+
return _schema.DateDay;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
Object.defineProperty(exports, "DateMillisecond", {
|
|
207
|
+
enumerable: true,
|
|
208
|
+
get: function () {
|
|
209
|
+
return _schema.DateMillisecond;
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
Object.defineProperty(exports, "Time", {
|
|
213
|
+
enumerable: true,
|
|
214
|
+
get: function () {
|
|
215
|
+
return _schema.Time;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
Object.defineProperty(exports, "TimeMillisecond", {
|
|
219
|
+
enumerable: true,
|
|
220
|
+
get: function () {
|
|
221
|
+
return _schema.TimeMillisecond;
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
Object.defineProperty(exports, "TimeSecond", {
|
|
225
|
+
enumerable: true,
|
|
226
|
+
get: function () {
|
|
227
|
+
return _schema.TimeSecond;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
Object.defineProperty(exports, "Timestamp", {
|
|
231
|
+
enumerable: true,
|
|
232
|
+
get: function () {
|
|
233
|
+
return _schema.Timestamp;
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
Object.defineProperty(exports, "TimestampSecond", {
|
|
237
|
+
enumerable: true,
|
|
238
|
+
get: function () {
|
|
239
|
+
return _schema.TimestampSecond;
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
Object.defineProperty(exports, "TimestampMillisecond", {
|
|
243
|
+
enumerable: true,
|
|
244
|
+
get: function () {
|
|
245
|
+
return _schema.TimestampMillisecond;
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
Object.defineProperty(exports, "TimestampMicrosecond", {
|
|
249
|
+
enumerable: true,
|
|
250
|
+
get: function () {
|
|
251
|
+
return _schema.TimestampMicrosecond;
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
Object.defineProperty(exports, "TimestampNanosecond", {
|
|
255
|
+
enumerable: true,
|
|
256
|
+
get: function () {
|
|
257
|
+
return _schema.TimestampNanosecond;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
Object.defineProperty(exports, "Interval", {
|
|
261
|
+
enumerable: true,
|
|
262
|
+
get: function () {
|
|
263
|
+
return _schema.Interval;
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
Object.defineProperty(exports, "IntervalDayTime", {
|
|
267
|
+
enumerable: true,
|
|
268
|
+
get: function () {
|
|
269
|
+
return _schema.IntervalDayTime;
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
Object.defineProperty(exports, "IntervalYearMonth", {
|
|
273
|
+
enumerable: true,
|
|
274
|
+
get: function () {
|
|
275
|
+
return _schema.IntervalYearMonth;
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
Object.defineProperty(exports, "FixedSizeList", {
|
|
279
|
+
enumerable: true,
|
|
280
|
+
get: function () {
|
|
281
|
+
return _schema.FixedSizeList;
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
Object.defineProperty(exports, "Struct", {
|
|
285
|
+
enumerable: true,
|
|
286
|
+
get: function () {
|
|
287
|
+
return _schema.Struct;
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
Object.defineProperty(exports, "deduceTypeFromColumn", {
|
|
291
|
+
enumerable: true,
|
|
292
|
+
get: function () {
|
|
293
|
+
return _deduceColumnType.deduceTypeFromColumn;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
Object.defineProperty(exports, "deduceTypeFromValue", {
|
|
297
|
+
enumerable: true,
|
|
298
|
+
get: function () {
|
|
299
|
+
return _deduceColumnType.deduceTypeFromValue;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
Object.defineProperty(exports, "getTypeInfo", {
|
|
303
|
+
enumerable: true,
|
|
304
|
+
get: function () {
|
|
305
|
+
return _getTypeInfo.getTypeInfo;
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
Object.defineProperty(exports, "getArrowTypeFromTypedArray", {
|
|
309
|
+
enumerable: true,
|
|
310
|
+
get: function () {
|
|
311
|
+
return _arrowLikeTypeUtils.getArrowTypeFromTypedArray;
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
Object.defineProperty(exports, "AsyncQueue", {
|
|
315
|
+
enumerable: true,
|
|
316
|
+
get: function () {
|
|
317
|
+
return _asyncQueue.default;
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
var _tableBatchBuilder = _interopRequireDefault(require("./lib/batches/table-batch-builder"));
|
|
322
|
+
|
|
323
|
+
var _rowTableBatchAggregator = _interopRequireDefault(require("./lib/batches/row-table-batch-aggregator"));
|
|
324
|
+
|
|
325
|
+
var _columnarTableBatchAggregator = _interopRequireDefault(require("./lib/batches/columnar-table-batch-aggregator"));
|
|
326
|
+
|
|
327
|
+
var _rowUtils = require("./lib/utils/row-utils");
|
|
328
|
+
|
|
329
|
+
var _meshUtils = require("./category/mesh/mesh-utils");
|
|
330
|
+
|
|
331
|
+
var _convertMesh = require("./category/mesh/convert-mesh");
|
|
332
|
+
|
|
333
|
+
var _deduceMeshSchema = require("./category/mesh/deduce-mesh-schema");
|
|
334
|
+
|
|
335
|
+
var _schema = require("./lib/schema");
|
|
336
|
+
|
|
337
|
+
var _deduceColumnType = require("./lib/schema-utils/deduce-column-type");
|
|
338
|
+
|
|
339
|
+
var _getTypeInfo = require("./lib/arrow/get-type-info");
|
|
340
|
+
|
|
341
|
+
var _arrowLikeTypeUtils = require("./lib/arrow/arrow-like-type-utils");
|
|
342
|
+
|
|
343
|
+
var _asyncQueue = _interopRequireDefault(require("./lib/utils/async-queue"));
|
|
344
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA;;AAEA;;AACA;;AAEA;;AAYA;;AACA;;AACA;;AAmCA;;AA0CA;;AACA;;AACA;;AAEA","sourcesContent":["// COMMON CATEGORY\nexport type {TypedArray, NumberArray, AnyArray} from './types';\n\nexport type {Batch} from './category/common';\n\n// TABLE CATEGORY TYPES\n\nexport type {\n Table,\n ArrayRowTable,\n ObjectRowTable,\n ColumnarTable,\n ArrowTable\n} from './category/table/table-types';\nexport type {\n TableBatch,\n RowArrayTableBatch,\n RowObjectTableBatch,\n ColumnarTableBatch,\n ArrowTableBatch\n} from './category/table/table-types';\n\n// TABLE CATEGORY UTILS\nexport {default as TableBatchBuilder} from './lib/batches/table-batch-builder';\nexport type {TableBatchAggregator} from './lib/batches/table-batch-aggregator';\nexport {default as RowTableBatchAggregator} from './lib/batches/row-table-batch-aggregator';\nexport {default as ColumnarTableBatchAggregator} from './lib/batches/columnar-table-batch-aggregator';\n\nexport {convertToObjectRow, convertToArrayRow} from './lib/utils/row-utils';\n\n// MESH CATEGORY\nexport type {\n MeshTable,\n MeshArrowTable,\n Mesh,\n MeshGeometry,\n MeshAttribute,\n MeshAttributes\n} from './category/mesh/mesh-types';\n\nexport {getMeshSize, getMeshBoundingBox} from './category/mesh/mesh-utils';\nexport {convertMesh} from './category/mesh/convert-mesh';\nexport {\n deduceMeshSchema,\n deduceMeshField,\n makeMeshAttributeMetadata\n} from './category/mesh/deduce-mesh-schema';\n\n// TYPES\n// GIS CATEGORY - GEOJSON\nexport type {GeoJSON, Feature, Geometry, Position, GeoJsonProperties} from './category/gis';\nexport type {\n Point,\n MultiPoint,\n LineString,\n MultiLineString,\n Polygon,\n MultiPolygon\n} from './category/gis';\n\n// GIS CATEGORY - BINARY\nexport type {\n BinaryGeometryType,\n BinaryGeometry,\n BinaryPointGeometry,\n BinaryLineGeometry,\n BinaryPolygonGeometry,\n BinaryAttribute\n} from './category/gis';\nexport type {\n BinaryFeatures,\n BinaryPointFeatures,\n BinaryLineFeatures,\n BinaryPolygonFeatures\n} from './category/gis';\n\n// SCHEMA\nexport {\n Schema,\n Field,\n DataType,\n Null,\n Binary,\n Bool,\n Int,\n Int8,\n Int16,\n Int32,\n Int64,\n Uint8,\n Uint16,\n Uint32,\n Uint64,\n Float,\n Float16,\n Float32,\n Float64,\n Utf8,\n Date,\n DateDay,\n DateMillisecond,\n Time,\n TimeMillisecond,\n TimeSecond,\n Timestamp,\n TimestampSecond,\n TimestampMillisecond,\n TimestampMicrosecond,\n TimestampNanosecond,\n Interval,\n IntervalDayTime,\n IntervalYearMonth,\n FixedSizeList,\n Struct\n} from './lib/schema';\n\n// EXPERIMENTAL APIs\n\n// SCHEMA UTILS\nexport {deduceTypeFromColumn, deduceTypeFromValue} from './lib/schema-utils/deduce-column-type';\nexport {getTypeInfo} from './lib/arrow/get-type-info';\nexport {getArrowTypeFromTypedArray} from './lib/arrow/arrow-like-type-utils';\n\nexport {default as AsyncQueue} from './lib/utils/async-queue';\n"],"file":"index.js"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getArrowTypeFromTypedArray = getArrowTypeFromTypedArray;
|
|
7
|
+
|
|
8
|
+
var _schema = require("../schema");
|
|
9
|
+
|
|
10
|
+
function getArrowTypeFromTypedArray(array) {
|
|
11
|
+
switch (array.constructor) {
|
|
12
|
+
case Int8Array:
|
|
13
|
+
return new _schema.Int8();
|
|
14
|
+
|
|
15
|
+
case Uint8Array:
|
|
16
|
+
return new _schema.Uint8();
|
|
17
|
+
|
|
18
|
+
case Int16Array:
|
|
19
|
+
return new _schema.Int16();
|
|
20
|
+
|
|
21
|
+
case Uint16Array:
|
|
22
|
+
return new _schema.Uint16();
|
|
23
|
+
|
|
24
|
+
case Int32Array:
|
|
25
|
+
return new _schema.Int32();
|
|
26
|
+
|
|
27
|
+
case Uint32Array:
|
|
28
|
+
return new _schema.Uint32();
|
|
29
|
+
|
|
30
|
+
case Float32Array:
|
|
31
|
+
return new _schema.Float32();
|
|
32
|
+
|
|
33
|
+
case Float64Array:
|
|
34
|
+
return new _schema.Float64();
|
|
35
|
+
|
|
36
|
+
default:
|
|
37
|
+
throw new Error('array type not supported');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=arrow-like-type-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/arrow/arrow-like-type-utils.ts"],"names":["getArrowTypeFromTypedArray","array","constructor","Int8Array","Int8","Uint8Array","Uint8","Int16Array","Int16","Uint16Array","Uint16","Int32Array","Int32","Uint32Array","Uint32","Float32Array","Float32","Float64Array","Float64","Error"],"mappings":";;;;;;;AACA;;AAEO,SAASA,0BAAT,CAAoCC,KAApC,EAAiE;AACtE,UAAQA,KAAK,CAACC,WAAd;AACE,SAAKC,SAAL;AACE,aAAO,IAAIC,YAAJ,EAAP;;AACF,SAAKC,UAAL;AACE,aAAO,IAAIC,aAAJ,EAAP;;AACF,SAAKC,UAAL;AACE,aAAO,IAAIC,aAAJ,EAAP;;AACF,SAAKC,WAAL;AACE,aAAO,IAAIC,cAAJ,EAAP;;AACF,SAAKC,UAAL;AACE,aAAO,IAAIC,aAAJ,EAAP;;AACF,SAAKC,WAAL;AACE,aAAO,IAAIC,cAAJ,EAAP;;AACF,SAAKC,YAAL;AACE,aAAO,IAAIC,eAAJ,EAAP;;AACF,SAAKC,YAAL;AACE,aAAO,IAAIC,eAAJ,EAAP;;AACF;AACE,YAAM,IAAIC,KAAJ,CAAU,0BAAV,CAAN;AAlBJ;AAoBD","sourcesContent":["import type {TypedArray} from '../../types';\nimport {DataType, Float32, Float64, Int16, Int32, Int8, Uint16, Uint32, Uint8} from '../schema';\n\nexport function getArrowTypeFromTypedArray(array: TypedArray): DataType {\n switch (array.constructor) {\n case Int8Array:\n return new Int8();\n case Uint8Array:\n return new Uint8();\n case Int16Array:\n return new Int16();\n case Uint16Array:\n return new Uint16();\n case Int32Array:\n return new Int32();\n case Uint32Array:\n return new Uint32();\n case Float32Array:\n return new Float32();\n case Float64Array:\n return new Float64();\n default:\n throw new Error('array type not supported');\n }\n}\n"],"file":"arrow-like-type-utils.js"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getArrowType = getArrowType;
|
|
7
|
+
exports.getArrowVector = getArrowVector;
|
|
8
|
+
|
|
9
|
+
var _Arrow = require("apache-arrow/Arrow.dom");
|
|
10
|
+
|
|
11
|
+
function getArrowType(array) {
|
|
12
|
+
switch (array.constructor) {
|
|
13
|
+
case Int8Array:
|
|
14
|
+
return new _Arrow.Int8();
|
|
15
|
+
|
|
16
|
+
case Uint8Array:
|
|
17
|
+
return new _Arrow.Uint8();
|
|
18
|
+
|
|
19
|
+
case Int16Array:
|
|
20
|
+
return new _Arrow.Int16();
|
|
21
|
+
|
|
22
|
+
case Uint16Array:
|
|
23
|
+
return new _Arrow.Uint16();
|
|
24
|
+
|
|
25
|
+
case Int32Array:
|
|
26
|
+
return new _Arrow.Int32();
|
|
27
|
+
|
|
28
|
+
case Uint32Array:
|
|
29
|
+
return new _Arrow.Uint32();
|
|
30
|
+
|
|
31
|
+
case Float32Array:
|
|
32
|
+
return new _Arrow.Float32();
|
|
33
|
+
|
|
34
|
+
case Float64Array:
|
|
35
|
+
return new _Arrow.Float64();
|
|
36
|
+
|
|
37
|
+
default:
|
|
38
|
+
throw new Error('array type not supported');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function getArrowVector(array) {
|
|
43
|
+
switch (array.constructor) {
|
|
44
|
+
case Int8Array:
|
|
45
|
+
return _Arrow.Int8Vector.from(array);
|
|
46
|
+
|
|
47
|
+
case Uint8Array:
|
|
48
|
+
return _Arrow.Uint8Vector.from(array);
|
|
49
|
+
|
|
50
|
+
case Int16Array:
|
|
51
|
+
return _Arrow.Int16Vector.from(array);
|
|
52
|
+
|
|
53
|
+
case Uint16Array:
|
|
54
|
+
return _Arrow.Uint16Vector.from(array);
|
|
55
|
+
|
|
56
|
+
case Int32Array:
|
|
57
|
+
return _Arrow.Int32Vector.from(array);
|
|
58
|
+
|
|
59
|
+
case Uint32Array:
|
|
60
|
+
return _Arrow.Uint32Vector.from(array);
|
|
61
|
+
|
|
62
|
+
case Float32Array:
|
|
63
|
+
return _Arrow.Float32Vector.from(array);
|
|
64
|
+
|
|
65
|
+
case Float64Array:
|
|
66
|
+
return _Arrow.Float64Vector.from(array);
|
|
67
|
+
|
|
68
|
+
default:
|
|
69
|
+
throw new Error('array type not supported');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=arrow-type-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/arrow/arrow-type-utils.ts"],"names":["getArrowType","array","constructor","Int8Array","Int8","Uint8Array","Uint8","Int16Array","Int16","Uint16Array","Uint16","Int32Array","Int32","Uint32Array","Uint32","Float32Array","Float32","Float64Array","Float64","Error","getArrowVector","Int8Vector","from","Uint8Vector","Int16Vector","Uint16Vector","Int32Vector","Uint32Vector","Float32Vector","Float64Vector"],"mappings":";;;;;;;;AACA;;AAqBO,SAASA,YAAT,CAAsBC,KAAtB,EAAmD;AACxD,UAAQA,KAAK,CAACC,WAAd;AACE,SAAKC,SAAL;AACE,aAAO,IAAIC,WAAJ,EAAP;;AACF,SAAKC,UAAL;AACE,aAAO,IAAIC,YAAJ,EAAP;;AACF,SAAKC,UAAL;AACE,aAAO,IAAIC,YAAJ,EAAP;;AACF,SAAKC,WAAL;AACE,aAAO,IAAIC,aAAJ,EAAP;;AACF,SAAKC,UAAL;AACE,aAAO,IAAIC,YAAJ,EAAP;;AACF,SAAKC,WAAL;AACE,aAAO,IAAIC,aAAJ,EAAP;;AACF,SAAKC,YAAL;AACE,aAAO,IAAIC,cAAJ,EAAP;;AACF,SAAKC,YAAL;AACE,aAAO,IAAIC,cAAJ,EAAP;;AACF;AACE,YAAM,IAAIC,KAAJ,CAAU,0BAAV,CAAN;AAlBJ;AAoBD;;AAEM,SAASC,cAAT,CAAwBnB,KAAxB,EAA2D;AAChE,UAAQA,KAAK,CAACC,WAAd;AACE,SAAKC,SAAL;AACE,aAAOkB,kBAAWC,IAAX,CAAgBrB,KAAhB,CAAP;;AACF,SAAKI,UAAL;AACE,aAAOkB,mBAAYD,IAAZ,CAAiBrB,KAAjB,CAAP;;AACF,SAAKM,UAAL;AACE,aAAOiB,mBAAYF,IAAZ,CAAiBrB,KAAjB,CAAP;;AACF,SAAKQ,WAAL;AACE,aAAOgB,oBAAaH,IAAb,CAAkBrB,KAAlB,CAAP;;AACF,SAAKU,UAAL;AACE,aAAOe,mBAAYJ,IAAZ,CAAiBrB,KAAjB,CAAP;;AACF,SAAKY,WAAL;AACE,aAAOc,oBAAaL,IAAb,CAAkBrB,KAAlB,CAAP;;AACF,SAAKc,YAAL;AACE,aAAOa,qBAAcN,IAAd,CAAmBrB,KAAnB,CAAP;;AACF,SAAKgB,YAAL;AACE,aAAOY,qBAAcP,IAAd,CAAmBrB,KAAnB,CAAP;;AACF;AACE,YAAM,IAAIkB,KAAJ,CAAU,0BAAV,CAAN;AAlBJ;AAoBD","sourcesContent":["import type {TypedArray} from '../../types';\nimport {\n DataType,\n Float32,\n Float64,\n Int16,\n Int32,\n Int8,\n Uint16,\n Uint32,\n Uint8,\n Int8Vector,\n Uint8Vector,\n Int16Vector,\n Uint16Vector,\n Int32Vector,\n Uint32Vector,\n Float32Vector,\n Float64Vector\n} from 'apache-arrow/Arrow.dom';\nimport {AbstractVector} from 'apache-arrow/vector';\n\nexport function getArrowType(array: TypedArray): DataType {\n switch (array.constructor) {\n case Int8Array:\n return new Int8();\n case Uint8Array:\n return new Uint8();\n case Int16Array:\n return new Int16();\n case Uint16Array:\n return new Uint16();\n case Int32Array:\n return new Int32();\n case Uint32Array:\n return new Uint32();\n case Float32Array:\n return new Float32();\n case Float64Array:\n return new Float64();\n default:\n throw new Error('array type not supported');\n }\n}\n\nexport function getArrowVector(array: TypedArray): AbstractVector {\n switch (array.constructor) {\n case Int8Array:\n return Int8Vector.from(array);\n case Uint8Array:\n return Uint8Vector.from(array);\n case Int16Array:\n return Int16Vector.from(array);\n case Uint16Array:\n return Uint16Vector.from(array);\n case Int32Array:\n return Int32Vector.from(array);\n case Uint32Array:\n return Uint32Vector.from(array);\n case Float32Array:\n return Float32Vector.from(array);\n case Float64Array:\n return Float64Vector.from(array);\n default:\n throw new Error('array type not supported');\n }\n}\n"],"file":"arrow-type-utils.js"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTypeInfo = getTypeInfo;
|
|
7
|
+
|
|
8
|
+
var _schema = require("../schema");
|
|
9
|
+
|
|
10
|
+
function getTypeInfo(arrowTypeLike) {
|
|
11
|
+
return {
|
|
12
|
+
typeId: arrowTypeLike.typeId,
|
|
13
|
+
ArrayType: arrowTypeLike.ArrayType,
|
|
14
|
+
typeName: arrowTypeLike.toString(),
|
|
15
|
+
typeEnumName: getTypeKey(arrowTypeLike.typeId),
|
|
16
|
+
precision: arrowTypeLike.precision
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let ReverseType = null;
|
|
21
|
+
|
|
22
|
+
function getTypeKey(typeKey) {
|
|
23
|
+
if (!ReverseType) {
|
|
24
|
+
ReverseType = {};
|
|
25
|
+
|
|
26
|
+
for (const key in _schema.Type) {
|
|
27
|
+
ReverseType[_schema.Type[key]] = key;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return ReverseType[typeKey];
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=get-type-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/arrow/get-type-info.ts"],"names":["getTypeInfo","arrowTypeLike","typeId","ArrayType","typeName","toString","typeEnumName","getTypeKey","precision","ReverseType","typeKey","key","Type"],"mappings":";;;;;;;AAAA;;AAOO,SAASA,WAAT,CAAqBC,aAArB,EAML;AACA,SAAO;AACLC,IAAAA,MAAM,EAAED,aAAa,CAACC,MADjB;AAELC,IAAAA,SAAS,EAAEF,aAAa,CAACE,SAFpB;AAGLC,IAAAA,QAAQ,EAAEH,aAAa,CAACI,QAAd,EAHL;AAILC,IAAAA,YAAY,EAAEC,UAAU,CAACN,aAAa,CAACC,MAAf,CAJnB;AAKLM,IAAAA,SAAS,EAAEP,aAAa,CAACO;AALpB,GAAP;AAOD;;AAED,IAAIC,WAA2C,GAAG,IAAlD;;AAEA,SAASF,UAAT,CAAoBG,OAApB,EAA6B;AAC3B,MAAI,CAACD,WAAL,EAAkB;AAChBA,IAAAA,WAAW,GAAG,EAAd;;AACA,SAAK,MAAME,GAAX,IAAkBC,YAAlB,EAAwB;AACtBH,MAAAA,WAAW,CAACG,aAAKD,GAAL,CAAD,CAAX,GAAyBA,GAAzB;AACD;AACF;;AAED,SAAOF,WAAW,CAACC,OAAD,CAAlB;AACD","sourcesContent":["import {Type} from '../schema';\nimport {AnyArray} from '../../types';\n\n/**\n * Gets type information from an Arrow type object or \"mock\" Arrow type object\n * @param arrowTypeLike Arrow Type or type object of similar shape\n */\nexport function getTypeInfo(arrowTypeLike: any): {\n typeId: Type;\n ArrayType: AnyArray;\n typeName: string;\n typeEnumName?: string;\n precision?: number;\n} {\n return {\n typeId: arrowTypeLike.typeId,\n ArrayType: arrowTypeLike.ArrayType,\n typeName: arrowTypeLike.toString(),\n typeEnumName: getTypeKey(arrowTypeLike.typeId),\n precision: arrowTypeLike.precision\n };\n}\n\nlet ReverseType: {[key: string]: string} | null = null;\n\nfunction getTypeKey(typeKey) {\n if (!ReverseType) {\n ReverseType = {};\n for (const key in Type) {\n ReverseType[Type[key]] = key;\n }\n }\n\n return ReverseType[typeKey];\n}\n"],"file":"get-type-info.js"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
12
|
+
const DEFAULT_ROW_COUNT = 100;
|
|
13
|
+
|
|
14
|
+
class RowTableBatchAggregator {
|
|
15
|
+
constructor(schema, options) {
|
|
16
|
+
(0, _defineProperty2.default)(this, "schema", void 0);
|
|
17
|
+
(0, _defineProperty2.default)(this, "options", void 0);
|
|
18
|
+
(0, _defineProperty2.default)(this, "length", 0);
|
|
19
|
+
(0, _defineProperty2.default)(this, "rows", null);
|
|
20
|
+
(0, _defineProperty2.default)(this, "cursor", 0);
|
|
21
|
+
(0, _defineProperty2.default)(this, "_headers", []);
|
|
22
|
+
this.options = options;
|
|
23
|
+
this.schema = schema;
|
|
24
|
+
|
|
25
|
+
if (!Array.isArray(schema)) {
|
|
26
|
+
this._headers = [];
|
|
27
|
+
|
|
28
|
+
for (const key in schema) {
|
|
29
|
+
this._headers[schema[key].index] = schema[key].name;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
rowCount() {
|
|
35
|
+
return this.length;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
addArrayRow(row, cursor) {
|
|
39
|
+
if (Number.isFinite(cursor)) {
|
|
40
|
+
this.cursor = cursor;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
|
|
44
|
+
this.rows[this.length] = row;
|
|
45
|
+
this.length++;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
addObjectRow(row, cursor) {
|
|
49
|
+
if (Number.isFinite(cursor)) {
|
|
50
|
+
this.cursor = cursor;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
|
|
54
|
+
this.rows[this.length] = row;
|
|
55
|
+
this.length++;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
getBatch() {
|
|
59
|
+
let rows = this.rows;
|
|
60
|
+
|
|
61
|
+
if (!rows) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
rows = rows.slice(0, this.length);
|
|
66
|
+
this.rows = null;
|
|
67
|
+
const batch = {
|
|
68
|
+
shape: this.options.shape,
|
|
69
|
+
batchType: 'data',
|
|
70
|
+
data: rows,
|
|
71
|
+
length: this.length,
|
|
72
|
+
schema: this.schema,
|
|
73
|
+
cursor: this.cursor
|
|
74
|
+
};
|
|
75
|
+
return batch;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
exports.default = RowTableBatchAggregator;
|
|
81
|
+
//# sourceMappingURL=base-table-batch-aggregator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/batches/base-table-batch-aggregator.ts"],"names":["DEFAULT_ROW_COUNT","RowTableBatchAggregator","constructor","schema","options","Array","isArray","_headers","key","index","name","rowCount","length","addArrayRow","row","cursor","Number","isFinite","rows","addObjectRow","getBatch","slice","batch","shape","batchType","data"],"mappings":";;;;;;;;;;;AAIA,MAAMA,iBAAiB,GAAG,GAA1B;;AAEe,MAAMC,uBAAN,CAA8D;AAS3EC,EAAAA,WAAW,CAACC,MAAD,EAAiBC,OAAjB,EAA6C;AAAA;AAAA;AAAA,kDALvC,CAKuC;AAAA,gDAJnC,IAImC;AAAA,kDAHvC,CAGuC;AAAA,oDAF3B,EAE2B;AACtD,SAAKA,OAAL,GAAeA,OAAf;AACA,SAAKD,MAAL,GAAcA,MAAd;;AAIA,QAAI,CAACE,KAAK,CAACC,OAAN,CAAcH,MAAd,CAAL,EAA4B;AAC1B,WAAKI,QAAL,GAAgB,EAAhB;;AACA,WAAK,MAAMC,GAAX,IAAkBL,MAAlB,EAA0B;AACxB,aAAKI,QAAL,CAAcJ,MAAM,CAACK,GAAD,CAAN,CAAYC,KAA1B,IAAmCN,MAAM,CAACK,GAAD,CAAN,CAAYE,IAA/C;AACD;AACF;AACF;;AAEDC,EAAAA,QAAQ,GAAW;AACjB,WAAO,KAAKC,MAAZ;AACD;;AAEDC,EAAAA,WAAW,CAACC,GAAD,EAAaC,MAAb,EAAoC;AAC7C,QAAIC,MAAM,CAACC,QAAP,CAAgBF,MAAhB,CAAJ,EAA6B;AAC3B,WAAKA,MAAL,GAAcA,MAAd;AACD;;AAED,SAAKG,IAAL,GAAY,KAAKA,IAAL,IAAa,IAAIb,KAAJ,CAAUL,iBAAV,CAAzB;AACA,SAAKkB,IAAL,CAAU,KAAKN,MAAf,IAAyBE,GAAzB;AACA,SAAKF,MAAL;AACD;;AAEDO,EAAAA,YAAY,CAACL,GAAD,EAAmCC,MAAnC,EAA0D;AACpE,QAAIC,MAAM,CAACC,QAAP,CAAgBF,MAAhB,CAAJ,EAA6B;AAC3B,WAAKA,MAAL,GAAcA,MAAd;AACD;;AAED,SAAKG,IAAL,GAAY,KAAKA,IAAL,IAAa,IAAIb,KAAJ,CAAUL,iBAAV,CAAzB;AACA,SAAKkB,IAAL,CAAU,KAAKN,MAAf,IAAyBE,GAAzB;AACA,SAAKF,MAAL;AACD;;AAEDQ,EAAAA,QAAQ,GAAsB;AAC5B,QAAIF,IAAI,GAAG,KAAKA,IAAhB;;AACA,QAAI,CAACA,IAAL,EAAW;AACT,aAAO,IAAP;AACD;;AAEDA,IAAAA,IAAI,GAAGA,IAAI,CAACG,KAAL,CAAW,CAAX,EAAc,KAAKT,MAAnB,CAAP;AACA,SAAKM,IAAL,GAAY,IAAZ;AAEA,UAAMI,KAAiB,GAAG;AACxBC,MAAAA,KAAK,EAAE,KAAKnB,OAAL,CAAamB,KADI;AAExBC,MAAAA,SAAS,EAAE,MAFa;AAGxBC,MAAAA,IAAI,EAAEP,IAHkB;AAIxBN,MAAAA,MAAM,EAAE,KAAKA,MAJW;AAKxBT,MAAAA,MAAM,EAAE,KAAKA,MALW;AAMxBY,MAAAA,MAAM,EAAE,KAAKA;AANW,KAA1B;AASA,WAAOO,KAAP;AACD;;AAlE0E","sourcesContent":["import type {Schema} from '../schema';\nimport type {TableBatch} from '../../category/table/table-types';\nimport {TableBatchAggregator, TableBatchOptions} from './table-batch-aggregator';\n\nconst DEFAULT_ROW_COUNT = 100;\n\nexport default class RowTableBatchAggregator implements TableBatchAggregator {\n schema: Schema;\n options: TableBatchOptions;\n\n length: number = 0;\n rows: any[] | null = null;\n cursor: number = 0;\n private _headers: string[] = [];\n\n constructor(schema: Schema, options: TableBatchOptions) {\n this.options = options;\n this.schema = schema;\n\n // schema is an array if there're no headers\n // object if there are headers\n if (!Array.isArray(schema)) {\n this._headers = [];\n for (const key in schema) {\n this._headers[schema[key].index] = schema[key].name;\n }\n }\n }\n\n rowCount(): number {\n return this.length;\n }\n\n addArrayRow(row: any[], cursor?: number): void {\n if (Number.isFinite(cursor)) {\n this.cursor = cursor as number;\n }\n\n this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);\n this.rows[this.length] = row;\n this.length++;\n }\n\n addObjectRow(row: {[columnName: string]: any}, cursor?: number): void {\n if (Number.isFinite(cursor)) {\n this.cursor = cursor as number;\n }\n\n this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);\n this.rows[this.length] = row;\n this.length++;\n }\n\n getBatch(): TableBatch | null {\n let rows = this.rows;\n if (!rows) {\n return null;\n }\n\n rows = rows.slice(0, this.length);\n this.rows = null;\n\n const batch: TableBatch = {\n shape: this.options.shape,\n batchType: 'data',\n data: rows,\n length: this.length,\n schema: this.schema,\n cursor: this.cursor\n };\n\n return batch;\n }\n}\n"],"file":"base-table-batch-aggregator.js"}
|