@loaders.gl/arrow 4.0.1 → 4.0.2
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/arrow-worker.js +33 -25
- package/dist/arrow-writer.d.ts.map +1 -1
- package/dist/arrow-writer.js +6 -3
- package/dist/arrow-writer.js.map +1 -1
- package/dist/dist.dev.js +18 -14
- package/dist/geoarrow/convert-geoarrow-to-binary-geometry.d.ts +18 -2
- package/dist/geoarrow/convert-geoarrow-to-binary-geometry.d.ts.map +1 -1
- package/dist/geoarrow/convert-geoarrow-to-binary-geometry.js +8 -9
- package/dist/geoarrow/convert-geoarrow-to-binary-geometry.js.map +1 -1
- package/dist/geoarrow/convert-geoarrow-to-geojson.js.map +1 -1
- package/dist/geoarrow/get-arrow-bounds.d.ts.map +1 -1
- package/dist/geoarrow/get-arrow-bounds.js +1 -1
- package/dist/geoarrow/get-arrow-bounds.js.map +1 -1
- package/dist/index.cjs +135 -122
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/arrow-table-batch.d.ts +2 -2
- package/dist/lib/arrow-table-batch.d.ts.map +1 -1
- package/dist/lib/arrow-table-batch.js +7 -7
- package/dist/lib/arrow-table-batch.js.map +1 -1
- package/dist/lib/arrow-table.d.ts +3 -3
- package/dist/lib/arrow-table.d.ts.map +1 -1
- package/dist/lib/arrow-table.js.map +1 -1
- package/dist/lib/encode-arrow.js +5 -5
- package/dist/lib/encode-arrow.js.map +1 -1
- package/dist/lib/parse-arrow-in-batches.js +3 -3
- package/dist/lib/parse-arrow-in-batches.js.map +1 -1
- package/dist/lib/parse-arrow-sync.js +2 -2
- package/dist/lib/parse-arrow-sync.js.map +1 -1
- package/dist/schema/arrow-type-utils.d.ts +2 -2
- package/dist/schema/arrow-type-utils.d.ts.map +1 -1
- package/dist/schema/arrow-type-utils.js +9 -9
- package/dist/schema/arrow-type-utils.js.map +1 -1
- package/dist/schema/convert-arrow-schema.d.ts +7 -7
- package/dist/schema/convert-arrow-schema.d.ts.map +1 -1
- package/dist/schema/convert-arrow-schema.js +81 -81
- package/dist/schema/convert-arrow-schema.js.map +1 -1
- package/dist/tables/convert-arrow-to-table.d.ts +2 -2
- package/dist/tables/convert-arrow-to-table.d.ts.map +1 -1
- package/dist/tables/convert-arrow-to-table.js.map +1 -1
- package/package.json +5 -5
- package/src/arrow-writer.ts +6 -3
- package/src/geoarrow/convert-geoarrow-to-binary-geometry.ts +14 -16
- package/src/geoarrow/convert-geoarrow-to-geojson.ts +7 -7
- package/src/geoarrow/get-arrow-bounds.ts +1 -2
- package/src/index.ts +6 -1
- package/src/lib/arrow-table-batch.ts +13 -23
- package/src/lib/arrow-table.ts +3 -3
- package/src/lib/encode-arrow.ts +8 -8
- package/src/lib/parse-arrow-in-batches.ts +4 -4
- package/src/lib/parse-arrow-sync.ts +2 -2
- package/src/schema/arrow-type-utils.ts +10 -29
- package/src/schema/convert-arrow-schema.ts +98 -142
- package/src/tables/convert-arrow-to-table.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/index.ts
|
|
@@ -23,6 +33,7 @@ __export(src_exports, {
|
|
|
23
33
|
ArrowLoader: () => ArrowLoader2,
|
|
24
34
|
ArrowWorkerLoader: () => ArrowLoader,
|
|
25
35
|
ArrowWriter: () => ArrowWriter,
|
|
36
|
+
BINARY_GEOMETRY_TEMPLATE: () => BINARY_GEOMETRY_TEMPLATE,
|
|
26
37
|
VECTOR_TYPES: () => VECTOR_TYPES,
|
|
27
38
|
deserializeArrowField: () => deserializeArrowField,
|
|
28
39
|
deserializeArrowMetadata: () => deserializeArrowMetadata,
|
|
@@ -34,7 +45,8 @@ __export(src_exports, {
|
|
|
34
45
|
serializeArrowField: () => serializeArrowField,
|
|
35
46
|
serializeArrowMetadata: () => serializeArrowMetadata,
|
|
36
47
|
serializeArrowSchema: () => serializeArrowSchema,
|
|
37
|
-
serializeArrowType: () => serializeArrowType
|
|
48
|
+
serializeArrowType: () => serializeArrowType,
|
|
49
|
+
updateBoundsFromGeoArrowSamples: () => updateBoundsFromGeoArrowSamples
|
|
38
50
|
});
|
|
39
51
|
module.exports = __toCommonJS(src_exports);
|
|
40
52
|
var import_schema3 = require("@loaders.gl/schema");
|
|
@@ -65,7 +77,7 @@ var ArrowLoader = {
|
|
|
65
77
|
|
|
66
78
|
// src/lib/parse-arrow-sync.ts
|
|
67
79
|
var import_schema = require("@loaders.gl/schema");
|
|
68
|
-
var
|
|
80
|
+
var arrow = __toESM(require("apache-arrow"), 1);
|
|
69
81
|
|
|
70
82
|
// src/tables/convert-arrow-to-table.ts
|
|
71
83
|
function convertApacheArrowToArrowTable(arrowTable) {
|
|
@@ -91,7 +103,7 @@ function convertArrowToColumnarTable(table) {
|
|
|
91
103
|
// src/lib/parse-arrow-sync.ts
|
|
92
104
|
function parseArrowSync(arrayBuffer, options) {
|
|
93
105
|
var _a;
|
|
94
|
-
const apacheArrowTable =
|
|
106
|
+
const apacheArrowTable = arrow.tableFromIPC([new Uint8Array(arrayBuffer)]);
|
|
95
107
|
const arrowTable = convertApacheArrowToArrowTable(apacheArrowTable);
|
|
96
108
|
const shape = ((_a = options == null ? void 0 : options.arrow) == null ? void 0 : _a.shape) || "arrow-table";
|
|
97
109
|
switch (shape) {
|
|
@@ -108,16 +120,16 @@ function parseArrowSync(arrayBuffer, options) {
|
|
|
108
120
|
}
|
|
109
121
|
|
|
110
122
|
// src/lib/parse-arrow-in-batches.ts
|
|
111
|
-
var
|
|
123
|
+
var arrow2 = __toESM(require("apache-arrow"), 1);
|
|
112
124
|
function parseArrowInBatches(asyncIterator) {
|
|
113
125
|
async function* makeArrowAsyncIterator() {
|
|
114
|
-
const readers =
|
|
126
|
+
const readers = arrow2.RecordBatchReader.readAll(asyncIterator);
|
|
115
127
|
for await (const reader of readers) {
|
|
116
128
|
for await (const recordBatch of reader) {
|
|
117
129
|
const arrowTabledBatch = {
|
|
118
130
|
shape: "arrow-table",
|
|
119
131
|
batchType: "data",
|
|
120
|
-
data: new
|
|
132
|
+
data: new arrow2.Table([recordBatch]),
|
|
121
133
|
length: recordBatch.data.length
|
|
122
134
|
};
|
|
123
135
|
yield arrowTabledBatch;
|
|
@@ -130,7 +142,7 @@ function parseArrowInBatches(asyncIterator) {
|
|
|
130
142
|
|
|
131
143
|
// src/lib/arrow-table-batch.ts
|
|
132
144
|
var import_schema2 = require("@loaders.gl/schema");
|
|
133
|
-
var
|
|
145
|
+
var arrow3 = __toESM(require("apache-arrow"), 1);
|
|
134
146
|
var ArrowTableBatchAggregator = class extends import_schema2.ColumnarTableBatchAggregator {
|
|
135
147
|
constructor(schema, options) {
|
|
136
148
|
super(schema, options);
|
|
@@ -141,17 +153,17 @@ var ArrowTableBatchAggregator = class extends import_schema2.ColumnarTableBatchA
|
|
|
141
153
|
if (batch) {
|
|
142
154
|
this.arrowSchema = this.arrowSchema || getArrowSchema(batch.schema);
|
|
143
155
|
const arrowVectors = getArrowVectors(this.arrowSchema, batch.data);
|
|
144
|
-
const recordBatch = new
|
|
156
|
+
const recordBatch = new arrow3.RecordBatch(
|
|
145
157
|
this.arrowSchema,
|
|
146
|
-
|
|
147
|
-
type: new
|
|
158
|
+
arrow3.makeData({
|
|
159
|
+
type: new arrow3.Struct(this.arrowSchema.fields),
|
|
148
160
|
children: arrowVectors.map(({ data }) => data[0])
|
|
149
161
|
})
|
|
150
162
|
);
|
|
151
163
|
return {
|
|
152
164
|
shape: "arrow-table",
|
|
153
165
|
batchType: "data",
|
|
154
|
-
data: new
|
|
166
|
+
data: new arrow3.Table([recordBatch]),
|
|
155
167
|
length: batch.length
|
|
156
168
|
};
|
|
157
169
|
}
|
|
@@ -164,21 +176,21 @@ function getArrowSchema(schema) {
|
|
|
164
176
|
const field = schema[key];
|
|
165
177
|
if (field.type === Float32Array) {
|
|
166
178
|
const metadata = /* @__PURE__ */ new Map();
|
|
167
|
-
const arrowField = new
|
|
179
|
+
const arrowField = new arrow3.Field(field.name, new arrow3.Float32(), field.nullable, metadata);
|
|
168
180
|
arrowFields.push(arrowField);
|
|
169
181
|
}
|
|
170
182
|
}
|
|
171
183
|
if (arrowFields.length === 0) {
|
|
172
184
|
throw new Error("No arrow convertible fields");
|
|
173
185
|
}
|
|
174
|
-
return new
|
|
186
|
+
return new arrow3.Schema(arrowFields);
|
|
175
187
|
}
|
|
176
188
|
function getArrowVectors(arrowSchema, data) {
|
|
177
189
|
const arrowVectors = [];
|
|
178
190
|
for (const field of arrowSchema.fields) {
|
|
179
191
|
const vector = data[field.name];
|
|
180
192
|
if (vector instanceof Float32Array) {
|
|
181
|
-
const arrowVector =
|
|
193
|
+
const arrowVector = arrow3.makeVector(vector);
|
|
182
194
|
arrowVectors.push(arrowVector);
|
|
183
195
|
}
|
|
184
196
|
}
|
|
@@ -189,32 +201,32 @@ function getArrowVectors(arrowSchema, data) {
|
|
|
189
201
|
}
|
|
190
202
|
|
|
191
203
|
// src/schema/arrow-type-utils.ts
|
|
192
|
-
var
|
|
204
|
+
var arrow4 = __toESM(require("apache-arrow"), 1);
|
|
193
205
|
function getArrowType(array) {
|
|
194
206
|
switch (array.constructor) {
|
|
195
207
|
case Int8Array:
|
|
196
|
-
return new
|
|
208
|
+
return new arrow4.Int8();
|
|
197
209
|
case Uint8Array:
|
|
198
|
-
return new
|
|
210
|
+
return new arrow4.Uint8();
|
|
199
211
|
case Int16Array:
|
|
200
|
-
return new
|
|
212
|
+
return new arrow4.Int16();
|
|
201
213
|
case Uint16Array:
|
|
202
|
-
return new
|
|
214
|
+
return new arrow4.Uint16();
|
|
203
215
|
case Int32Array:
|
|
204
|
-
return new
|
|
216
|
+
return new arrow4.Int32();
|
|
205
217
|
case Uint32Array:
|
|
206
|
-
return new
|
|
218
|
+
return new arrow4.Uint32();
|
|
207
219
|
case Float32Array:
|
|
208
|
-
return new
|
|
220
|
+
return new arrow4.Float32();
|
|
209
221
|
case Float64Array:
|
|
210
|
-
return new
|
|
222
|
+
return new arrow4.Float64();
|
|
211
223
|
default:
|
|
212
224
|
throw new Error("array type not supported");
|
|
213
225
|
}
|
|
214
226
|
}
|
|
215
227
|
|
|
216
228
|
// src/schema/convert-arrow-schema.ts
|
|
217
|
-
var
|
|
229
|
+
var arrow5 = __toESM(require("apache-arrow"), 1);
|
|
218
230
|
function serializeArrowSchema(arrowSchema) {
|
|
219
231
|
return {
|
|
220
232
|
fields: arrowSchema.fields.map((arrowField) => serializeArrowField(arrowField)),
|
|
@@ -222,7 +234,7 @@ function serializeArrowSchema(arrowSchema) {
|
|
|
222
234
|
};
|
|
223
235
|
}
|
|
224
236
|
function deserializeArrowSchema(schema) {
|
|
225
|
-
return new
|
|
237
|
+
return new arrow5.Schema(
|
|
226
238
|
schema.fields.map((field) => deserializeArrowField(field)),
|
|
227
239
|
deserializeArrowMetadata(schema.metadata)
|
|
228
240
|
);
|
|
@@ -242,7 +254,7 @@ function serializeArrowField(field) {
|
|
|
242
254
|
};
|
|
243
255
|
}
|
|
244
256
|
function deserializeArrowField(field) {
|
|
245
|
-
return new
|
|
257
|
+
return new arrow5.Field(
|
|
246
258
|
field.name,
|
|
247
259
|
deserializeArrowType(field.type),
|
|
248
260
|
field.nullable,
|
|
@@ -251,124 +263,124 @@ function deserializeArrowField(field) {
|
|
|
251
263
|
}
|
|
252
264
|
function serializeArrowType(arrowType) {
|
|
253
265
|
switch (arrowType.constructor) {
|
|
254
|
-
case
|
|
266
|
+
case arrow5.Null:
|
|
255
267
|
return "null";
|
|
256
|
-
case
|
|
268
|
+
case arrow5.Binary:
|
|
257
269
|
return "binary";
|
|
258
|
-
case
|
|
270
|
+
case arrow5.Bool:
|
|
259
271
|
return "bool";
|
|
260
|
-
case
|
|
272
|
+
case arrow5.Int:
|
|
261
273
|
const intType = arrowType;
|
|
262
274
|
return `${intType.isSigned ? "u" : ""}int${intType.bitWidth}`;
|
|
263
|
-
case
|
|
275
|
+
case arrow5.Int8:
|
|
264
276
|
return "int8";
|
|
265
|
-
case
|
|
277
|
+
case arrow5.Int16:
|
|
266
278
|
return "int16";
|
|
267
|
-
case
|
|
279
|
+
case arrow5.Int32:
|
|
268
280
|
return "int32";
|
|
269
|
-
case
|
|
281
|
+
case arrow5.Int64:
|
|
270
282
|
return "int64";
|
|
271
|
-
case
|
|
283
|
+
case arrow5.Uint8:
|
|
272
284
|
return "uint8";
|
|
273
|
-
case
|
|
285
|
+
case arrow5.Uint16:
|
|
274
286
|
return "uint16";
|
|
275
|
-
case
|
|
287
|
+
case arrow5.Uint32:
|
|
276
288
|
return "uint32";
|
|
277
|
-
case
|
|
289
|
+
case arrow5.Uint64:
|
|
278
290
|
return "uint64";
|
|
279
|
-
case
|
|
291
|
+
case arrow5.Float:
|
|
280
292
|
const precision = arrowType.precision;
|
|
281
293
|
switch (precision) {
|
|
282
|
-
case
|
|
294
|
+
case arrow5.Precision.HALF:
|
|
283
295
|
return "float16";
|
|
284
|
-
case
|
|
296
|
+
case arrow5.Precision.SINGLE:
|
|
285
297
|
return "float32";
|
|
286
|
-
case
|
|
298
|
+
case arrow5.Precision.DOUBLE:
|
|
287
299
|
return "float64";
|
|
288
300
|
default:
|
|
289
301
|
return "float16";
|
|
290
302
|
}
|
|
291
|
-
case
|
|
303
|
+
case arrow5.Float16:
|
|
292
304
|
return "float16";
|
|
293
|
-
case
|
|
305
|
+
case arrow5.Float32:
|
|
294
306
|
return "float32";
|
|
295
|
-
case
|
|
307
|
+
case arrow5.Float64:
|
|
296
308
|
return "float64";
|
|
297
|
-
case
|
|
309
|
+
case arrow5.Utf8:
|
|
298
310
|
return "utf8";
|
|
299
311
|
case Date:
|
|
300
312
|
const dateUnit = arrowType.unit;
|
|
301
|
-
return dateUnit ===
|
|
302
|
-
case
|
|
313
|
+
return dateUnit === arrow5.DateUnit.DAY ? "date-day" : "date-millisecond";
|
|
314
|
+
case arrow5.DateDay:
|
|
303
315
|
return "date-day";
|
|
304
|
-
case
|
|
316
|
+
case arrow5.DateMillisecond:
|
|
305
317
|
return "date-millisecond";
|
|
306
|
-
case
|
|
318
|
+
case arrow5.Time:
|
|
307
319
|
const timeUnit = arrowType.unit;
|
|
308
320
|
switch (timeUnit) {
|
|
309
|
-
case
|
|
321
|
+
case arrow5.TimeUnit.SECOND:
|
|
310
322
|
return "time-second";
|
|
311
|
-
case
|
|
323
|
+
case arrow5.TimeUnit.MILLISECOND:
|
|
312
324
|
return "time-millisecond";
|
|
313
|
-
case
|
|
325
|
+
case arrow5.TimeUnit.MICROSECOND:
|
|
314
326
|
return "time-microsecond";
|
|
315
|
-
case
|
|
327
|
+
case arrow5.TimeUnit.NANOSECOND:
|
|
316
328
|
return "time-nanosecond";
|
|
317
329
|
default:
|
|
318
330
|
return "time-second";
|
|
319
331
|
}
|
|
320
|
-
case
|
|
332
|
+
case arrow5.TimeMillisecond:
|
|
321
333
|
return "time-millisecond";
|
|
322
|
-
case
|
|
334
|
+
case arrow5.TimeSecond:
|
|
323
335
|
return "time-second";
|
|
324
|
-
case
|
|
336
|
+
case arrow5.TimeMicrosecond:
|
|
325
337
|
return "time-microsecond";
|
|
326
|
-
case
|
|
338
|
+
case arrow5.TimeNanosecond:
|
|
327
339
|
return "time-nanosecond";
|
|
328
|
-
case
|
|
340
|
+
case arrow5.Timestamp:
|
|
329
341
|
const timeStampUnit = arrowType.unit;
|
|
330
342
|
switch (timeStampUnit) {
|
|
331
|
-
case
|
|
343
|
+
case arrow5.TimeUnit.SECOND:
|
|
332
344
|
return "timestamp-second";
|
|
333
|
-
case
|
|
345
|
+
case arrow5.TimeUnit.MILLISECOND:
|
|
334
346
|
return "timestamp-millisecond";
|
|
335
|
-
case
|
|
347
|
+
case arrow5.TimeUnit.MICROSECOND:
|
|
336
348
|
return "timestamp-microsecond";
|
|
337
|
-
case
|
|
349
|
+
case arrow5.TimeUnit.NANOSECOND:
|
|
338
350
|
return "timestamp-nanosecond";
|
|
339
351
|
default:
|
|
340
352
|
return "timestamp-second";
|
|
341
353
|
}
|
|
342
|
-
case
|
|
354
|
+
case arrow5.TimestampSecond:
|
|
343
355
|
return "timestamp-second";
|
|
344
|
-
case
|
|
356
|
+
case arrow5.TimestampMillisecond:
|
|
345
357
|
return "timestamp-millisecond";
|
|
346
|
-
case
|
|
358
|
+
case arrow5.TimestampMicrosecond:
|
|
347
359
|
return "timestamp-microsecond";
|
|
348
|
-
case
|
|
360
|
+
case arrow5.TimestampNanosecond:
|
|
349
361
|
return "timestamp-nanosecond";
|
|
350
|
-
case
|
|
362
|
+
case arrow5.Interval:
|
|
351
363
|
const intervalUnit = arrowType.unit;
|
|
352
364
|
switch (intervalUnit) {
|
|
353
|
-
case
|
|
365
|
+
case arrow5.IntervalUnit.DAY_TIME:
|
|
354
366
|
return "interval-daytime";
|
|
355
|
-
case
|
|
367
|
+
case arrow5.IntervalUnit.YEAR_MONTH:
|
|
356
368
|
return "interval-yearmonth";
|
|
357
369
|
default:
|
|
358
370
|
return "interval-daytime";
|
|
359
371
|
}
|
|
360
|
-
case
|
|
372
|
+
case arrow5.IntervalDayTime:
|
|
361
373
|
return "interval-daytime";
|
|
362
|
-
case
|
|
374
|
+
case arrow5.IntervalYearMonth:
|
|
363
375
|
return "interval-yearmonth";
|
|
364
|
-
case
|
|
376
|
+
case arrow5.List:
|
|
365
377
|
const listType = arrowType;
|
|
366
378
|
const listField = listType.valueField;
|
|
367
379
|
return {
|
|
368
380
|
type: "list",
|
|
369
381
|
children: [serializeArrowField(listField)]
|
|
370
382
|
};
|
|
371
|
-
case
|
|
383
|
+
case arrow5.FixedSizeList:
|
|
372
384
|
return {
|
|
373
385
|
type: "fixed-size-list",
|
|
374
386
|
listSize: arrowType.listSize,
|
|
@@ -383,72 +395,72 @@ function deserializeArrowType(dataType) {
|
|
|
383
395
|
switch (dataType.type) {
|
|
384
396
|
case "list":
|
|
385
397
|
const field = deserializeArrowField(dataType.children[0]);
|
|
386
|
-
return new
|
|
398
|
+
return new arrow5.List(field);
|
|
387
399
|
case "fixed-size-list":
|
|
388
400
|
const child = deserializeArrowField(dataType.children[0]);
|
|
389
|
-
return new
|
|
401
|
+
return new arrow5.FixedSizeList(dataType.listSize, child);
|
|
390
402
|
case "struct":
|
|
391
403
|
const children = dataType.children.map((arrowField) => deserializeArrowField(arrowField));
|
|
392
|
-
return new
|
|
404
|
+
return new arrow5.Struct(children);
|
|
393
405
|
default:
|
|
394
406
|
throw new Error("array type not supported");
|
|
395
407
|
}
|
|
396
408
|
}
|
|
397
409
|
switch (dataType) {
|
|
398
410
|
case "null":
|
|
399
|
-
return new
|
|
411
|
+
return new arrow5.Null();
|
|
400
412
|
case "binary":
|
|
401
|
-
return new
|
|
413
|
+
return new arrow5.Binary();
|
|
402
414
|
case "bool":
|
|
403
|
-
return new
|
|
415
|
+
return new arrow5.Bool();
|
|
404
416
|
case "int8":
|
|
405
|
-
return new
|
|
417
|
+
return new arrow5.Int8();
|
|
406
418
|
case "int16":
|
|
407
|
-
return new
|
|
419
|
+
return new arrow5.Int16();
|
|
408
420
|
case "int32":
|
|
409
|
-
return new
|
|
421
|
+
return new arrow5.Int32();
|
|
410
422
|
case "int64":
|
|
411
|
-
return new
|
|
423
|
+
return new arrow5.Int64();
|
|
412
424
|
case "uint8":
|
|
413
|
-
return new
|
|
425
|
+
return new arrow5.Uint8();
|
|
414
426
|
case "uint16":
|
|
415
|
-
return new
|
|
427
|
+
return new arrow5.Uint16();
|
|
416
428
|
case "uint32":
|
|
417
|
-
return new
|
|
429
|
+
return new arrow5.Uint32();
|
|
418
430
|
case "uint64":
|
|
419
|
-
return new
|
|
431
|
+
return new arrow5.Uint64();
|
|
420
432
|
case "float16":
|
|
421
|
-
return new
|
|
433
|
+
return new arrow5.Float16();
|
|
422
434
|
case "float32":
|
|
423
|
-
return new
|
|
435
|
+
return new arrow5.Float32();
|
|
424
436
|
case "float64":
|
|
425
|
-
return new
|
|
437
|
+
return new arrow5.Float64();
|
|
426
438
|
case "utf8":
|
|
427
|
-
return new
|
|
439
|
+
return new arrow5.Utf8();
|
|
428
440
|
case "date-day":
|
|
429
|
-
return new
|
|
441
|
+
return new arrow5.DateDay();
|
|
430
442
|
case "date-millisecond":
|
|
431
|
-
return new
|
|
443
|
+
return new arrow5.DateMillisecond();
|
|
432
444
|
case "time-second":
|
|
433
|
-
return new
|
|
445
|
+
return new arrow5.TimeSecond();
|
|
434
446
|
case "time-millisecond":
|
|
435
|
-
return new
|
|
447
|
+
return new arrow5.TimeMillisecond();
|
|
436
448
|
case "time-microsecond":
|
|
437
|
-
return new
|
|
449
|
+
return new arrow5.TimeMicrosecond();
|
|
438
450
|
case "time-nanosecond":
|
|
439
|
-
return new
|
|
451
|
+
return new arrow5.TimeNanosecond();
|
|
440
452
|
case "timestamp-second":
|
|
441
|
-
return new
|
|
453
|
+
return new arrow5.TimestampSecond();
|
|
442
454
|
case "timestamp-millisecond":
|
|
443
|
-
return new
|
|
455
|
+
return new arrow5.TimestampMillisecond();
|
|
444
456
|
case "timestamp-microsecond":
|
|
445
|
-
return new
|
|
457
|
+
return new arrow5.TimestampMicrosecond();
|
|
446
458
|
case "timestamp-nanosecond":
|
|
447
|
-
return new
|
|
459
|
+
return new arrow5.TimestampNanosecond();
|
|
448
460
|
case "interval-daytime":
|
|
449
|
-
return new
|
|
461
|
+
return new arrow5.IntervalDayTime();
|
|
450
462
|
case "interval-yearmonth":
|
|
451
|
-
return new
|
|
463
|
+
return new arrow5.IntervalYearMonth();
|
|
452
464
|
default:
|
|
453
465
|
throw new Error("array type not supported");
|
|
454
466
|
}
|
|
@@ -462,24 +474,24 @@ var VECTOR_TYPES = /* @__PURE__ */ ((VECTOR_TYPES2) => {
|
|
|
462
474
|
})(VECTOR_TYPES || {});
|
|
463
475
|
|
|
464
476
|
// src/lib/encode-arrow.ts
|
|
465
|
-
var
|
|
477
|
+
var arrow6 = __toESM(require("apache-arrow"), 1);
|
|
466
478
|
function encodeArrowSync(data) {
|
|
467
479
|
const vectors = {};
|
|
468
480
|
for (const arrayData of data) {
|
|
469
481
|
const arrayVector = createVector(arrayData.array, arrayData.type);
|
|
470
482
|
vectors[arrayData.name] = arrayVector;
|
|
471
483
|
}
|
|
472
|
-
const table = new
|
|
473
|
-
const arrowBuffer =
|
|
484
|
+
const table = new arrow6.Table(vectors);
|
|
485
|
+
const arrowBuffer = arrow6.tableToIPC(table);
|
|
474
486
|
return arrowBuffer;
|
|
475
487
|
}
|
|
476
488
|
function createVector(array, type) {
|
|
477
489
|
switch (type) {
|
|
478
490
|
case 1 /* DATE */:
|
|
479
|
-
return
|
|
491
|
+
return arrow6.vectorFromArray(array);
|
|
480
492
|
case 0 /* FLOAT */:
|
|
481
493
|
default:
|
|
482
|
-
return
|
|
494
|
+
return arrow6.vectorFromArray(array);
|
|
483
495
|
}
|
|
484
496
|
}
|
|
485
497
|
|
|
@@ -496,11 +508,14 @@ var ArrowWriter = {
|
|
|
496
508
|
"application/vnd.apache.arrow.stream",
|
|
497
509
|
"application/octet-stream"
|
|
498
510
|
],
|
|
499
|
-
|
|
511
|
+
binary: true,
|
|
512
|
+
options: {},
|
|
513
|
+
encode: async function encodeArrow(data, options) {
|
|
500
514
|
return encodeArrowSync(data);
|
|
501
515
|
},
|
|
502
|
-
|
|
503
|
-
|
|
516
|
+
encodeSync(data, options) {
|
|
517
|
+
return encodeArrowSync(data);
|
|
518
|
+
}
|
|
504
519
|
};
|
|
505
520
|
|
|
506
521
|
// src/geoarrow/get-arrow-bounds.ts
|
|
@@ -511,7 +526,7 @@ function updateBoundsFromGeoArrowSamples(flatCoords, nDim, bounds, sampleSize =
|
|
|
511
526
|
for (let i = 0; i < numberOfFeatures; i += sampleStep) {
|
|
512
527
|
const lng = flatCoords[i * nDim];
|
|
513
528
|
const lat = flatCoords[i * nDim + 1];
|
|
514
|
-
if (lng <
|
|
529
|
+
if (lng < newBounds[0]) {
|
|
515
530
|
newBounds[0] = lng;
|
|
516
531
|
}
|
|
517
532
|
if (lat < newBounds[1]) {
|
|
@@ -542,13 +557,12 @@ function getBinaryGeometriesFromArrow(geoColumn, geoEncoding) {
|
|
|
542
557
|
line: geoEncoding === "geoarrow.multilinestring" || geoEncoding === "geoarrow.linestring"
|
|
543
558
|
};
|
|
544
559
|
const chunks = geoColumn.data;
|
|
545
|
-
|
|
560
|
+
let bounds = [Infinity, Infinity, -Infinity, -Infinity];
|
|
546
561
|
let globalFeatureIdOffset = 0;
|
|
547
562
|
const binaryGeometries = [];
|
|
548
|
-
|
|
549
|
-
const geometries = chunks[c];
|
|
563
|
+
chunks.forEach((chunk) => {
|
|
550
564
|
const { featureIds, flatCoordinateArray, nDim, geomOffset } = getBinaryGeometriesFromChunk(
|
|
551
|
-
|
|
565
|
+
chunk,
|
|
552
566
|
geoEncoding
|
|
553
567
|
);
|
|
554
568
|
const numOfVertices = flatCoordinateArray.length / nDim;
|
|
@@ -563,12 +577,11 @@ function getBinaryGeometriesFromArrow(geoColumn, geoEncoding) {
|
|
|
563
577
|
size: nDim
|
|
564
578
|
},
|
|
565
579
|
featureIds: { value: featureIds, size: 1 },
|
|
566
|
-
|
|
567
|
-
properties: [...Array(geometries.length).keys()].map((i) => ({
|
|
580
|
+
properties: [...Array(chunk.length).keys()].map((i) => ({
|
|
568
581
|
index: i + globalFeatureIdOffset
|
|
569
582
|
}))
|
|
570
583
|
};
|
|
571
|
-
globalFeatureIdOffset +=
|
|
584
|
+
globalFeatureIdOffset += chunk.length;
|
|
572
585
|
binaryGeometries.push({
|
|
573
586
|
shape: "binary-feature-collection",
|
|
574
587
|
points: {
|
|
@@ -598,8 +611,8 @@ function getBinaryGeometriesFromArrow(geoColumn, geoEncoding) {
|
|
|
598
611
|
}
|
|
599
612
|
}
|
|
600
613
|
});
|
|
601
|
-
updateBoundsFromGeoArrowSamples(flatCoordinateArray, nDim, bounds);
|
|
602
|
-
}
|
|
614
|
+
bounds = updateBoundsFromGeoArrowSamples(flatCoordinateArray, nDim, bounds);
|
|
615
|
+
});
|
|
603
616
|
return { binaryGeometries, bounds, featureTypes };
|
|
604
617
|
}
|
|
605
618
|
function getBinaryGeometriesFromChunk(chunk, geoEncoding) {
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { ArrowWorkerLoader };
|
|
|
14
14
|
export declare const ArrowLoader: LoaderWithParser<ArrowTable | ColumnarTable | ObjectRowTable, ArrowTableBatch, ArrowLoaderOptions>;
|
|
15
15
|
export type { GeoArrowEncoding } from '@loaders.gl/gis';
|
|
16
16
|
export type { BinaryDataFromGeoArrow } from './geoarrow/convert-geoarrow-to-binary-geometry';
|
|
17
|
-
export { getBinaryGeometriesFromArrow } from './geoarrow/convert-geoarrow-to-binary-geometry';
|
|
17
|
+
export { BINARY_GEOMETRY_TEMPLATE, getBinaryGeometriesFromArrow } from './geoarrow/convert-geoarrow-to-binary-geometry';
|
|
18
18
|
export { parseGeometryFromArrow } from './geoarrow/convert-geoarrow-to-geojson';
|
|
19
|
+
export { updateBoundsFromGeoArrowSamples } from './geoarrow/get-arrow-bounds';
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAC,eAAe,EAAE,aAAa,EAAE,cAAc,EAAC,MAAM,oBAAoB,CAAC;AACvF,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAC,WAAW,IAAI,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAWhE,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAIvD,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAGvC,YAAY,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAIrC,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAI3C,YAAY,EAAC,kBAAkB,EAAC,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAC,CAAC;AAE3B,2BAA2B;AAC3B,eAAO,MAAM,WAAW,EAAE,gBAAgB,CACxC,UAAU,GAAG,aAAa,GAAG,cAAc,EAC3C,eAAe,EACf,kBAAkB,CAOnB,CAAC;AAGF,YAAY,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAItD,YAAY,EAAC,sBAAsB,EAAC,MAAM,gDAAgD,CAAC;AAC3F,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAC,eAAe,EAAE,aAAa,EAAE,cAAc,EAAC,MAAM,oBAAoB,CAAC;AACvF,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAC,WAAW,IAAI,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAWhE,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAIvD,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAGvC,YAAY,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAIrC,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAI3C,YAAY,EAAC,kBAAkB,EAAC,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAC,CAAC;AAE3B,2BAA2B;AAC3B,eAAO,MAAM,WAAW,EAAE,gBAAgB,CACxC,UAAU,GAAG,aAAa,GAAG,cAAc,EAC3C,eAAe,EACf,kBAAkB,CAOnB,CAAC;AAGF,YAAY,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAItD,YAAY,EAAC,sBAAsB,EAAC,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,gDAAgD,CAAC;AAExD,OAAO,EAAC,sBAAsB,EAAC,MAAM,wCAAwC,CAAC;AAE9E,OAAO,EAAC,+BAA+B,EAAC,MAAM,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ export const ArrowLoader = {
|
|
|
15
15
|
parseSync,
|
|
16
16
|
parseInBatches: parseArrowInBatches
|
|
17
17
|
};
|
|
18
|
-
export { getBinaryGeometriesFromArrow } from "./geoarrow/convert-geoarrow-to-binary-geometry.js";
|
|
18
|
+
export { BINARY_GEOMETRY_TEMPLATE, getBinaryGeometriesFromArrow } from "./geoarrow/convert-geoarrow-to-binary-geometry.js";
|
|
19
19
|
export { parseGeometryFromArrow } from "./geoarrow/convert-geoarrow-to-geojson.js";
|
|
20
|
+
export { updateBoundsFromGeoArrowSamples } from "./geoarrow/get-arrow-bounds.js";
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["TableBatchBuilder","ArrowLoader","ArrowWorkerLoader","parseSync","parseArrowInBatches","ArrowTableBatchAggregator","ArrowBatch","getArrowType","serializeArrowSchema","deserializeArrowSchema","serializeArrowMetadata","deserializeArrowMetadata","serializeArrowField","deserializeArrowField","serializeArrowType","deserializeArrowType","VECTOR_TYPES","ArrowWriter","parse","arraybuffer","options","parseInBatches","getBinaryGeometriesFromArrow","parseGeometryFromArrow"],"sources":["../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {ArrowLoaderOptions} from './arrow-loader';\nimport type {ArrowTableBatch, ColumnarTable, ObjectRowTable} from '@loaders.gl/schema';\nimport type {ArrowTable} from './lib/arrow-table';\n\nimport {TableBatchBuilder} from '@loaders.gl/schema';\nimport {ArrowLoader as ArrowWorkerLoader} from './arrow-loader';\nimport parseSync from './lib/parse-arrow-sync';\nimport {parseArrowInBatches} from './lib/parse-arrow-in-batches';\n\nimport {ArrowTableBatchAggregator} from './lib/arrow-table-batch';\n\n// Make the ArrowBatch type available\nTableBatchBuilder.ArrowBatch = ArrowTableBatchAggregator;\n\n// TYPES\n\nexport {getArrowType} from './schema/arrow-type-utils';\n\n// SCHEMA\n\nexport {\n serializeArrowSchema,\n deserializeArrowSchema,\n serializeArrowMetadata,\n deserializeArrowMetadata,\n serializeArrowField,\n deserializeArrowField,\n serializeArrowType,\n deserializeArrowType\n} from './schema/convert-arrow-schema';\n\n// Types\nexport type {ArrowTable, ArrowTableBatch} from './lib/arrow-table';\nexport {VECTOR_TYPES} from './types';\n\n// Arrow writer\n\nexport {ArrowWriter} from './arrow-writer';\n\n// Arrow loader\n\nexport type {ArrowLoaderOptions};\nexport {ArrowWorkerLoader};\n\n/** ArrowJS table loader */\nexport const ArrowLoader: LoaderWithParser<\n ArrowTable | ColumnarTable | ObjectRowTable,\n ArrowTableBatch,\n ArrowLoaderOptions\n> = {\n ...ArrowWorkerLoader,\n parse: async (arraybuffer: ArrayBuffer, options?: ArrowLoaderOptions) =>\n parseSync(arraybuffer, options),\n parseSync,\n parseInBatches: parseArrowInBatches\n};\n\n// Arrow Utils\nexport type {GeoArrowEncoding} from '@loaders.gl/gis';\n// getGeometryColumnsFromArrowTable,\n// getGeoArrowEncoding\n\nexport type {BinaryDataFromGeoArrow} from './geoarrow/convert-geoarrow-to-binary-geometry';\nexport {getBinaryGeometriesFromArrow} from './geoarrow/convert-geoarrow-to-binary-geometry';\n\nexport {parseGeometryFromArrow} from './geoarrow/convert-geoarrow-to-geojson';\n"],"mappings":"AAQA,SAAQA,iBAAiB,QAAO,oBAAoB;AAAC,SAC7CC,WAAW,IAAIC,iBAAiB;AAAA,OACjCC,SAAS;AAAA,SACRC,mBAAmB;AAAA,SAEnBC,yBAAyB;AAGjCL,iBAAiB,CAACM,UAAU,GAAGD,yBAAyB;AAAC,SAIjDE,YAAY;AAAA,SAKlBC,oBAAoB,EACpBC,sBAAsB,EACtBC,sBAAsB,EACtBC,wBAAwB,EACxBC,mBAAmB,EACnBC,qBAAqB,EACrBC,kBAAkB,EAClBC,oBAAoB;AAAA,SAKdC,YAAY;AAAA,SAIZC,WAAW;AAKnB,SAAQf,iBAAiB;AAGzB,OAAO,MAAMD,WAIZ,GAAG;EACF,GAAGC,iBAAiB;EACpBgB,KAAK,EAAE,MAAAA,CAAOC,WAAwB,EAAEC,OAA4B,KAClEjB,SAAS,CAACgB,WAAW,EAAEC,OAAO,CAAC;EACjCjB,SAAS;EACTkB,cAAc,EAAEjB;AAClB,CAAC;AAAC,
|
|
1
|
+
{"version":3,"file":"index.js","names":["TableBatchBuilder","ArrowLoader","ArrowWorkerLoader","parseSync","parseArrowInBatches","ArrowTableBatchAggregator","ArrowBatch","getArrowType","serializeArrowSchema","deserializeArrowSchema","serializeArrowMetadata","deserializeArrowMetadata","serializeArrowField","deserializeArrowField","serializeArrowType","deserializeArrowType","VECTOR_TYPES","ArrowWriter","parse","arraybuffer","options","parseInBatches","BINARY_GEOMETRY_TEMPLATE","getBinaryGeometriesFromArrow","parseGeometryFromArrow","updateBoundsFromGeoArrowSamples"],"sources":["../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {ArrowLoaderOptions} from './arrow-loader';\nimport type {ArrowTableBatch, ColumnarTable, ObjectRowTable} from '@loaders.gl/schema';\nimport type {ArrowTable} from './lib/arrow-table';\n\nimport {TableBatchBuilder} from '@loaders.gl/schema';\nimport {ArrowLoader as ArrowWorkerLoader} from './arrow-loader';\nimport parseSync from './lib/parse-arrow-sync';\nimport {parseArrowInBatches} from './lib/parse-arrow-in-batches';\n\nimport {ArrowTableBatchAggregator} from './lib/arrow-table-batch';\n\n// Make the ArrowBatch type available\nTableBatchBuilder.ArrowBatch = ArrowTableBatchAggregator;\n\n// TYPES\n\nexport {getArrowType} from './schema/arrow-type-utils';\n\n// SCHEMA\n\nexport {\n serializeArrowSchema,\n deserializeArrowSchema,\n serializeArrowMetadata,\n deserializeArrowMetadata,\n serializeArrowField,\n deserializeArrowField,\n serializeArrowType,\n deserializeArrowType\n} from './schema/convert-arrow-schema';\n\n// Types\nexport type {ArrowTable, ArrowTableBatch} from './lib/arrow-table';\nexport {VECTOR_TYPES} from './types';\n\n// Arrow writer\n\nexport {ArrowWriter} from './arrow-writer';\n\n// Arrow loader\n\nexport type {ArrowLoaderOptions};\nexport {ArrowWorkerLoader};\n\n/** ArrowJS table loader */\nexport const ArrowLoader: LoaderWithParser<\n ArrowTable | ColumnarTable | ObjectRowTable,\n ArrowTableBatch,\n ArrowLoaderOptions\n> = {\n ...ArrowWorkerLoader,\n parse: async (arraybuffer: ArrayBuffer, options?: ArrowLoaderOptions) =>\n parseSync(arraybuffer, options),\n parseSync,\n parseInBatches: parseArrowInBatches\n};\n\n// Arrow Utils\nexport type {GeoArrowEncoding} from '@loaders.gl/gis';\n// getGeometryColumnsFromArrowTable,\n// getGeoArrowEncoding\n\nexport type {BinaryDataFromGeoArrow} from './geoarrow/convert-geoarrow-to-binary-geometry';\nexport {\n BINARY_GEOMETRY_TEMPLATE,\n getBinaryGeometriesFromArrow\n} from './geoarrow/convert-geoarrow-to-binary-geometry';\n\nexport {parseGeometryFromArrow} from './geoarrow/convert-geoarrow-to-geojson';\n\nexport {updateBoundsFromGeoArrowSamples} from './geoarrow/get-arrow-bounds';\n"],"mappings":"AAQA,SAAQA,iBAAiB,QAAO,oBAAoB;AAAC,SAC7CC,WAAW,IAAIC,iBAAiB;AAAA,OACjCC,SAAS;AAAA,SACRC,mBAAmB;AAAA,SAEnBC,yBAAyB;AAGjCL,iBAAiB,CAACM,UAAU,GAAGD,yBAAyB;AAAC,SAIjDE,YAAY;AAAA,SAKlBC,oBAAoB,EACpBC,sBAAsB,EACtBC,sBAAsB,EACtBC,wBAAwB,EACxBC,mBAAmB,EACnBC,qBAAqB,EACrBC,kBAAkB,EAClBC,oBAAoB;AAAA,SAKdC,YAAY;AAAA,SAIZC,WAAW;AAKnB,SAAQf,iBAAiB;AAGzB,OAAO,MAAMD,WAIZ,GAAG;EACF,GAAGC,iBAAiB;EACpBgB,KAAK,EAAE,MAAAA,CAAOC,WAAwB,EAAEC,OAA4B,KAClEjB,SAAS,CAACgB,WAAW,EAAEC,OAAO,CAAC;EACjCjB,SAAS;EACTkB,cAAc,EAAEjB;AAClB,CAAC;AAAC,SASAkB,wBAAwB,EACxBC,4BAA4B;AAAA,SAGtBC,sBAAsB;AAAA,SAEtBC,+BAA+B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ColumnarTableBatchAggregator } from '@loaders.gl/schema';
|
|
2
2
|
import type { ArrowTableBatch } from './arrow-table';
|
|
3
|
-
import
|
|
3
|
+
import * as arrow from 'apache-arrow';
|
|
4
4
|
export declare class ArrowTableBatchAggregator extends ColumnarTableBatchAggregator {
|
|
5
|
-
arrowSchema: Schema | null;
|
|
5
|
+
arrowSchema: arrow.Schema | null;
|
|
6
6
|
constructor(schema: any, options: any);
|
|
7
7
|
getBatch(): ArrowTableBatch | null;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-table-batch.d.ts","sourceRoot":"","sources":["../../src/lib/arrow-table-batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,4BAA4B,EAAC,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"arrow-table-batch.d.ts","sourceRoot":"","sources":["../../src/lib/arrow-table-batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,4BAA4B,EAAC,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,qBAAa,yBAA0B,SAAQ,4BAA4B;IACzE,WAAW,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;gBAErB,MAAM,KAAA,EAAE,OAAO,KAAA;IAK3B,QAAQ,IAAI,eAAe,GAAG,IAAI;CA4BnC"}
|