@loaders.gl/scan 5.0.0-alpha.12 → 5.0.0-alpha.13
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/LICENSE +1 -1
- package/README.md +4 -4
- package/dist/delta.cjs +1789 -1797
- package/dist/delta.cjs.map +3 -3
- package/dist/dist.min.js +20 -20
- package/dist/federated-table-scan-source.d.ts +2 -2
- package/dist/federated-table-scan-source.d.ts.map +1 -1
- package/dist/federated-table-scan-source.js +2 -2
- package/dist/federated-table-scan-source.js.map +1 -1
- package/dist/hudi.cjs +1845 -1853
- package/dist/hudi.cjs.map +3 -3
- package/dist/hudi.d.ts +2 -2
- package/dist/hudi.d.ts.map +1 -1
- package/dist/hudi.js +1 -1
- package/dist/hudi.js.map +1 -1
- package/dist/iceberg.cjs +1144 -1151
- package/dist/iceberg.cjs.map +3 -3
- package/dist/index.cjs +20 -20
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/scan-engine.d.ts +2 -2
- package/dist/scan-engine.d.ts.map +1 -1
- package/dist/vector-table-scan-source.d.ts +2 -2
- package/dist/vector-table-scan-source.d.ts.map +1 -1
- package/dist/vector-table-scan-source.js +2 -2
- package/dist/vector-table-scan-source.js.map +1 -1
- package/package.json +7 -8
- package/src/federated-table-scan-source.ts +7 -3
- package/src/hudi.ts +2 -2
- package/src/index.ts +6 -6
- package/src/scan-engine.ts +2 -2
- package/src/vector-table-scan-source.ts +4 -4
package/dist/iceberg.cjs
CHANGED
|
@@ -35,10 +35,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
35
35
|
));
|
|
36
36
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
37
|
|
|
38
|
-
// ../loader-utils/
|
|
38
|
+
// ../core/src/loader-utils/lib/env-utils/globals.ts
|
|
39
39
|
var globals, self_, window_, global_, document_, isBrowser, matches, nodeVersion;
|
|
40
40
|
var init_globals = __esm({
|
|
41
|
-
"../loader-utils/
|
|
41
|
+
"../core/src/loader-utils/lib/env-utils/globals.ts"() {
|
|
42
42
|
"use strict";
|
|
43
43
|
globals = {
|
|
44
44
|
self: typeof self !== "undefined" && self,
|
|
@@ -57,7 +57,7 @@ var init_globals = __esm({
|
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
// ../loader-utils/
|
|
60
|
+
// ../core/src/loader-utils/lib/log-utils/log.ts
|
|
61
61
|
function createLog() {
|
|
62
62
|
const log2 = new import_log.Log({ id: "loaders.gl" });
|
|
63
63
|
globalThis.loaders ||= {};
|
|
@@ -69,19 +69,19 @@ function createLog() {
|
|
|
69
69
|
}
|
|
70
70
|
var import_log, VERSION, version, log;
|
|
71
71
|
var init_log = __esm({
|
|
72
|
-
"../loader-utils/
|
|
72
|
+
"../core/src/loader-utils/lib/log-utils/log.ts"() {
|
|
73
73
|
"use strict";
|
|
74
|
-
import_log = require("
|
|
74
|
+
import_log = require("probe.gl/log");
|
|
75
75
|
VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
76
76
|
version = VERSION[0] >= "0" && VERSION[0] <= "9" ? `v${VERSION}` : "";
|
|
77
77
|
log = createLog();
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
// ../loader-utils/
|
|
81
|
+
// ../core/src/loader-utils/lib/javascript-utils/is-type.ts
|
|
82
82
|
var isObject, isPureObject, isSharedArrayBuffer;
|
|
83
83
|
var init_is_type = __esm({
|
|
84
|
-
"../loader-utils/
|
|
84
|
+
"../core/src/loader-utils/lib/javascript-utils/is-type.ts"() {
|
|
85
85
|
"use strict";
|
|
86
86
|
isObject = (value) => value !== null && typeof value === "object";
|
|
87
87
|
isPureObject = (value) => isObject(value) && value.constructor === {}.constructor;
|
|
@@ -89,7 +89,7 @@ var init_is_type = __esm({
|
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
// ../loader-utils/
|
|
92
|
+
// ../core/src/loader-utils/lib/option-utils/merge-options.ts
|
|
93
93
|
function mergeOptions(baseOptions, newOptions) {
|
|
94
94
|
return mergeOptionsRecursively(baseOptions || {}, newOptions);
|
|
95
95
|
}
|
|
@@ -112,34 +112,34 @@ function mergeOptionsRecursively(baseOptions, newOptions, level = 0) {
|
|
|
112
112
|
return options;
|
|
113
113
|
}
|
|
114
114
|
var init_merge_options = __esm({
|
|
115
|
-
"../loader-utils/
|
|
115
|
+
"../core/src/loader-utils/lib/option-utils/merge-options.ts"() {
|
|
116
116
|
"use strict";
|
|
117
117
|
init_is_type();
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
-
// ../loader-utils/
|
|
121
|
+
// ../core/src/loader-utils/lib/module-utils/js-module-utils.ts
|
|
122
122
|
function registerJSModules(modules) {
|
|
123
123
|
globalThis.loaders ||= {};
|
|
124
124
|
globalThis.loaders.modules ||= {};
|
|
125
125
|
Object.assign(globalThis.loaders.modules, modules);
|
|
126
126
|
}
|
|
127
127
|
var init_js_module_utils = __esm({
|
|
128
|
-
"../loader-utils/
|
|
128
|
+
"../core/src/loader-utils/lib/module-utils/js-module-utils.ts"() {
|
|
129
129
|
"use strict";
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
|
|
133
|
-
// ../worker-utils/
|
|
133
|
+
// ../core/src/worker-utils/lib/npm-tag.ts
|
|
134
134
|
var NPM_TAG;
|
|
135
135
|
var init_npm_tag = __esm({
|
|
136
|
-
"../worker-utils/
|
|
136
|
+
"../core/src/worker-utils/lib/npm-tag.ts"() {
|
|
137
137
|
"use strict";
|
|
138
138
|
NPM_TAG = "latest";
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
|
|
142
|
-
// ../worker-utils/
|
|
142
|
+
// ../core/src/worker-utils/lib/env-utils/version.ts
|
|
143
143
|
function getVersion() {
|
|
144
144
|
var _a;
|
|
145
145
|
if (!((_a = globalThis._loadersgl_) == null ? void 0 : _a.version)) {
|
|
@@ -154,29 +154,29 @@ function getVersion() {
|
|
|
154
154
|
}
|
|
155
155
|
var VERSION2;
|
|
156
156
|
var init_version = __esm({
|
|
157
|
-
"../worker-utils/
|
|
157
|
+
"../core/src/worker-utils/lib/env-utils/version.ts"() {
|
|
158
158
|
"use strict";
|
|
159
159
|
init_npm_tag();
|
|
160
160
|
VERSION2 = getVersion();
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
163
|
|
|
164
|
-
// ../worker-utils/
|
|
164
|
+
// ../core/src/worker-utils/lib/env-utils/assert.ts
|
|
165
165
|
function assert(condition, message) {
|
|
166
166
|
if (!condition) {
|
|
167
167
|
throw new Error(message || "loaders.gl assertion failed.");
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
var init_assert = __esm({
|
|
171
|
-
"../worker-utils/
|
|
171
|
+
"../core/src/worker-utils/lib/env-utils/assert.ts"() {
|
|
172
172
|
"use strict";
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
|
|
176
|
-
// ../worker-utils/
|
|
176
|
+
// ../core/src/worker-utils/lib/env-utils/globals.ts
|
|
177
177
|
var globals2, self_2, window_2, global_2, document_2, isBrowser2, isMobile, matches2, nodeVersion2;
|
|
178
178
|
var init_globals2 = __esm({
|
|
179
|
-
"../worker-utils/
|
|
179
|
+
"../core/src/worker-utils/lib/env-utils/globals.ts"() {
|
|
180
180
|
"use strict";
|
|
181
181
|
globals2 = {
|
|
182
182
|
self: typeof self !== "undefined" && self,
|
|
@@ -196,7 +196,7 @@ var init_globals2 = __esm({
|
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
198
|
|
|
199
|
-
// ../worker-utils/
|
|
199
|
+
// ../core/src/worker-utils/lib/worker-farm/worker-job.ts
|
|
200
200
|
function createAbortError(message) {
|
|
201
201
|
const error = new Error(message);
|
|
202
202
|
error.name = "AbortError";
|
|
@@ -204,7 +204,7 @@ function createAbortError(message) {
|
|
|
204
204
|
}
|
|
205
205
|
var WorkerJob;
|
|
206
206
|
var init_worker_job = __esm({
|
|
207
|
-
"../worker-utils/
|
|
207
|
+
"../core/src/worker-utils/lib/worker-farm/worker-job.ts"() {
|
|
208
208
|
"use strict";
|
|
209
209
|
WorkerJob = class {
|
|
210
210
|
name;
|
|
@@ -272,10 +272,10 @@ var init_worker_job = __esm({
|
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
274
|
|
|
275
|
-
// ../worker-utils/
|
|
275
|
+
// ../core/src/worker-utils/lib/node/worker_threads-browser.ts
|
|
276
276
|
var NodeWorker;
|
|
277
277
|
var init_worker_threads_browser = __esm({
|
|
278
|
-
"../worker-utils/
|
|
278
|
+
"../core/src/worker-utils/lib/node/worker_threads-browser.ts"() {
|
|
279
279
|
"use strict";
|
|
280
280
|
NodeWorker = class {
|
|
281
281
|
/** Restores the native worker constructor when this browser shim is embedded in a Node bundle. */
|
|
@@ -294,7 +294,7 @@ var init_worker_threads_browser = __esm({
|
|
|
294
294
|
}
|
|
295
295
|
});
|
|
296
296
|
|
|
297
|
-
// ../worker-utils/
|
|
297
|
+
// ../core/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts
|
|
298
298
|
function getLoadableWorkerURL(props) {
|
|
299
299
|
assert(props.source && !props.url || !props.source && props.url);
|
|
300
300
|
let workerURL = workerURLCache.get(props.source || props.url);
|
|
@@ -332,14 +332,14 @@ function buildScriptSource(workerUrl) {
|
|
|
332
332
|
}
|
|
333
333
|
var workerURLCache;
|
|
334
334
|
var init_get_loadable_worker_url = __esm({
|
|
335
|
-
"../worker-utils/
|
|
335
|
+
"../core/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts"() {
|
|
336
336
|
"use strict";
|
|
337
337
|
init_assert();
|
|
338
338
|
workerURLCache = /* @__PURE__ */ new Map();
|
|
339
339
|
}
|
|
340
340
|
});
|
|
341
341
|
|
|
342
|
-
// ../worker-utils/
|
|
342
|
+
// ../core/src/worker-utils/lib/worker-utils/get-transfer-list.ts
|
|
343
343
|
function getTransferList(object, recursive = true, transfers) {
|
|
344
344
|
const transfersSet = transfers || /* @__PURE__ */ new Set();
|
|
345
345
|
if (!object) {
|
|
@@ -390,15 +390,15 @@ function getTransferListForWriter(object) {
|
|
|
390
390
|
return clone;
|
|
391
391
|
}
|
|
392
392
|
var init_get_transfer_list = __esm({
|
|
393
|
-
"../worker-utils/
|
|
393
|
+
"../core/src/worker-utils/lib/worker-utils/get-transfer-list.ts"() {
|
|
394
394
|
"use strict";
|
|
395
395
|
}
|
|
396
396
|
});
|
|
397
397
|
|
|
398
|
-
// ../worker-utils/
|
|
398
|
+
// ../core/src/worker-utils/lib/worker-farm/worker-thread.ts
|
|
399
399
|
var NOOP, WorkerThread;
|
|
400
400
|
var init_worker_thread = __esm({
|
|
401
|
-
"../worker-utils/
|
|
401
|
+
"../core/src/worker-utils/lib/worker-farm/worker-thread.ts"() {
|
|
402
402
|
"use strict";
|
|
403
403
|
init_worker_threads_browser();
|
|
404
404
|
init_globals2();
|
|
@@ -555,10 +555,10 @@ var init_worker_thread = __esm({
|
|
|
555
555
|
}
|
|
556
556
|
});
|
|
557
557
|
|
|
558
|
-
// ../worker-utils/
|
|
558
|
+
// ../core/src/worker-utils/lib/worker-farm/worker-pool.ts
|
|
559
559
|
var WorkerPool;
|
|
560
560
|
var init_worker_pool = __esm({
|
|
561
|
-
"../worker-utils/
|
|
561
|
+
"../core/src/worker-utils/lib/worker-farm/worker-pool.ts"() {
|
|
562
562
|
"use strict";
|
|
563
563
|
init_globals2();
|
|
564
564
|
init_worker_thread();
|
|
@@ -731,7 +731,7 @@ var init_worker_pool = __esm({
|
|
|
731
731
|
}
|
|
732
732
|
});
|
|
733
733
|
|
|
734
|
-
// ../worker-utils/
|
|
734
|
+
// ../core/src/worker-utils/lib/worker-farm/worker-farm.ts
|
|
735
735
|
function getWorkerPoolKey(options) {
|
|
736
736
|
const { name, source, url, urlKey, loadWorker } = options;
|
|
737
737
|
const sourceKey = source ? `source:${source}` : "";
|
|
@@ -749,7 +749,7 @@ function getLoadWorkerId(loadWorker) {
|
|
|
749
749
|
}
|
|
750
750
|
var DEFAULT_PROPS, loadWorkerIds, nextLoadWorkerId, WorkerFarm;
|
|
751
751
|
var init_worker_farm = __esm({
|
|
752
|
-
"../worker-utils/
|
|
752
|
+
"../core/src/worker-utils/lib/worker-farm/worker-farm.ts"() {
|
|
753
753
|
"use strict";
|
|
754
754
|
init_worker_pool();
|
|
755
755
|
init_worker_thread();
|
|
@@ -843,13 +843,13 @@ var init_worker_farm = __esm({
|
|
|
843
843
|
}
|
|
844
844
|
});
|
|
845
845
|
|
|
846
|
-
// ../worker-utils/
|
|
846
|
+
// ../core/src/worker-utils/lib/worker-api/get-worker-url.ts
|
|
847
847
|
function getWorkerName(worker) {
|
|
848
848
|
const warning = worker.version !== VERSION2 ? ` (worker-utils@${VERSION2})` : "";
|
|
849
849
|
return `${worker.name}@${worker.version}${warning}`;
|
|
850
850
|
}
|
|
851
851
|
function getCustomWorkerURL(worker, options = {}) {
|
|
852
|
-
var _a;
|
|
852
|
+
var _a, _b;
|
|
853
853
|
const workerOptions = options[worker.id] || {};
|
|
854
854
|
const workerFile = isBrowser2 ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
855
855
|
let url = workerOptions.workerUrl;
|
|
@@ -861,7 +861,9 @@ function getCustomWorkerURL(worker, options = {}) {
|
|
|
861
861
|
if (isBrowser2) {
|
|
862
862
|
url = `modules/${worker.module}/dist/${workerFile}`;
|
|
863
863
|
} else {
|
|
864
|
-
|
|
864
|
+
const workerSourceDirectory = worker.module === "core" && ((_b = worker.workerNode) == null ? void 0 : _b.startsWith("worker-utils/")) ? "worker-utils/workers" : "workers";
|
|
865
|
+
const workerSourceNode = worker.workerSourceNode || `${workerSourceDirectory}/${worker.id}-worker-node.ts`;
|
|
866
|
+
url = `modules/${worker.module}/src/${workerSourceNode}`;
|
|
865
867
|
}
|
|
866
868
|
}
|
|
867
869
|
return url || null;
|
|
@@ -901,7 +903,7 @@ function warnIfUsingNpmTagFallback(worker, url) {
|
|
|
901
903
|
}
|
|
902
904
|
var warnedWorkerVersionFallbacks;
|
|
903
905
|
var init_get_worker_url = __esm({
|
|
904
|
-
"../worker-utils/
|
|
906
|
+
"../core/src/worker-utils/lib/worker-api/get-worker-url.ts"() {
|
|
905
907
|
"use strict";
|
|
906
908
|
init_assert();
|
|
907
909
|
init_globals2();
|
|
@@ -911,7 +913,7 @@ var init_get_worker_url = __esm({
|
|
|
911
913
|
}
|
|
912
914
|
});
|
|
913
915
|
|
|
914
|
-
// ../worker-utils/
|
|
916
|
+
// ../core/src/worker-utils/lib/worker-api/process-on-worker.ts
|
|
915
917
|
function canProcessOnWorker(worker, options) {
|
|
916
918
|
if (!WorkerFarm.isSupported()) {
|
|
917
919
|
return false;
|
|
@@ -1014,7 +1016,7 @@ async function onMessage(context, job, type, payload) {
|
|
|
1014
1016
|
}
|
|
1015
1017
|
}
|
|
1016
1018
|
var init_process_on_worker = __esm({
|
|
1017
|
-
"../worker-utils/
|
|
1019
|
+
"../core/src/worker-utils/lib/worker-api/process-on-worker.ts"() {
|
|
1018
1020
|
"use strict";
|
|
1019
1021
|
init_worker_farm();
|
|
1020
1022
|
init_get_worker_url();
|
|
@@ -1023,16 +1025,16 @@ var init_process_on_worker = __esm({
|
|
|
1023
1025
|
}
|
|
1024
1026
|
});
|
|
1025
1027
|
|
|
1026
|
-
// ../worker-utils/
|
|
1027
|
-
var
|
|
1028
|
-
"../worker-utils/
|
|
1028
|
+
// ../core/src/worker-utils/index.ts
|
|
1029
|
+
var init_worker_utils = __esm({
|
|
1030
|
+
"../core/src/worker-utils/index.ts"() {
|
|
1029
1031
|
"use strict";
|
|
1030
1032
|
init_globals2();
|
|
1031
1033
|
init_process_on_worker();
|
|
1032
1034
|
}
|
|
1033
1035
|
});
|
|
1034
1036
|
|
|
1035
|
-
// ../loader-utils/
|
|
1037
|
+
// ../core/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts
|
|
1036
1038
|
function canParseWithWorker(loader, options) {
|
|
1037
1039
|
var _a, _b, _c, _d, _e;
|
|
1038
1040
|
const workerUrl = (_a = options == null ? void 0 : options[loader.id]) == null ? void 0 : _a.workerUrl;
|
|
@@ -1169,13 +1171,13 @@ function isLoaderWithWorkerResultDeserializer(loader) {
|
|
|
1169
1171
|
return typeof loader.deserializeWorkerResult === "function";
|
|
1170
1172
|
}
|
|
1171
1173
|
var init_parse_with_worker = __esm({
|
|
1172
|
-
"../loader-utils/
|
|
1174
|
+
"../core/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts"() {
|
|
1173
1175
|
"use strict";
|
|
1174
|
-
|
|
1176
|
+
init_worker_utils();
|
|
1175
1177
|
}
|
|
1176
1178
|
});
|
|
1177
1179
|
|
|
1178
|
-
// ../loader-utils/
|
|
1180
|
+
// ../core/src/loader-utils/lib/binary-utils/array-buffer-utils.ts
|
|
1179
1181
|
function concatenateArrayBuffers(...sources) {
|
|
1180
1182
|
return concatenateArrayBuffersFromArray(sources);
|
|
1181
1183
|
}
|
|
@@ -1193,12 +1195,12 @@ function concatenateArrayBuffersFromArray(sources) {
|
|
|
1193
1195
|
return result.buffer;
|
|
1194
1196
|
}
|
|
1195
1197
|
var init_array_buffer_utils = __esm({
|
|
1196
|
-
"../loader-utils/
|
|
1198
|
+
"../core/src/loader-utils/lib/binary-utils/array-buffer-utils.ts"() {
|
|
1197
1199
|
"use strict";
|
|
1198
1200
|
}
|
|
1199
1201
|
});
|
|
1200
1202
|
|
|
1201
|
-
// ../loader-utils/
|
|
1203
|
+
// ../core/src/loader-utils/lib/iterators/async-iteration.ts
|
|
1202
1204
|
async function concatenateArrayBuffersAsync(asyncIterator) {
|
|
1203
1205
|
const arrayBuffers = [];
|
|
1204
1206
|
for await (const chunk of asyncIterator) {
|
|
@@ -1223,13 +1225,13 @@ function copyFromBuffer(buffer, byteOffset = 0, byteLength = buffer.byteLength -
|
|
|
1223
1225
|
return copy.buffer;
|
|
1224
1226
|
}
|
|
1225
1227
|
var init_async_iteration = __esm({
|
|
1226
|
-
"../loader-utils/
|
|
1228
|
+
"../core/src/loader-utils/lib/iterators/async-iteration.ts"() {
|
|
1227
1229
|
"use strict";
|
|
1228
1230
|
init_array_buffer_utils();
|
|
1229
1231
|
}
|
|
1230
1232
|
});
|
|
1231
1233
|
|
|
1232
|
-
// ../loader-utils/
|
|
1234
|
+
// ../core/src/loader-utils/lib/request-utils/authentication.ts
|
|
1233
1235
|
function resolveCredentials(credentials, authentications = []) {
|
|
1234
1236
|
if (credentials.every(isAuthentication)) return credentials;
|
|
1235
1237
|
return credentials.map((credential, index) => {
|
|
@@ -1266,12 +1268,12 @@ function isAuthentication(credential) {
|
|
|
1266
1268
|
return (credential.type === "header" || credential.type === "query-parameter") && typeof credential.name === "string" && (typeof credential.token === "string" || typeof credential.token === "function") && Array.isArray(credential.refreshStatusCodes);
|
|
1267
1269
|
}
|
|
1268
1270
|
var init_authentication = __esm({
|
|
1269
|
-
"../loader-utils/
|
|
1271
|
+
"../core/src/loader-utils/lib/request-utils/authentication.ts"() {
|
|
1270
1272
|
"use strict";
|
|
1271
1273
|
}
|
|
1272
1274
|
});
|
|
1273
1275
|
|
|
1274
|
-
// ../loader-utils/
|
|
1276
|
+
// ../core/src/loader-utils/lib/request-utils/request-cache.ts
|
|
1275
1277
|
function createAbortError3() {
|
|
1276
1278
|
const error = new Error("Request aborted");
|
|
1277
1279
|
error.name = "AbortError";
|
|
@@ -1292,7 +1294,7 @@ function getValidByteLength(value) {
|
|
|
1292
1294
|
}
|
|
1293
1295
|
var DEFAULT_MAX_ENTRIES, DEFAULT_MAX_BYTES, RequestCache;
|
|
1294
1296
|
var init_request_cache = __esm({
|
|
1295
|
-
"../loader-utils/
|
|
1297
|
+
"../core/src/loader-utils/lib/request-utils/request-cache.ts"() {
|
|
1296
1298
|
"use strict";
|
|
1297
1299
|
DEFAULT_MAX_ENTRIES = Number.POSITIVE_INFINITY;
|
|
1298
1300
|
DEFAULT_MAX_BYTES = Number.POSITIVE_INFINITY;
|
|
@@ -1503,7 +1505,7 @@ var init_request_cache = __esm({
|
|
|
1503
1505
|
}
|
|
1504
1506
|
});
|
|
1505
1507
|
|
|
1506
|
-
// ../loader-utils/
|
|
1508
|
+
// ../core/src/loader-utils/lib/request-utils/request-credentials.ts
|
|
1507
1509
|
function createAuthenticatedFetch(options) {
|
|
1508
1510
|
const suppliedFetch = options.fetch || ((url, requestOptions) => fetch(url, requestOptions));
|
|
1509
1511
|
const existingMetadata = suppliedFetch[AUTHENTICATED_FETCH];
|
|
@@ -1733,7 +1735,7 @@ function createAbortError4() {
|
|
|
1733
1735
|
}
|
|
1734
1736
|
var AUTHENTICATED_FETCH, refreshPromises;
|
|
1735
1737
|
var init_request_credentials = __esm({
|
|
1736
|
-
"../loader-utils/
|
|
1738
|
+
"../core/src/loader-utils/lib/request-utils/request-credentials.ts"() {
|
|
1737
1739
|
"use strict";
|
|
1738
1740
|
init_authentication();
|
|
1739
1741
|
AUTHENTICATED_FETCH = /* @__PURE__ */ Symbol("loaders.gl.authenticated-fetch");
|
|
@@ -1741,7 +1743,7 @@ var init_request_credentials = __esm({
|
|
|
1741
1743
|
}
|
|
1742
1744
|
});
|
|
1743
1745
|
|
|
1744
|
-
// ../loader-utils/
|
|
1746
|
+
// ../core/src/loader-utils/lib/request-utils/range-request-scheduler.ts
|
|
1745
1747
|
function trackStatsEvent(stats, event) {
|
|
1746
1748
|
if ((event.type === "response" || event.type === "error") && event.networkTimeMs !== void 0) {
|
|
1747
1749
|
stats.get(RANGE_STATS_KEYS.networkTimeMs, "time").addTime(event.networkTimeMs);
|
|
@@ -1946,9 +1948,9 @@ function createAbortError5() {
|
|
|
1946
1948
|
}
|
|
1947
1949
|
var import_stats, RANGE_STATS_KEYS, DEFAULT_PROPS2, RangeRequestScheduler;
|
|
1948
1950
|
var init_range_request_scheduler = __esm({
|
|
1949
|
-
"../loader-utils/
|
|
1951
|
+
"../core/src/loader-utils/lib/request-utils/range-request-scheduler.ts"() {
|
|
1950
1952
|
"use strict";
|
|
1951
|
-
import_stats = require("
|
|
1953
|
+
import_stats = require("probe.gl/stats");
|
|
1952
1954
|
RANGE_STATS_KEYS = {
|
|
1953
1955
|
logicalRanges: "Logical Range Requests",
|
|
1954
1956
|
rangeBatches: "Range Request Batches",
|
|
@@ -1972,6 +1974,7 @@ var init_range_request_scheduler = __esm({
|
|
|
1972
1974
|
maxConcurrency: 6,
|
|
1973
1975
|
maxQueueSize: 4096,
|
|
1974
1976
|
maxRangeBytes: 64 * 1024 * 1024,
|
|
1977
|
+
maxTotalBytes: Number.MAX_SAFE_INTEGER,
|
|
1975
1978
|
stats: createRangeStats("range-request-scheduler-default"),
|
|
1976
1979
|
onEvent: () => {
|
|
1977
1980
|
}
|
|
@@ -1988,6 +1991,8 @@ var init_range_request_scheduler = __esm({
|
|
|
1988
1991
|
transportQueue = [];
|
|
1989
1992
|
/** Number of active transports. */
|
|
1990
1993
|
activeTransports = 0;
|
|
1994
|
+
/** Bytes reserved by started transports; failures and cancellation do not refund this budget. */
|
|
1995
|
+
reservedTransportBytes = 0;
|
|
1991
1996
|
/** Number of unsettled logical requests. */
|
|
1992
1997
|
queuedRequests = 0;
|
|
1993
1998
|
/** Unsettled requests retained until completion or disposal. */
|
|
@@ -2008,12 +2013,14 @@ var init_range_request_scheduler = __esm({
|
|
|
2008
2013
|
maxMergedBytes: props.maxMergedBytes ?? DEFAULT_PROPS2.maxMergedBytes,
|
|
2009
2014
|
maxConcurrency: props.maxConcurrency ?? 6,
|
|
2010
2015
|
maxQueueSize: props.maxQueueSize ?? 4096,
|
|
2011
|
-
maxRangeBytes: props.maxRangeBytes ?? 64 * 1024 * 1024
|
|
2016
|
+
maxRangeBytes: props.maxRangeBytes ?? 64 * 1024 * 1024,
|
|
2017
|
+
maxTotalBytes: props.maxTotalBytes ?? DEFAULT_PROPS2.maxTotalBytes
|
|
2012
2018
|
};
|
|
2013
2019
|
for (const value of [
|
|
2014
2020
|
this.props.maxConcurrency,
|
|
2015
2021
|
this.props.maxQueueSize,
|
|
2016
|
-
this.props.maxRangeBytes
|
|
2022
|
+
this.props.maxRangeBytes,
|
|
2023
|
+
this.props.maxTotalBytes
|
|
2017
2024
|
]) {
|
|
2018
2025
|
if (!Number.isSafeInteger(value) || value <= 0)
|
|
2019
2026
|
throw new Error("Range scheduler limits must be positive integers");
|
|
@@ -2206,6 +2213,9 @@ var init_range_request_scheduler = __esm({
|
|
|
2206
2213
|
}
|
|
2207
2214
|
const logicalBytes = getLogicalRequestBytes(requests);
|
|
2208
2215
|
const length = endOffset - offset;
|
|
2216
|
+
if (length > this.props.maxTotalBytes - this.reservedTransportBytes)
|
|
2217
|
+
throw new RangeError("Range request total byte limit exceeded");
|
|
2218
|
+
this.reservedTransportBytes += length;
|
|
2209
2219
|
this.trackEvent({
|
|
2210
2220
|
type: "request",
|
|
2211
2221
|
sourceId: mergedRequest.sourceId,
|
|
@@ -2341,7 +2351,7 @@ var init_range_request_scheduler = __esm({
|
|
|
2341
2351
|
}
|
|
2342
2352
|
});
|
|
2343
2353
|
|
|
2344
|
-
// ../loader-utils/
|
|
2354
|
+
// ../core/src/loader-utils/lib/request-utils/range-request-cache.ts
|
|
2345
2355
|
function getRangeKey(sourceId, offset, length) {
|
|
2346
2356
|
return `${sourceId}\0${offset}:${length}`;
|
|
2347
2357
|
}
|
|
@@ -2371,7 +2381,7 @@ function createAbortError6() {
|
|
|
2371
2381
|
}
|
|
2372
2382
|
var RangeRequestCache;
|
|
2373
2383
|
var init_range_request_cache = __esm({
|
|
2374
|
-
"../loader-utils/
|
|
2384
|
+
"../core/src/loader-utils/lib/request-utils/range-request-cache.ts"() {
|
|
2375
2385
|
"use strict";
|
|
2376
2386
|
init_request_cache();
|
|
2377
2387
|
RangeRequestCache = class {
|
|
@@ -2541,7 +2551,7 @@ var init_range_request_cache = __esm({
|
|
|
2541
2551
|
}
|
|
2542
2552
|
});
|
|
2543
2553
|
|
|
2544
|
-
// ../loader-utils/
|
|
2554
|
+
// ../core/src/loader-utils/lib/path-utils/file-aliases.ts
|
|
2545
2555
|
function resolvePath(filename) {
|
|
2546
2556
|
for (const alias in fileAliases) {
|
|
2547
2557
|
if (filename.startsWith(alias)) {
|
|
@@ -2556,14 +2566,14 @@ function resolvePath(filename) {
|
|
|
2556
2566
|
}
|
|
2557
2567
|
var pathPrefix, fileAliases;
|
|
2558
2568
|
var init_file_aliases = __esm({
|
|
2559
|
-
"../loader-utils/
|
|
2569
|
+
"../core/src/loader-utils/lib/path-utils/file-aliases.ts"() {
|
|
2560
2570
|
"use strict";
|
|
2561
2571
|
pathPrefix = "";
|
|
2562
2572
|
fileAliases = {};
|
|
2563
2573
|
}
|
|
2564
2574
|
});
|
|
2565
2575
|
|
|
2566
|
-
// ../loader-utils/
|
|
2576
|
+
// ../core/src/loader-utils/lib/binary-utils/memory-conversion-utils.ts
|
|
2567
2577
|
function ensureArrayBuffer(bufferSource) {
|
|
2568
2578
|
if (bufferSource instanceof ArrayBuffer) {
|
|
2569
2579
|
return bufferSource;
|
|
@@ -2584,16 +2594,16 @@ function copyToArrayBuffer2(buffer, byteOffset = 0, byteLength = buffer.byteLeng
|
|
|
2584
2594
|
return copy.buffer;
|
|
2585
2595
|
}
|
|
2586
2596
|
var init_memory_conversion_utils = __esm({
|
|
2587
|
-
"../loader-utils/
|
|
2597
|
+
"../core/src/loader-utils/lib/binary-utils/memory-conversion-utils.ts"() {
|
|
2588
2598
|
"use strict";
|
|
2589
2599
|
init_is_type();
|
|
2590
2600
|
}
|
|
2591
2601
|
});
|
|
2592
2602
|
|
|
2593
|
-
// ../loader-utils/
|
|
2603
|
+
// ../core/src/loader-utils/lib/files/blob-file.ts
|
|
2594
2604
|
var BlobFile;
|
|
2595
2605
|
var init_blob_file = __esm({
|
|
2596
|
-
"../loader-utils/
|
|
2606
|
+
"../core/src/loader-utils/lib/files/blob-file.ts"() {
|
|
2597
2607
|
"use strict";
|
|
2598
2608
|
BlobFile = class {
|
|
2599
2609
|
handle;
|
|
@@ -2629,7 +2639,7 @@ var init_blob_file = __esm({
|
|
|
2629
2639
|
}
|
|
2630
2640
|
});
|
|
2631
2641
|
|
|
2632
|
-
// ../loader-utils/
|
|
2642
|
+
// ../core/src/loader-utils/lib/sources/data-source.ts
|
|
2633
2643
|
function getFetchFunction(options) {
|
|
2634
2644
|
return getAuthenticatedFetch(options);
|
|
2635
2645
|
}
|
|
@@ -2681,7 +2691,7 @@ function unavailableCoreApiMethod(methodName) {
|
|
|
2681
2691
|
}
|
|
2682
2692
|
var UNAVAILABLE_CORE_API, DataSource;
|
|
2683
2693
|
var init_data_source = __esm({
|
|
2684
|
-
"../loader-utils/
|
|
2694
|
+
"../core/src/loader-utils/lib/sources/data-source.ts"() {
|
|
2685
2695
|
"use strict";
|
|
2686
2696
|
init_merge_options();
|
|
2687
2697
|
init_file_aliases();
|
|
@@ -2772,7 +2782,7 @@ var init_data_source = __esm({
|
|
|
2772
2782
|
}
|
|
2773
2783
|
});
|
|
2774
2784
|
|
|
2775
|
-
// ../loader-utils/
|
|
2785
|
+
// ../core/src/loader-utils/lib/scan-utils/columnar-predicate.ts
|
|
2776
2786
|
function getColumnarPredicateColumns(predicate) {
|
|
2777
2787
|
return [...new Set(getColumnarPredicatePaths(predicate).map((path) => path[0]))];
|
|
2778
2788
|
}
|
|
@@ -2816,12 +2826,12 @@ function visitColumnarPredicate(predicate, visitor) {
|
|
|
2816
2826
|
else if (predicate.op === "not") visitColumnarPredicate(predicate.args[0], visitor);
|
|
2817
2827
|
}
|
|
2818
2828
|
var init_columnar_predicate = __esm({
|
|
2819
|
-
"../loader-utils/
|
|
2829
|
+
"../core/src/loader-utils/lib/scan-utils/columnar-predicate.ts"() {
|
|
2820
2830
|
"use strict";
|
|
2821
2831
|
}
|
|
2822
2832
|
});
|
|
2823
2833
|
|
|
2824
|
-
// ../loader-utils/
|
|
2834
|
+
// ../core/src/loader-utils/lib/scan-utils/scan-executor.ts
|
|
2825
2835
|
async function* executeScanTasks(tasks, options = {}) {
|
|
2826
2836
|
var _a;
|
|
2827
2837
|
const concurrency = normalizeScanConcurrency(options.concurrency);
|
|
@@ -2912,7 +2922,7 @@ function throwIfScanAborted(signal) {
|
|
|
2912
2922
|
}
|
|
2913
2923
|
var DEFAULT_SCAN_CONCURRENCY, ScanValueQueue;
|
|
2914
2924
|
var init_scan_executor = __esm({
|
|
2915
|
-
"../loader-utils/
|
|
2925
|
+
"../core/src/loader-utils/lib/scan-utils/scan-executor.ts"() {
|
|
2916
2926
|
"use strict";
|
|
2917
2927
|
DEFAULT_SCAN_CONCURRENCY = 4;
|
|
2918
2928
|
ScanValueQueue = class {
|
|
@@ -2983,7 +2993,7 @@ var init_scan_executor = __esm({
|
|
|
2983
2993
|
}
|
|
2984
2994
|
});
|
|
2985
2995
|
|
|
2986
|
-
// ../loader-utils/
|
|
2996
|
+
// ../core/src/loader-utils/lib/scan-utils/scan-query-metadata.ts
|
|
2987
2997
|
function emitScanExecutionTelemetry(callback, telemetry) {
|
|
2988
2998
|
if (!callback) return;
|
|
2989
2999
|
try {
|
|
@@ -3068,13 +3078,13 @@ function getNonEmptyMetadataValue(metadata, key) {
|
|
|
3068
3078
|
}
|
|
3069
3079
|
var import_crs;
|
|
3070
3080
|
var init_scan_query_metadata = __esm({
|
|
3071
|
-
"../loader-utils/
|
|
3081
|
+
"../core/src/loader-utils/lib/scan-utils/scan-query-metadata.ts"() {
|
|
3072
3082
|
"use strict";
|
|
3073
|
-
import_crs = require("@math.gl/crs");
|
|
3083
|
+
import_crs = require("@math.gl/geospatial/crs");
|
|
3074
3084
|
}
|
|
3075
3085
|
});
|
|
3076
3086
|
|
|
3077
|
-
// ../loader-utils/
|
|
3087
|
+
// ../core/src/loader-utils/lib/scan-utils/table-query.ts
|
|
3078
3088
|
function planTableQuery(sourceColumnNames, options = {}) {
|
|
3079
3089
|
validateTableQueryOptions(sourceColumnNames, options);
|
|
3080
3090
|
const outputColumnNames = options.columns ? [...options.columns] : [...sourceColumnNames];
|
|
@@ -3119,23 +3129,23 @@ function validateTableQueryLimit(limit) {
|
|
|
3119
3129
|
}
|
|
3120
3130
|
}
|
|
3121
3131
|
var init_table_query = __esm({
|
|
3122
|
-
"../loader-utils/
|
|
3132
|
+
"../core/src/loader-utils/lib/scan-utils/table-query.ts"() {
|
|
3123
3133
|
"use strict";
|
|
3124
3134
|
init_columnar_predicate();
|
|
3125
3135
|
}
|
|
3126
3136
|
});
|
|
3127
3137
|
|
|
3128
|
-
// ../loader-utils/
|
|
3138
|
+
// ../core/src/loader-utils/lib/scan-utils/table-scan-batch.ts
|
|
3129
3139
|
function makeTableScanBatch(table) {
|
|
3130
3140
|
return { ...table, batchType: "data", length: table.data.numRows };
|
|
3131
3141
|
}
|
|
3132
3142
|
var init_table_scan_batch = __esm({
|
|
3133
|
-
"../loader-utils/
|
|
3143
|
+
"../core/src/loader-utils/lib/scan-utils/table-scan-batch.ts"() {
|
|
3134
3144
|
"use strict";
|
|
3135
3145
|
}
|
|
3136
3146
|
});
|
|
3137
3147
|
|
|
3138
|
-
// ../loader-utils/
|
|
3148
|
+
// ../core/src/loader-utils/lib/scan-utils/table-query-explain.ts
|
|
3139
3149
|
function explainTableQuery(sourceColumnNames, options, capabilities) {
|
|
3140
3150
|
const plan = planTableQuery(sourceColumnNames, options);
|
|
3141
3151
|
const outputColumns = options.columns ? [...options.columns] : [...sourceColumnNames];
|
|
@@ -3159,16 +3169,16 @@ function createOperatorExplanation(enabled, support) {
|
|
|
3159
3169
|
return Object.freeze({ enabled, support });
|
|
3160
3170
|
}
|
|
3161
3171
|
var init_table_query_explain = __esm({
|
|
3162
|
-
"../loader-utils/
|
|
3172
|
+
"../core/src/loader-utils/lib/scan-utils/table-query-explain.ts"() {
|
|
3163
3173
|
"use strict";
|
|
3164
3174
|
init_columnar_predicate();
|
|
3165
3175
|
init_table_query();
|
|
3166
3176
|
}
|
|
3167
3177
|
});
|
|
3168
3178
|
|
|
3169
|
-
// ../loader-utils/
|
|
3170
|
-
var
|
|
3171
|
-
"../loader-utils/
|
|
3179
|
+
// ../core/src/loader-utils/index.ts
|
|
3180
|
+
var init_loader_utils = __esm({
|
|
3181
|
+
"../core/src/loader-utils/index.ts"() {
|
|
3172
3182
|
"use strict";
|
|
3173
3183
|
init_globals();
|
|
3174
3184
|
init_js_module_utils();
|
|
@@ -3193,7 +3203,7 @@ var CompressionTransform, Decompressor;
|
|
|
3193
3203
|
var init_compression = __esm({
|
|
3194
3204
|
"../compression/src/lib/compression.ts"() {
|
|
3195
3205
|
"use strict";
|
|
3196
|
-
|
|
3206
|
+
init_loader_utils();
|
|
3197
3207
|
CompressionTransform = class {
|
|
3198
3208
|
/** Preloads any dynamic libraries. May enable sync functions */
|
|
3199
3209
|
async preload(modules = {}) {
|
|
@@ -3452,13 +3462,19 @@ var init_lazy_compression = __esm({
|
|
|
3452
3462
|
});
|
|
3453
3463
|
|
|
3454
3464
|
// ../compression/src/lib/compress-utils-compression.ts
|
|
3455
|
-
async function* transformBatches(stream, inputBatches) {
|
|
3465
|
+
async function* transformBatches(stream, inputBatches, maximumOutputByteLength = Number.POSITIVE_INFINITY) {
|
|
3466
|
+
let outputByteLength = 0;
|
|
3456
3467
|
try {
|
|
3457
3468
|
for await (const input of inputBatches) {
|
|
3458
3469
|
const output2 = stream.write(new Uint8Array(input));
|
|
3470
|
+
if (output2.byteLength > maximumOutputByteLength - outputByteLength)
|
|
3471
|
+
throw new RangeError("Decompressed output exceeds maxOutputByteLength");
|
|
3472
|
+
outputByteLength += output2.byteLength;
|
|
3459
3473
|
if (output2.byteLength > 0) yield copyArrayBuffer(output2);
|
|
3460
3474
|
}
|
|
3461
3475
|
const output = stream.finish();
|
|
3476
|
+
if (output.byteLength > maximumOutputByteLength - outputByteLength)
|
|
3477
|
+
throw new RangeError("Decompressed output exceeds maxOutputByteLength");
|
|
3462
3478
|
if (output.byteLength > 0) yield copyArrayBuffer(output);
|
|
3463
3479
|
} finally {
|
|
3464
3480
|
stream.destroy();
|
|
@@ -3473,14 +3489,23 @@ function getDecompressOptions(options, size) {
|
|
|
3473
3489
|
...size === void 0 ? {} : { expectedSize: size }
|
|
3474
3490
|
};
|
|
3475
3491
|
const capacity = decodeOptions.expectedSize;
|
|
3476
|
-
const maximum = options
|
|
3477
|
-
if (!Number.isSafeInteger(maximum) || maximum < 0 || maximum > 2147483647)
|
|
3478
|
-
throw new RangeError("Invalid maxOutputByteLength");
|
|
3492
|
+
const maximum = getMaximumOutputByteLength(options);
|
|
3479
3493
|
if (capacity !== void 0 && (!Number.isSafeInteger(capacity) || capacity < 0 || capacity > maximum)) {
|
|
3480
3494
|
throw new RangeError("expectedSize exceeds the configured output capacity limit");
|
|
3481
3495
|
}
|
|
3482
3496
|
return decodeOptions;
|
|
3483
3497
|
}
|
|
3498
|
+
function getMaximumOutputByteLength(options) {
|
|
3499
|
+
const maximum = options.maxOutputByteLength ?? 512 * 1024 * 1024;
|
|
3500
|
+
if (!Number.isSafeInteger(maximum) || maximum < 0 || maximum > 2147483647)
|
|
3501
|
+
throw new RangeError("Invalid maxOutputByteLength");
|
|
3502
|
+
return maximum;
|
|
3503
|
+
}
|
|
3504
|
+
function copyDecompressedOutput(bytes, options) {
|
|
3505
|
+
if (bytes.byteLength > getMaximumOutputByteLength(options))
|
|
3506
|
+
throw new RangeError("Decompressed output exceeds maxOutputByteLength");
|
|
3507
|
+
return copyArrayBuffer(bytes);
|
|
3508
|
+
}
|
|
3484
3509
|
var CompressUtilsDecompressor;
|
|
3485
3510
|
var init_compress_utils_compression = __esm({
|
|
3486
3511
|
"../compression/src/lib/compress-utils-compression.ts"() {
|
|
@@ -3526,8 +3551,9 @@ var init_compress_utils_compression = __esm({
|
|
|
3526
3551
|
var _a;
|
|
3527
3552
|
if (!((_a = this.module) == null ? void 0 : _a.decompressSync))
|
|
3528
3553
|
throw new Error(`${this.name}: call preload() before decompressSync()`);
|
|
3529
|
-
return
|
|
3530
|
-
this.module.decompressSync(new Uint8Array(input), getDecompressOptions(this.options, size))
|
|
3554
|
+
return copyDecompressedOutput(
|
|
3555
|
+
this.module.decompressSync(new Uint8Array(input), getDecompressOptions(this.options, size)),
|
|
3556
|
+
this.options
|
|
3531
3557
|
);
|
|
3532
3558
|
}
|
|
3533
3559
|
/** Decompresses one buffer with the selected compress-utils decoder. */
|
|
@@ -3536,7 +3562,7 @@ var init_compress_utils_compression = __esm({
|
|
|
3536
3562
|
await this.preload();
|
|
3537
3563
|
const module2 = this.module;
|
|
3538
3564
|
const output = await module2.decompress(new Uint8Array(input), decodeOptions);
|
|
3539
|
-
return
|
|
3565
|
+
return copyDecompressedOutput(output, this.options);
|
|
3540
3566
|
}
|
|
3541
3567
|
/** Incrementally decompresses input batches with compress-utils. */
|
|
3542
3568
|
async *decompressBatches(inputBatches) {
|
|
@@ -3546,8 +3572,9 @@ var init_compress_utils_compression = __esm({
|
|
|
3546
3572
|
yield await this.decompress(await this.concatenate(inputBatches));
|
|
3547
3573
|
return;
|
|
3548
3574
|
}
|
|
3575
|
+
const maximum = getMaximumOutputByteLength(this.options);
|
|
3549
3576
|
const stream = await module2.createDecompressStream();
|
|
3550
|
-
yield* transformBatches(stream, inputBatches);
|
|
3577
|
+
yield* transformBatches(stream, inputBatches, maximum);
|
|
3551
3578
|
}
|
|
3552
3579
|
};
|
|
3553
3580
|
}
|
|
@@ -3823,6 +3850,10 @@ var init_lz4_decompressor = __esm({
|
|
|
3823
3850
|
}
|
|
3824
3851
|
return this.raw.decompressSync(input, size);
|
|
3825
3852
|
}
|
|
3853
|
+
/** Incrementally decodes one frame or, with raw: true, one raw block. */
|
|
3854
|
+
async *decompressBatches(inputBatches) {
|
|
3855
|
+
yield* (this.useRaw ? this.raw : this.framed).decompressBatches(inputBatches);
|
|
3856
|
+
}
|
|
3826
3857
|
/** Validates the legacy Hadoop lengths in TypeScript before decoding each raw block. */
|
|
3827
3858
|
decodeHadoopBlocks(input, capacity) {
|
|
3828
3859
|
const view = new DataView(input);
|
|
@@ -3994,6 +4025,21 @@ var init_lzo_decompressor_compress_utils = __esm({
|
|
|
3994
4025
|
options
|
|
3995
4026
|
);
|
|
3996
4027
|
}
|
|
4028
|
+
/** Decodes a bounded atomic block after preload(). */
|
|
4029
|
+
decompressSync(input, size) {
|
|
4030
|
+
return super.decompressSync(input, this.requireCapacity(size));
|
|
4031
|
+
}
|
|
4032
|
+
/** Decodes a bounded atomic block, initializing the backend automatically. */
|
|
4033
|
+
async decompress(input, size) {
|
|
4034
|
+
return super.decompress(input, this.requireCapacity(size));
|
|
4035
|
+
}
|
|
4036
|
+
/** Prevents the backend from allocating inferred-size output before validation. */
|
|
4037
|
+
requireCapacity(size) {
|
|
4038
|
+
var _a;
|
|
4039
|
+
const capacity = size ?? ((_a = this.options.compressUtils) == null ? void 0 : _a.expectedSize);
|
|
4040
|
+
if (capacity === void 0) throw new RangeError("LZO atomic decoding requires expectedSize");
|
|
4041
|
+
return capacity;
|
|
4042
|
+
}
|
|
3997
4043
|
};
|
|
3998
4044
|
}
|
|
3999
4045
|
});
|
|
@@ -4098,109 +4144,14 @@ var init_default_codecs = __esm({
|
|
|
4098
4144
|
});
|
|
4099
4145
|
|
|
4100
4146
|
// ../compression/src/index.ts
|
|
4101
|
-
var
|
|
4147
|
+
var init_src = __esm({
|
|
4102
4148
|
"../compression/src/index.ts"() {
|
|
4103
4149
|
"use strict";
|
|
4104
4150
|
init_default_codecs();
|
|
4105
4151
|
}
|
|
4106
4152
|
});
|
|
4107
4153
|
|
|
4108
|
-
// ../schema-utils/
|
|
4109
|
-
function getDataTypeFromValue(value, defaultNumberType = "float32") {
|
|
4110
|
-
if (value instanceof Date) {
|
|
4111
|
-
return "date-millisecond";
|
|
4112
|
-
}
|
|
4113
|
-
if (typeof value === "number") {
|
|
4114
|
-
return defaultNumberType;
|
|
4115
|
-
}
|
|
4116
|
-
if (typeof value === "boolean") {
|
|
4117
|
-
return "bool";
|
|
4118
|
-
}
|
|
4119
|
-
if (typeof value === "string") {
|
|
4120
|
-
return "utf8";
|
|
4121
|
-
}
|
|
4122
|
-
if (value === null || value === "undefined") {
|
|
4123
|
-
return "null";
|
|
4124
|
-
}
|
|
4125
|
-
return "null";
|
|
4126
|
-
}
|
|
4127
|
-
function getDataTypeFromArray(array) {
|
|
4128
|
-
let type = getDataTypeFromTypedArray(array);
|
|
4129
|
-
if (type !== "null") {
|
|
4130
|
-
return { type, nullable: false };
|
|
4131
|
-
}
|
|
4132
|
-
if (array.length > 0) {
|
|
4133
|
-
type = getDataTypeFromValue(array[0]);
|
|
4134
|
-
return { type, nullable: true };
|
|
4135
|
-
}
|
|
4136
|
-
return { type: "null", nullable: true };
|
|
4137
|
-
}
|
|
4138
|
-
function getDataTypeFromTypedArray(array) {
|
|
4139
|
-
if (typeof Float16Array !== "undefined" && array instanceof Float16Array) {
|
|
4140
|
-
return "float16";
|
|
4141
|
-
}
|
|
4142
|
-
switch (array.constructor) {
|
|
4143
|
-
case Int8Array:
|
|
4144
|
-
return "int8";
|
|
4145
|
-
case Uint8Array:
|
|
4146
|
-
case Uint8ClampedArray:
|
|
4147
|
-
return "uint8";
|
|
4148
|
-
case Int16Array:
|
|
4149
|
-
return "int16";
|
|
4150
|
-
case Uint16Array:
|
|
4151
|
-
return "uint16";
|
|
4152
|
-
case Int32Array:
|
|
4153
|
-
return "int32";
|
|
4154
|
-
case Uint32Array:
|
|
4155
|
-
return "uint32";
|
|
4156
|
-
case BigInt64Array:
|
|
4157
|
-
return "int64";
|
|
4158
|
-
case BigUint64Array:
|
|
4159
|
-
return "uint64";
|
|
4160
|
-
case Float32Array:
|
|
4161
|
-
return "float32";
|
|
4162
|
-
case Float64Array:
|
|
4163
|
-
return "float64";
|
|
4164
|
-
default:
|
|
4165
|
-
return "null";
|
|
4166
|
-
}
|
|
4167
|
-
}
|
|
4168
|
-
function getArrayTypeFromDataType(type, nullable) {
|
|
4169
|
-
if (!nullable) {
|
|
4170
|
-
switch (type) {
|
|
4171
|
-
case "int8":
|
|
4172
|
-
return Int8Array;
|
|
4173
|
-
case "uint8":
|
|
4174
|
-
return Uint8Array;
|
|
4175
|
-
case "int16":
|
|
4176
|
-
return Int16Array;
|
|
4177
|
-
case "uint16":
|
|
4178
|
-
return Uint16Array;
|
|
4179
|
-
case "int32":
|
|
4180
|
-
return Int32Array;
|
|
4181
|
-
case "uint32":
|
|
4182
|
-
return Uint32Array;
|
|
4183
|
-
case "float32":
|
|
4184
|
-
return Float32Array;
|
|
4185
|
-
case "float64":
|
|
4186
|
-
return Float64Array;
|
|
4187
|
-
case "float16":
|
|
4188
|
-
return (0, import_types.getFloat16ArrayConstructor)();
|
|
4189
|
-
default:
|
|
4190
|
-
break;
|
|
4191
|
-
}
|
|
4192
|
-
}
|
|
4193
|
-
return Array;
|
|
4194
|
-
}
|
|
4195
|
-
var import_types;
|
|
4196
|
-
var init_data_type = __esm({
|
|
4197
|
-
"../schema-utils/src/lib/schema/data-type.ts"() {
|
|
4198
|
-
"use strict";
|
|
4199
|
-
import_types = require("@math.gl/types");
|
|
4200
|
-
}
|
|
4201
|
-
});
|
|
4202
|
-
|
|
4203
|
-
// ../schema-utils/src/lib/schema/convert-arrow-schema.ts
|
|
4154
|
+
// ../core/src/schema-utils/lib/schema/convert-arrow-schema.ts
|
|
4204
4155
|
function convertSchemaToArrow(schema, options) {
|
|
4205
4156
|
return deserializeArrowSchema(schema, options);
|
|
4206
4157
|
}
|
|
@@ -4633,570 +4584,168 @@ function deserializeArrowDictionaryKeyType(keyType) {
|
|
|
4633
4584
|
}
|
|
4634
4585
|
var arrow2;
|
|
4635
4586
|
var init_convert_arrow_schema = __esm({
|
|
4636
|
-
"../schema-utils/
|
|
4587
|
+
"../core/src/schema-utils/lib/schema/convert-arrow-schema.ts"() {
|
|
4637
4588
|
"use strict";
|
|
4638
4589
|
arrow2 = __toESM(require("apache-arrow"), 1);
|
|
4639
4590
|
}
|
|
4640
4591
|
});
|
|
4641
4592
|
|
|
4642
|
-
// ../schema-utils/
|
|
4643
|
-
function
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
case "object-row-table":
|
|
4647
|
-
return deduceSchemaFromRows(table.data);
|
|
4648
|
-
case "geojson-table":
|
|
4649
|
-
return deduceSchemaFromGeoJSON(table.features);
|
|
4650
|
-
case "columnar-table":
|
|
4651
|
-
return deduceSchemaFromColumns(table.data);
|
|
4652
|
-
case "arrow-table":
|
|
4653
|
-
default:
|
|
4654
|
-
throw new Error("Deduce schema");
|
|
4655
|
-
}
|
|
4656
|
-
}
|
|
4657
|
-
function deduceSchemaFromColumns(columnarTable) {
|
|
4658
|
-
const fields = [];
|
|
4659
|
-
for (const [columnName, column] of Object.entries(columnarTable)) {
|
|
4660
|
-
const field = deduceFieldFromColumn(column, columnName);
|
|
4661
|
-
fields.push(field);
|
|
4593
|
+
// ../core/src/schema-utils/lib/arrow/split-arrow-buffers.ts
|
|
4594
|
+
function splitArrowBuffers(input, options = {}) {
|
|
4595
|
+
if (isArrowTable(input)) {
|
|
4596
|
+
return splitArrowTableBuffersInternal(input, options);
|
|
4662
4597
|
}
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
function deduceSchemaFromRows(rowTable) {
|
|
4666
|
-
if (!rowTable.length) {
|
|
4667
|
-
throw new Error("deduce from empty table");
|
|
4598
|
+
if (isArrowRecordBatch(input)) {
|
|
4599
|
+
return splitArrowRecordBatchBuffers(input, options);
|
|
4668
4600
|
}
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
for (const [columnName, value] of Object.entries(row0)) {
|
|
4672
|
-
fields.push(deduceFieldFromValue(value, columnName));
|
|
4601
|
+
if (isArrowVector(input)) {
|
|
4602
|
+
return splitArrowVectorBuffers(input, options);
|
|
4673
4603
|
}
|
|
4674
|
-
return
|
|
4604
|
+
return splitArrowDataBuffers(input, options);
|
|
4675
4605
|
}
|
|
4676
|
-
function
|
|
4677
|
-
|
|
4678
|
-
throw new Error("deduce from empty table");
|
|
4679
|
-
}
|
|
4680
|
-
const fields = [];
|
|
4681
|
-
const row0 = features[0].properties || {};
|
|
4682
|
-
for (const [columnName, value] of Object.entries(row0)) {
|
|
4683
|
-
fields.push(deduceFieldFromValue(value, columnName));
|
|
4684
|
-
}
|
|
4685
|
-
return { fields, metadata: {} };
|
|
4606
|
+
function isArrowTable(input) {
|
|
4607
|
+
return "batches" in input;
|
|
4686
4608
|
}
|
|
4687
|
-
function
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4609
|
+
function isArrowRecordBatch(input) {
|
|
4610
|
+
return "schema" in input && "data" in input && !Array.isArray(input.data);
|
|
4611
|
+
}
|
|
4612
|
+
function isArrowVector(input) {
|
|
4613
|
+
return "data" in input && Array.isArray(input.data);
|
|
4614
|
+
}
|
|
4615
|
+
function splitArrowTableBuffersInternal(table, options) {
|
|
4616
|
+
const recordBatches = table.batches.map(
|
|
4617
|
+
(recordBatch) => splitArrowRecordBatchBuffers(recordBatch, options)
|
|
4618
|
+
);
|
|
4619
|
+
return new arrow3.Table(table.schema, recordBatches);
|
|
4620
|
+
}
|
|
4621
|
+
function splitArrowRecordBatchBuffers(recordBatch, options) {
|
|
4622
|
+
return new arrow3.RecordBatch(
|
|
4623
|
+
recordBatch.schema,
|
|
4624
|
+
splitArrowDataBuffers(recordBatch.data, options)
|
|
4625
|
+
);
|
|
4626
|
+
}
|
|
4627
|
+
function splitArrowDataBuffers(data, options) {
|
|
4628
|
+
const children = data.children.map((childData) => splitArrowDataBuffers(childData, options));
|
|
4629
|
+
const dictionary = data.dictionary ? splitArrowVectorBuffers(data.dictionary, options) : void 0;
|
|
4630
|
+
const buffers = {
|
|
4631
|
+
[arrow3.BufferType.OFFSET]: splitArrowBuffer(data.buffers[arrow3.BufferType.OFFSET], options),
|
|
4632
|
+
[arrow3.BufferType.DATA]: splitArrowBuffer(data.buffers[arrow3.BufferType.DATA], options),
|
|
4633
|
+
[arrow3.BufferType.VALIDITY]: splitArrowBuffer(data.buffers[arrow3.BufferType.VALIDITY], options),
|
|
4634
|
+
[arrow3.BufferType.TYPE]: splitArrowBuffer(data.buffers[arrow3.BufferType.TYPE], options)
|
|
4635
|
+
};
|
|
4636
|
+
return new arrow3.Data(
|
|
4637
|
+
data.type,
|
|
4638
|
+
data.offset,
|
|
4639
|
+
data.length,
|
|
4640
|
+
// @ts-expect-error _nullCount is protected. Reuse it to preserve lazy null-count state.
|
|
4641
|
+
data._nullCount,
|
|
4642
|
+
buffers,
|
|
4643
|
+
children,
|
|
4644
|
+
dictionary
|
|
4645
|
+
);
|
|
4646
|
+
}
|
|
4647
|
+
function splitArrowVectorBuffers(vector, options) {
|
|
4648
|
+
return new arrow3.Vector(vector.data.map((data) => splitArrowDataBuffers(data, options)));
|
|
4649
|
+
}
|
|
4650
|
+
function splitArrowBuffer(array, options) {
|
|
4651
|
+
if (!isArrowTypedArray(array)) {
|
|
4652
|
+
return array;
|
|
4696
4653
|
}
|
|
4697
|
-
if (
|
|
4698
|
-
|
|
4699
|
-
const type = getDataTypeFromValue(value);
|
|
4700
|
-
return {
|
|
4701
|
-
name,
|
|
4702
|
-
type,
|
|
4703
|
-
nullable: true
|
|
4704
|
-
// metadata: {},
|
|
4705
|
-
};
|
|
4654
|
+
if (options.copy === "none") {
|
|
4655
|
+
return array;
|
|
4706
4656
|
}
|
|
4707
|
-
|
|
4657
|
+
if (options.copy !== "all" && array.byteOffset === 0 && array.byteLength === array.buffer.byteLength) {
|
|
4658
|
+
return array;
|
|
4659
|
+
}
|
|
4660
|
+
return array.slice();
|
|
4708
4661
|
}
|
|
4709
|
-
function
|
|
4710
|
-
|
|
4711
|
-
return {
|
|
4712
|
-
name,
|
|
4713
|
-
type,
|
|
4714
|
-
nullable: true
|
|
4715
|
-
// metadata: {}
|
|
4716
|
-
};
|
|
4662
|
+
function isArrowTypedArray(value) {
|
|
4663
|
+
return ArrayBuffer.isView(value) && !(value instanceof DataView);
|
|
4717
4664
|
}
|
|
4718
|
-
var
|
|
4719
|
-
|
|
4665
|
+
var arrow3;
|
|
4666
|
+
var init_split_arrow_buffers = __esm({
|
|
4667
|
+
"../core/src/schema-utils/lib/arrow/split-arrow-buffers.ts"() {
|
|
4720
4668
|
"use strict";
|
|
4721
|
-
|
|
4669
|
+
arrow3 = __toESM(require("apache-arrow"), 1);
|
|
4722
4670
|
}
|
|
4723
4671
|
});
|
|
4724
4672
|
|
|
4725
|
-
// ../schema-utils/
|
|
4726
|
-
function
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
const arrowTable = table.data;
|
|
4735
|
-
return arrowTable.numRows;
|
|
4736
|
-
case "columnar-table":
|
|
4737
|
-
for (const column of Object.values(table.data)) {
|
|
4738
|
-
return column.length || 0;
|
|
4739
|
-
}
|
|
4740
|
-
return 0;
|
|
4741
|
-
default:
|
|
4742
|
-
throw new Error("table");
|
|
4743
|
-
}
|
|
4744
|
-
}
|
|
4745
|
-
function getTableNumCols(table) {
|
|
4746
|
-
if (table.schema) {
|
|
4747
|
-
return table.schema.fields.length;
|
|
4748
|
-
}
|
|
4749
|
-
if (getTableLength(table) === 0) {
|
|
4750
|
-
throw new Error("empty table");
|
|
4751
|
-
}
|
|
4752
|
-
switch (table.shape) {
|
|
4753
|
-
case "array-row-table":
|
|
4754
|
-
return table.data[0].length;
|
|
4755
|
-
case "object-row-table":
|
|
4756
|
-
return Object.keys(table.data[0]).length;
|
|
4757
|
-
case "geojson-table":
|
|
4758
|
-
return Object.keys(table.features[0]).length;
|
|
4759
|
-
case "columnar-table":
|
|
4760
|
-
return Object.keys(table.data).length;
|
|
4761
|
-
case "arrow-table":
|
|
4762
|
-
const arrowTable = table.data;
|
|
4763
|
-
return arrowTable.numCols;
|
|
4764
|
-
default:
|
|
4765
|
-
throw new Error("table");
|
|
4766
|
-
}
|
|
4673
|
+
// ../core/src/schema-utils/lib/arrow/arrow-table-transport.ts
|
|
4674
|
+
function dehydrateArrowTable(table, options) {
|
|
4675
|
+
const splitTable = splitArrowBuffers(table, options);
|
|
4676
|
+
return {
|
|
4677
|
+
shape: "arrow-table",
|
|
4678
|
+
transport: "arrow-js",
|
|
4679
|
+
schema: serializeArrowSchema(splitTable.schema),
|
|
4680
|
+
batches: splitTable.batches.map((recordBatch) => dehydrateArrowRecordBatch(recordBatch))
|
|
4681
|
+
};
|
|
4767
4682
|
}
|
|
4768
|
-
function
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
case "object-row-table":
|
|
4775
|
-
return table.data[rowIndex][columnName];
|
|
4776
|
-
case "geojson-table":
|
|
4777
|
-
return table.features[rowIndex][columnName];
|
|
4778
|
-
case "columnar-table":
|
|
4779
|
-
const column = table.data[columnName];
|
|
4780
|
-
return column[rowIndex];
|
|
4781
|
-
case "arrow-table":
|
|
4782
|
-
const arrowTable = table.data;
|
|
4783
|
-
const arrowColumnIndex = arrowTable.schema.fields.findIndex(
|
|
4784
|
-
(field) => field.name === columnName
|
|
4785
|
-
);
|
|
4786
|
-
return (_a = arrowTable.getChildAt(arrowColumnIndex)) == null ? void 0 : _a.get(rowIndex);
|
|
4787
|
-
default:
|
|
4788
|
-
throw new Error("todo");
|
|
4789
|
-
}
|
|
4683
|
+
function hydrateArrowTable(table) {
|
|
4684
|
+
const schema = deserializeArrowSchema(table.schema);
|
|
4685
|
+
const recordBatches = table.batches.map(
|
|
4686
|
+
(recordBatch) => new arrow4.RecordBatch(schema, hydrateArrowData(recordBatch.data))
|
|
4687
|
+
);
|
|
4688
|
+
return new arrow4.Table(schema, recordBatches);
|
|
4790
4689
|
}
|
|
4791
|
-
function
|
|
4792
|
-
|
|
4793
|
-
switch (table.shape) {
|
|
4794
|
-
case "array-row-table":
|
|
4795
|
-
return table.data[rowIndex][columnIndex];
|
|
4796
|
-
case "object-row-table":
|
|
4797
|
-
const columnName1 = getTableColumnName(table, columnIndex);
|
|
4798
|
-
return table.data[rowIndex][columnName1];
|
|
4799
|
-
case "geojson-table":
|
|
4800
|
-
const columnName2 = getTableColumnName(table, columnIndex);
|
|
4801
|
-
return table.features[rowIndex][columnName2];
|
|
4802
|
-
case "columnar-table":
|
|
4803
|
-
const columnName3 = getTableColumnName(table, columnIndex);
|
|
4804
|
-
const column = table.data[columnName3];
|
|
4805
|
-
return column[rowIndex];
|
|
4806
|
-
case "arrow-table":
|
|
4807
|
-
const arrowTable = table.data;
|
|
4808
|
-
return (_a = arrowTable.getChildAt(columnIndex)) == null ? void 0 : _a.get(rowIndex);
|
|
4809
|
-
default:
|
|
4810
|
-
throw new Error("todo");
|
|
4811
|
-
}
|
|
4690
|
+
function dehydrateArrowRecordBatch(recordBatch) {
|
|
4691
|
+
return { data: dehydrateArrowData(recordBatch.data) };
|
|
4812
4692
|
}
|
|
4813
|
-
function
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4693
|
+
function dehydrateArrowData(data) {
|
|
4694
|
+
return {
|
|
4695
|
+
type: serializeArrowType(data.type),
|
|
4696
|
+
offset: data.offset,
|
|
4697
|
+
length: data.length,
|
|
4698
|
+
// @ts-expect-error _nullCount is protected. Preserve the Arrow lazy null-count state.
|
|
4699
|
+
nullCount: data._nullCount,
|
|
4700
|
+
buffers: {
|
|
4701
|
+
[arrow4.BufferType.OFFSET]: data.buffers[arrow4.BufferType.OFFSET],
|
|
4702
|
+
[arrow4.BufferType.DATA]: data.buffers[arrow4.BufferType.DATA],
|
|
4703
|
+
[arrow4.BufferType.VALIDITY]: data.buffers[arrow4.BufferType.VALIDITY],
|
|
4704
|
+
[arrow4.BufferType.TYPE]: data.buffers[arrow4.BufferType.TYPE]
|
|
4705
|
+
},
|
|
4706
|
+
children: data.children.map((childData) => dehydrateArrowData(childData)),
|
|
4707
|
+
dictionary: data.dictionary ? dehydrateArrowVector(data.dictionary) : void 0
|
|
4708
|
+
};
|
|
4820
4709
|
}
|
|
4821
|
-
function
|
|
4822
|
-
|
|
4823
|
-
const columnName = (_b = (_a = table.schema) == null ? void 0 : _a.fields[columnIndex]) == null ? void 0 : _b.name;
|
|
4824
|
-
if (!columnName) {
|
|
4825
|
-
throw new Error(`${columnIndex}`);
|
|
4826
|
-
}
|
|
4827
|
-
return columnName;
|
|
4710
|
+
function dehydrateArrowVector(vector) {
|
|
4711
|
+
return { data: vector.data.map((data) => dehydrateArrowData(data)) };
|
|
4828
4712
|
}
|
|
4829
|
-
function
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
throw new Error("no schema");
|
|
4842
|
-
case "geojson-table":
|
|
4843
|
-
if (table.schema) {
|
|
4844
|
-
const objectRow2 = target || {};
|
|
4845
|
-
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
4846
|
-
objectRow2[table.schema.fields[i].name] = table.features[rowIndex][table.schema.fields[i].name];
|
|
4847
|
-
}
|
|
4848
|
-
return objectRow2;
|
|
4849
|
-
}
|
|
4850
|
-
throw new Error("no schema");
|
|
4851
|
-
case "columnar-table":
|
|
4852
|
-
if (table.schema) {
|
|
4853
|
-
const objectRow2 = target || {};
|
|
4854
|
-
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
4855
|
-
objectRow2[table.schema.fields[i].name] = table.data[table.schema.fields[i].name][rowIndex];
|
|
4856
|
-
}
|
|
4857
|
-
return objectRow2;
|
|
4858
|
-
} else {
|
|
4859
|
-
const objectRow2 = target || {};
|
|
4860
|
-
for (const [name, column] of Object.entries(table.data)) {
|
|
4861
|
-
objectRow2[name] = column[rowIndex];
|
|
4862
|
-
}
|
|
4863
|
-
return objectRow2;
|
|
4864
|
-
}
|
|
4865
|
-
case "arrow-table":
|
|
4866
|
-
const arrowTable = table.data;
|
|
4867
|
-
const objectRow = target || {};
|
|
4868
|
-
const row = arrowTable.get(rowIndex);
|
|
4869
|
-
const schema = arrowTable.schema;
|
|
4870
|
-
for (let i = 0; i < schema.fields.length; i++) {
|
|
4871
|
-
objectRow[schema.fields[i].name] = row == null ? void 0 : row[schema.fields[i].name];
|
|
4872
|
-
}
|
|
4873
|
-
return objectRow;
|
|
4874
|
-
default:
|
|
4875
|
-
throw new Error("shape");
|
|
4876
|
-
}
|
|
4713
|
+
function hydrateArrowData(data) {
|
|
4714
|
+
const children = data.children.map((childData) => hydrateArrowData(childData));
|
|
4715
|
+
const dictionary = data.dictionary ? hydrateArrowVector(data.dictionary) : void 0;
|
|
4716
|
+
return new arrow4.Data(
|
|
4717
|
+
deserializeArrowType(data.type),
|
|
4718
|
+
data.offset,
|
|
4719
|
+
data.length,
|
|
4720
|
+
data.nullCount,
|
|
4721
|
+
data.buffers,
|
|
4722
|
+
children,
|
|
4723
|
+
dictionary
|
|
4724
|
+
);
|
|
4877
4725
|
}
|
|
4878
|
-
function
|
|
4879
|
-
|
|
4880
|
-
case "array-row-table":
|
|
4881
|
-
return copy ? Array.from(table.data[rowIndex]) : table.data[rowIndex];
|
|
4882
|
-
case "object-row-table":
|
|
4883
|
-
if (table.schema) {
|
|
4884
|
-
const arrayRow2 = target || [];
|
|
4885
|
-
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
4886
|
-
arrayRow2[i] = table.data[rowIndex][table.schema.fields[i].name];
|
|
4887
|
-
}
|
|
4888
|
-
return arrayRow2;
|
|
4889
|
-
}
|
|
4890
|
-
return Object.values(table.data[rowIndex]);
|
|
4891
|
-
case "geojson-table":
|
|
4892
|
-
if (table.schema) {
|
|
4893
|
-
const arrayRow2 = target || [];
|
|
4894
|
-
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
4895
|
-
arrayRow2[i] = table.features[rowIndex][table.schema.fields[i].name];
|
|
4896
|
-
}
|
|
4897
|
-
return arrayRow2;
|
|
4898
|
-
}
|
|
4899
|
-
return Object.values(table.features[rowIndex]);
|
|
4900
|
-
case "columnar-table":
|
|
4901
|
-
if (table.schema) {
|
|
4902
|
-
const arrayRow2 = target || [];
|
|
4903
|
-
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
4904
|
-
arrayRow2[i] = table.data[table.schema.fields[i].name][rowIndex];
|
|
4905
|
-
}
|
|
4906
|
-
return arrayRow2;
|
|
4907
|
-
} else {
|
|
4908
|
-
const arrayRow2 = target || [];
|
|
4909
|
-
let i = 0;
|
|
4910
|
-
for (const column of Object.values(table.data)) {
|
|
4911
|
-
arrayRow2[i] = column[rowIndex];
|
|
4912
|
-
i++;
|
|
4913
|
-
}
|
|
4914
|
-
return arrayRow2;
|
|
4915
|
-
}
|
|
4916
|
-
case "arrow-table":
|
|
4917
|
-
const arrowTable = table.data;
|
|
4918
|
-
const arrayRow = target || [];
|
|
4919
|
-
const row = arrowTable.get(rowIndex);
|
|
4920
|
-
const schema = arrowTable.schema;
|
|
4921
|
-
for (let i = 0; i < schema.fields.length; i++) {
|
|
4922
|
-
arrayRow[i] = row == null ? void 0 : row[schema.fields[i].name];
|
|
4923
|
-
}
|
|
4924
|
-
return arrayRow;
|
|
4925
|
-
default:
|
|
4926
|
-
throw new Error("shape");
|
|
4927
|
-
}
|
|
4726
|
+
function hydrateArrowVector(vector) {
|
|
4727
|
+
return new arrow4.Vector(vector.data.map((data) => hydrateArrowData(data)));
|
|
4928
4728
|
}
|
|
4929
|
-
var
|
|
4930
|
-
|
|
4729
|
+
var arrow4;
|
|
4730
|
+
var init_arrow_table_transport = __esm({
|
|
4731
|
+
"../core/src/schema-utils/lib/arrow/arrow-table-transport.ts"() {
|
|
4931
4732
|
"use strict";
|
|
4733
|
+
arrow4 = __toESM(require("apache-arrow"), 1);
|
|
4734
|
+
init_convert_arrow_schema();
|
|
4735
|
+
init_split_arrow_buffers();
|
|
4932
4736
|
}
|
|
4933
4737
|
});
|
|
4934
4738
|
|
|
4935
|
-
// ../schema-utils/
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
return new ArrayType(length);
|
|
4939
|
-
}
|
|
4940
|
-
var init_table_column = __esm({
|
|
4941
|
-
"../schema-utils/src/lib/table/tables/table-column.ts"() {
|
|
4739
|
+
// ../core/src/schema-utils/arrow-transport.ts
|
|
4740
|
+
var init_arrow_transport = __esm({
|
|
4741
|
+
"../core/src/schema-utils/arrow-transport.ts"() {
|
|
4942
4742
|
"use strict";
|
|
4943
|
-
|
|
4743
|
+
init_arrow_table_transport();
|
|
4744
|
+
init_split_arrow_buffers();
|
|
4944
4745
|
}
|
|
4945
4746
|
});
|
|
4946
4747
|
|
|
4947
|
-
// ../
|
|
4948
|
-
function* makeArrowRecordBatchIterator(table, options) {
|
|
4949
|
-
const arrowSchema = convertSchemaToArrow(table.schema);
|
|
4950
|
-
const length = getTableLength(table);
|
|
4951
|
-
const numColumns = getTableNumCols(table);
|
|
4952
|
-
const batchSize = (options == null ? void 0 : options.batchSize) || length;
|
|
4953
|
-
const builders = arrowSchema == null ? void 0 : arrowSchema.fields.map(
|
|
4954
|
-
(arrowField) => arrow3.makeBuilder({
|
|
4955
|
-
type: arrowField.type,
|
|
4956
|
-
nullValues: [null, void 0]
|
|
4957
|
-
})
|
|
4958
|
-
);
|
|
4959
|
-
const structField = new arrow3.Struct(arrowSchema.fields);
|
|
4960
|
-
let batchLength = 0;
|
|
4961
|
-
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
4962
|
-
for (let columnIndex = 0; columnIndex < numColumns; ++columnIndex) {
|
|
4963
|
-
const value = getTableCellAt(table, rowIndex, columnIndex);
|
|
4964
|
-
const builder = builders[columnIndex];
|
|
4965
|
-
builder.append(value);
|
|
4966
|
-
}
|
|
4967
|
-
batchLength++;
|
|
4968
|
-
if (batchLength >= batchSize) {
|
|
4969
|
-
const datas = builders.map((builder) => builder.flush());
|
|
4970
|
-
const structData = new arrow3.Data(structField, 0, batchLength, 0, void 0, datas);
|
|
4971
|
-
yield new arrow3.RecordBatch(arrowSchema, structData);
|
|
4972
|
-
batchLength = 0;
|
|
4973
|
-
}
|
|
4974
|
-
}
|
|
4975
|
-
if (batchLength > 0) {
|
|
4976
|
-
const datas = builders.map((builder) => builder.flush());
|
|
4977
|
-
const structData = new arrow3.Data(structField, 0, batchLength, 0, void 0, datas);
|
|
4978
|
-
yield new arrow3.RecordBatch(arrowSchema, structData);
|
|
4979
|
-
batchLength = 0;
|
|
4980
|
-
}
|
|
4981
|
-
builders.map((builder) => builder.finish());
|
|
4982
|
-
}
|
|
4983
|
-
var arrow3;
|
|
4984
|
-
var init_make_arrow_batch_iterator = __esm({
|
|
4985
|
-
"../schema-utils/src/lib/table/batches/make-arrow-batch-iterator.ts"() {
|
|
4986
|
-
"use strict";
|
|
4987
|
-
arrow3 = __toESM(require("apache-arrow"), 1);
|
|
4988
|
-
init_convert_arrow_schema();
|
|
4989
|
-
init_table_accessors();
|
|
4990
|
-
}
|
|
4991
|
-
});
|
|
4992
|
-
|
|
4993
|
-
// ../schema-utils/src/lib/table/tables/convert-arrow-table.ts
|
|
4994
|
-
function convertTableToArrow(table, options) {
|
|
4995
|
-
switch (table.shape) {
|
|
4996
|
-
case "arrow-table":
|
|
4997
|
-
return table.data;
|
|
4998
|
-
case "columnar-table":
|
|
4999
|
-
// TODO - optimized implementation is possible
|
|
5000
|
-
// return convertColumnarTableToArrow(table, options);
|
|
5001
|
-
// fall through
|
|
5002
|
-
default:
|
|
5003
|
-
const arrowBatchIterator = makeArrowRecordBatchIterator(table, options);
|
|
5004
|
-
return new arrow4.Table(arrowBatchIterator);
|
|
5005
|
-
}
|
|
5006
|
-
}
|
|
5007
|
-
var arrow4;
|
|
5008
|
-
var init_convert_arrow_table = __esm({
|
|
5009
|
-
"../schema-utils/src/lib/table/tables/convert-arrow-table.ts"() {
|
|
5010
|
-
"use strict";
|
|
5011
|
-
arrow4 = __toESM(require("apache-arrow"), 1);
|
|
5012
|
-
init_make_arrow_batch_iterator();
|
|
5013
|
-
}
|
|
5014
|
-
});
|
|
5015
|
-
|
|
5016
|
-
// ../schema-utils/src/lib/table/tables/convert-table.ts
|
|
5017
|
-
function convertTable(table, shape) {
|
|
5018
|
-
switch (shape) {
|
|
5019
|
-
case "object-row-table":
|
|
5020
|
-
return convertToObjectRowTable(table);
|
|
5021
|
-
case "array-row-table":
|
|
5022
|
-
return convertToArrayRowTable(table);
|
|
5023
|
-
case "columnar-table":
|
|
5024
|
-
return convertToColumnarTable(table);
|
|
5025
|
-
case "arrow-table":
|
|
5026
|
-
return convertToArrowTable(table);
|
|
5027
|
-
default:
|
|
5028
|
-
throw new Error(shape);
|
|
5029
|
-
}
|
|
5030
|
-
}
|
|
5031
|
-
function convertToColumnarTable(table) {
|
|
5032
|
-
const schema = table.schema || deduceTableSchema(table);
|
|
5033
|
-
const fields = schema.fields;
|
|
5034
|
-
if (table.shape === "columnar-table") {
|
|
5035
|
-
return { ...table, schema };
|
|
5036
|
-
}
|
|
5037
|
-
const length = getTableLength(table);
|
|
5038
|
-
const columns = {};
|
|
5039
|
-
for (const field of fields) {
|
|
5040
|
-
const column = makeColumnFromField(field, length);
|
|
5041
|
-
columns[field.name] = column;
|
|
5042
|
-
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
5043
|
-
column[rowIndex] = getTableCell(table, rowIndex, field.name);
|
|
5044
|
-
}
|
|
5045
|
-
}
|
|
5046
|
-
return {
|
|
5047
|
-
shape: "columnar-table",
|
|
5048
|
-
schema,
|
|
5049
|
-
data: columns
|
|
5050
|
-
};
|
|
5051
|
-
}
|
|
5052
|
-
function convertToArrayRowTable(table) {
|
|
5053
|
-
if (table.shape === "array-row-table") {
|
|
5054
|
-
return table;
|
|
5055
|
-
}
|
|
5056
|
-
const length = getTableLength(table);
|
|
5057
|
-
const data = new Array(length);
|
|
5058
|
-
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
5059
|
-
data[rowIndex] = getTableRowAsArray(table, rowIndex);
|
|
5060
|
-
}
|
|
5061
|
-
return {
|
|
5062
|
-
shape: "array-row-table",
|
|
5063
|
-
schema: table.schema,
|
|
5064
|
-
data
|
|
5065
|
-
};
|
|
5066
|
-
}
|
|
5067
|
-
function convertToObjectRowTable(table) {
|
|
5068
|
-
if (table.shape === "object-row-table") {
|
|
5069
|
-
return table;
|
|
5070
|
-
}
|
|
5071
|
-
const length = getTableLength(table);
|
|
5072
|
-
const data = new Array(length);
|
|
5073
|
-
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
5074
|
-
data[rowIndex] = getTableRowAsObject(table, rowIndex);
|
|
5075
|
-
}
|
|
5076
|
-
return {
|
|
5077
|
-
shape: "object-row-table",
|
|
5078
|
-
schema: table.schema,
|
|
5079
|
-
data
|
|
5080
|
-
};
|
|
5081
|
-
}
|
|
5082
|
-
function convertToArrowTable(table) {
|
|
5083
|
-
const schema = table.schema || deduceTableSchema(table);
|
|
5084
|
-
const arrowTable = convertTableToArrow({ ...table, schema });
|
|
5085
|
-
return {
|
|
5086
|
-
shape: "arrow-table",
|
|
5087
|
-
schema,
|
|
5088
|
-
data: arrowTable
|
|
5089
|
-
};
|
|
5090
|
-
}
|
|
5091
|
-
var init_convert_table = __esm({
|
|
5092
|
-
"../schema-utils/src/lib/table/tables/convert-table.ts"() {
|
|
5093
|
-
"use strict";
|
|
5094
|
-
init_table_accessors();
|
|
5095
|
-
init_deduce_table_schema();
|
|
5096
|
-
init_table_column();
|
|
5097
|
-
init_convert_arrow_table();
|
|
5098
|
-
}
|
|
5099
|
-
});
|
|
5100
|
-
|
|
5101
|
-
// ../schema-utils/src/deprecated.ts
|
|
5102
|
-
var convertTable2;
|
|
5103
|
-
var init_deprecated = __esm({
|
|
5104
|
-
"../schema-utils/src/deprecated.ts"() {
|
|
5105
|
-
"use strict";
|
|
5106
|
-
init_convert_table();
|
|
5107
|
-
convertTable2 = ((...args) => convertTable(
|
|
5108
|
-
...args
|
|
5109
|
-
));
|
|
5110
|
-
}
|
|
5111
|
-
});
|
|
5112
|
-
|
|
5113
|
-
// ../schema/src/metadata.ts
|
|
5114
|
-
function getMetadataValue(metadata, key) {
|
|
5115
|
-
return metadata instanceof Map ? metadata.get(key) || null : metadata[key] || null;
|
|
5116
|
-
}
|
|
5117
|
-
function setMetadataValue(metadata, key, value) {
|
|
5118
|
-
if (metadata instanceof Map) {
|
|
5119
|
-
metadata.set(key, value);
|
|
5120
|
-
} else {
|
|
5121
|
-
metadata[key] = value;
|
|
5122
|
-
}
|
|
5123
|
-
}
|
|
5124
|
-
function getGeoMetadata(metadata) {
|
|
5125
|
-
if (!metadata) {
|
|
5126
|
-
return null;
|
|
5127
|
-
}
|
|
5128
|
-
const stringifiedGeoMetadata = getMetadataValue(metadata, "geo");
|
|
5129
|
-
const geoMetadata = stringifiedGeoMetadata && parseJSONStringMetadata(stringifiedGeoMetadata);
|
|
5130
|
-
if (!geoMetadata) {
|
|
5131
|
-
return null;
|
|
5132
|
-
}
|
|
5133
|
-
for (const column of Object.values(geoMetadata.columns || {})) {
|
|
5134
|
-
if (column && typeof column === "object" && typeof column.encoding === "string") {
|
|
5135
|
-
column.encoding = column.encoding.toLowerCase();
|
|
5136
|
-
}
|
|
5137
|
-
}
|
|
5138
|
-
return geoMetadata;
|
|
5139
|
-
}
|
|
5140
|
-
function unpackGeoMetadata(metadata) {
|
|
5141
|
-
const geoMetadata = getGeoMetadata(metadata);
|
|
5142
|
-
if (!geoMetadata) {
|
|
5143
|
-
return;
|
|
5144
|
-
}
|
|
5145
|
-
const { version: version2, primary_column: primaryColumn, columns } = geoMetadata;
|
|
5146
|
-
if (version2) {
|
|
5147
|
-
setMetadataValue(metadata, "geo.version", version2);
|
|
5148
|
-
}
|
|
5149
|
-
if (primaryColumn) {
|
|
5150
|
-
setMetadataValue(metadata, "geo.primary_column", primaryColumn);
|
|
5151
|
-
}
|
|
5152
|
-
setMetadataValue(metadata, "geo.columns", Object.keys(columns || {}).join(","));
|
|
5153
|
-
}
|
|
5154
|
-
function unpackJSONStringMetadata(metadata, metadataKey) {
|
|
5155
|
-
const stringifiedMetadata = getMetadataValue(metadata, metadataKey);
|
|
5156
|
-
const json = stringifiedMetadata && parseJSONStringMetadata(stringifiedMetadata);
|
|
5157
|
-
for (const [key, value] of Object.entries(json || {})) {
|
|
5158
|
-
setMetadataValue(
|
|
5159
|
-
metadata,
|
|
5160
|
-
`${metadataKey}.${key}`,
|
|
5161
|
-
typeof value === "string" ? value : JSON.stringify(value)
|
|
5162
|
-
);
|
|
5163
|
-
}
|
|
5164
|
-
}
|
|
5165
|
-
function parseJSONStringMetadata(stringifiedMetadata) {
|
|
5166
|
-
if (!stringifiedMetadata) {
|
|
5167
|
-
return null;
|
|
5168
|
-
}
|
|
5169
|
-
try {
|
|
5170
|
-
const metadata = JSON.parse(stringifiedMetadata);
|
|
5171
|
-
return metadata && typeof metadata === "object" ? metadata : null;
|
|
5172
|
-
} catch {
|
|
5173
|
-
return null;
|
|
5174
|
-
}
|
|
5175
|
-
}
|
|
5176
|
-
var init_metadata = __esm({
|
|
5177
|
-
"../schema/src/metadata.ts"() {
|
|
5178
|
-
"use strict";
|
|
5179
|
-
}
|
|
5180
|
-
});
|
|
5181
|
-
|
|
5182
|
-
// ../schema/src/index.ts
|
|
5183
|
-
var init_src4 = __esm({
|
|
5184
|
-
"../schema/src/index.ts"() {
|
|
5185
|
-
"use strict";
|
|
5186
|
-
init_metadata();
|
|
5187
|
-
}
|
|
5188
|
-
});
|
|
5189
|
-
|
|
5190
|
-
// ../schema-utils/src/index.ts
|
|
5191
|
-
var init_src5 = __esm({
|
|
5192
|
-
"../schema-utils/src/index.ts"() {
|
|
5193
|
-
"use strict";
|
|
5194
|
-
init_convert_arrow_schema();
|
|
5195
|
-
init_deprecated();
|
|
5196
|
-
}
|
|
5197
|
-
});
|
|
5198
|
-
|
|
5199
|
-
// ../arrow/src/lib/utils/indexed-arrow-helpers.ts
|
|
4748
|
+
// ../tables/src/arrow/lib/utils/indexed-arrow-helpers.ts
|
|
5200
4749
|
function getIndexedAccessRow(indexes, rowIndex) {
|
|
5201
4750
|
if (!Number.isInteger(rowIndex) || rowIndex < 0 || rowIndex >= indexes.length) {
|
|
5202
4751
|
return null;
|
|
@@ -5229,15 +4778,15 @@ function normalizeIndexedArrowIndexes(indexes, maxExclusive, copy = true) {
|
|
|
5229
4778
|
return normalizedIndexes;
|
|
5230
4779
|
}
|
|
5231
4780
|
var init_indexed_arrow_helpers = __esm({
|
|
5232
|
-
"../
|
|
4781
|
+
"../tables/src/arrow/lib/utils/indexed-arrow-helpers.ts"() {
|
|
5233
4782
|
"use strict";
|
|
5234
4783
|
}
|
|
5235
4784
|
});
|
|
5236
4785
|
|
|
5237
|
-
// ../
|
|
4786
|
+
// ../tables/src/arrow/lib/utils/indexed-arrow-vector.ts
|
|
5238
4787
|
var IndexedArrowVector;
|
|
5239
4788
|
var init_indexed_arrow_vector = __esm({
|
|
5240
|
-
"../
|
|
4789
|
+
"../tables/src/arrow/lib/utils/indexed-arrow-vector.ts"() {
|
|
5241
4790
|
"use strict";
|
|
5242
4791
|
init_indexed_arrow_helpers();
|
|
5243
4792
|
IndexedArrowVector = class _IndexedArrowVector {
|
|
@@ -5315,7 +4864,7 @@ var init_indexed_arrow_vector = __esm({
|
|
|
5315
4864
|
}
|
|
5316
4865
|
});
|
|
5317
4866
|
|
|
5318
|
-
// ../
|
|
4867
|
+
// ../tables/src/arrow/lib/utils/indexed-arrow-table.ts
|
|
5319
4868
|
function areArrowSchemasCompatible(left, right) {
|
|
5320
4869
|
if (left === right) {
|
|
5321
4870
|
return true;
|
|
@@ -5355,7 +4904,7 @@ function getCachedRawChildVector(table, columnName) {
|
|
|
5355
4904
|
}
|
|
5356
4905
|
var arrow5, indexedArrowTableInitSymbol, IndexedArrowTable, rawChildVectorCache, indexedChildVectorCache;
|
|
5357
4906
|
var init_indexed_arrow_table = __esm({
|
|
5358
|
-
"../
|
|
4907
|
+
"../tables/src/arrow/lib/utils/indexed-arrow-table.ts"() {
|
|
5359
4908
|
"use strict";
|
|
5360
4909
|
arrow5 = __toESM(require("apache-arrow"), 1);
|
|
5361
4910
|
init_indexed_arrow_helpers();
|
|
@@ -5643,162 +5192,658 @@ var init_indexed_arrow_table = __esm({
|
|
|
5643
5192
|
}
|
|
5644
5193
|
});
|
|
5645
5194
|
|
|
5646
|
-
// ../
|
|
5647
|
-
function
|
|
5648
|
-
if (
|
|
5649
|
-
return
|
|
5195
|
+
// ../core/src/schema-utils/lib/schema/data-type.ts
|
|
5196
|
+
function getDataTypeFromValue(value, defaultNumberType = "float32") {
|
|
5197
|
+
if (value instanceof Date) {
|
|
5198
|
+
return "date-millisecond";
|
|
5199
|
+
}
|
|
5200
|
+
if (typeof value === "number") {
|
|
5201
|
+
return defaultNumberType;
|
|
5202
|
+
}
|
|
5203
|
+
if (typeof value === "boolean") {
|
|
5204
|
+
return "bool";
|
|
5205
|
+
}
|
|
5206
|
+
if (typeof value === "string") {
|
|
5207
|
+
return "utf8";
|
|
5208
|
+
}
|
|
5209
|
+
if (value === null || value === "undefined") {
|
|
5210
|
+
return "null";
|
|
5211
|
+
}
|
|
5212
|
+
return "null";
|
|
5213
|
+
}
|
|
5214
|
+
function getDataTypeFromArray(array) {
|
|
5215
|
+
let type = getDataTypeFromTypedArray(array);
|
|
5216
|
+
if (type !== "null") {
|
|
5217
|
+
return { type, nullable: false };
|
|
5218
|
+
}
|
|
5219
|
+
if (array.length > 0) {
|
|
5220
|
+
type = getDataTypeFromValue(array[0]);
|
|
5221
|
+
return { type, nullable: true };
|
|
5222
|
+
}
|
|
5223
|
+
return { type: "null", nullable: true };
|
|
5224
|
+
}
|
|
5225
|
+
function getDataTypeFromTypedArray(array) {
|
|
5226
|
+
if (typeof Float16Array !== "undefined" && array instanceof Float16Array) {
|
|
5227
|
+
return "float16";
|
|
5228
|
+
}
|
|
5229
|
+
switch (array.constructor) {
|
|
5230
|
+
case Int8Array:
|
|
5231
|
+
return "int8";
|
|
5232
|
+
case Uint8Array:
|
|
5233
|
+
case Uint8ClampedArray:
|
|
5234
|
+
return "uint8";
|
|
5235
|
+
case Int16Array:
|
|
5236
|
+
return "int16";
|
|
5237
|
+
case Uint16Array:
|
|
5238
|
+
return "uint16";
|
|
5239
|
+
case Int32Array:
|
|
5240
|
+
return "int32";
|
|
5241
|
+
case Uint32Array:
|
|
5242
|
+
return "uint32";
|
|
5243
|
+
case BigInt64Array:
|
|
5244
|
+
return "int64";
|
|
5245
|
+
case BigUint64Array:
|
|
5246
|
+
return "uint64";
|
|
5247
|
+
case Float32Array:
|
|
5248
|
+
return "float32";
|
|
5249
|
+
case Float64Array:
|
|
5250
|
+
return "float64";
|
|
5251
|
+
default:
|
|
5252
|
+
return "null";
|
|
5253
|
+
}
|
|
5254
|
+
}
|
|
5255
|
+
function getArrayTypeFromDataType(type, nullable) {
|
|
5256
|
+
if (!nullable) {
|
|
5257
|
+
switch (type) {
|
|
5258
|
+
case "int8":
|
|
5259
|
+
return Int8Array;
|
|
5260
|
+
case "uint8":
|
|
5261
|
+
return Uint8Array;
|
|
5262
|
+
case "int16":
|
|
5263
|
+
return Int16Array;
|
|
5264
|
+
case "uint16":
|
|
5265
|
+
return Uint16Array;
|
|
5266
|
+
case "int32":
|
|
5267
|
+
return Int32Array;
|
|
5268
|
+
case "uint32":
|
|
5269
|
+
return Uint32Array;
|
|
5270
|
+
case "float32":
|
|
5271
|
+
return Float32Array;
|
|
5272
|
+
case "float64":
|
|
5273
|
+
return Float64Array;
|
|
5274
|
+
case "float16":
|
|
5275
|
+
return (0, import_types.getFloat16ArrayConstructor)();
|
|
5276
|
+
default:
|
|
5277
|
+
break;
|
|
5278
|
+
}
|
|
5279
|
+
}
|
|
5280
|
+
return Array;
|
|
5281
|
+
}
|
|
5282
|
+
var import_types;
|
|
5283
|
+
var init_data_type = __esm({
|
|
5284
|
+
"../core/src/schema-utils/lib/schema/data-type.ts"() {
|
|
5285
|
+
"use strict";
|
|
5286
|
+
import_types = require("@math.gl/core/types");
|
|
5287
|
+
}
|
|
5288
|
+
});
|
|
5289
|
+
|
|
5290
|
+
// ../core/src/schema-utils/lib/schema/deduce-table-schema.ts
|
|
5291
|
+
function deduceTableSchema(table) {
|
|
5292
|
+
switch (table.shape) {
|
|
5293
|
+
case "array-row-table":
|
|
5294
|
+
case "object-row-table":
|
|
5295
|
+
return deduceSchemaFromRows(table.data);
|
|
5296
|
+
case "geojson-table":
|
|
5297
|
+
return deduceSchemaFromGeoJSON(table.features);
|
|
5298
|
+
case "columnar-table":
|
|
5299
|
+
return deduceSchemaFromColumns(table.data);
|
|
5300
|
+
case "arrow-table":
|
|
5301
|
+
default:
|
|
5302
|
+
throw new Error("Deduce schema");
|
|
5303
|
+
}
|
|
5304
|
+
}
|
|
5305
|
+
function deduceSchemaFromColumns(columnarTable) {
|
|
5306
|
+
const fields = [];
|
|
5307
|
+
for (const [columnName, column] of Object.entries(columnarTable)) {
|
|
5308
|
+
const field = deduceFieldFromColumn(column, columnName);
|
|
5309
|
+
fields.push(field);
|
|
5310
|
+
}
|
|
5311
|
+
return { fields, metadata: {} };
|
|
5312
|
+
}
|
|
5313
|
+
function deduceSchemaFromRows(rowTable) {
|
|
5314
|
+
if (!rowTable.length) {
|
|
5315
|
+
throw new Error("deduce from empty table");
|
|
5316
|
+
}
|
|
5317
|
+
const fields = [];
|
|
5318
|
+
const row0 = rowTable[0];
|
|
5319
|
+
for (const [columnName, value] of Object.entries(row0)) {
|
|
5320
|
+
fields.push(deduceFieldFromValue(value, columnName));
|
|
5321
|
+
}
|
|
5322
|
+
return { fields, metadata: {} };
|
|
5323
|
+
}
|
|
5324
|
+
function deduceSchemaFromGeoJSON(features) {
|
|
5325
|
+
if (!features.length) {
|
|
5326
|
+
throw new Error("deduce from empty table");
|
|
5327
|
+
}
|
|
5328
|
+
const fields = [];
|
|
5329
|
+
const row0 = features[0].properties || {};
|
|
5330
|
+
for (const [columnName, value] of Object.entries(row0)) {
|
|
5331
|
+
fields.push(deduceFieldFromValue(value, columnName));
|
|
5332
|
+
}
|
|
5333
|
+
return { fields, metadata: {} };
|
|
5334
|
+
}
|
|
5335
|
+
function deduceFieldFromColumn(column, name) {
|
|
5336
|
+
if (ArrayBuffer.isView(column)) {
|
|
5337
|
+
const type = getDataTypeFromArray(column);
|
|
5338
|
+
return {
|
|
5339
|
+
name,
|
|
5340
|
+
type: type.type || "null",
|
|
5341
|
+
nullable: type.nullable
|
|
5342
|
+
// metadata: {}
|
|
5343
|
+
};
|
|
5344
|
+
}
|
|
5345
|
+
if (Array.isArray(column) && column.length > 0) {
|
|
5346
|
+
const value = column[0];
|
|
5347
|
+
const type = getDataTypeFromValue(value);
|
|
5348
|
+
return {
|
|
5349
|
+
name,
|
|
5350
|
+
type,
|
|
5351
|
+
nullable: true
|
|
5352
|
+
// metadata: {},
|
|
5353
|
+
};
|
|
5354
|
+
}
|
|
5355
|
+
throw new Error("empty table");
|
|
5356
|
+
}
|
|
5357
|
+
function deduceFieldFromValue(value, name) {
|
|
5358
|
+
const type = getDataTypeFromValue(value);
|
|
5359
|
+
return {
|
|
5360
|
+
name,
|
|
5361
|
+
type,
|
|
5362
|
+
nullable: true
|
|
5363
|
+
// metadata: {}
|
|
5364
|
+
};
|
|
5365
|
+
}
|
|
5366
|
+
var init_deduce_table_schema = __esm({
|
|
5367
|
+
"../core/src/schema-utils/lib/schema/deduce-table-schema.ts"() {
|
|
5368
|
+
"use strict";
|
|
5369
|
+
init_data_type();
|
|
5370
|
+
}
|
|
5371
|
+
});
|
|
5372
|
+
|
|
5373
|
+
// ../core/src/schema-utils/lib/table/tables/table-accessors.ts
|
|
5374
|
+
function getTableLength(table) {
|
|
5375
|
+
switch (table.shape) {
|
|
5376
|
+
case "array-row-table":
|
|
5377
|
+
case "object-row-table":
|
|
5378
|
+
return table.data.length;
|
|
5379
|
+
case "geojson-table":
|
|
5380
|
+
return table.features.length;
|
|
5381
|
+
case "arrow-table":
|
|
5382
|
+
const arrowTable = table.data;
|
|
5383
|
+
return arrowTable.numRows;
|
|
5384
|
+
case "columnar-table":
|
|
5385
|
+
for (const column of Object.values(table.data)) {
|
|
5386
|
+
return column.length || 0;
|
|
5387
|
+
}
|
|
5388
|
+
return 0;
|
|
5389
|
+
default:
|
|
5390
|
+
throw new Error("table");
|
|
5391
|
+
}
|
|
5392
|
+
}
|
|
5393
|
+
function getTableNumCols(table) {
|
|
5394
|
+
if (table.schema) {
|
|
5395
|
+
return table.schema.fields.length;
|
|
5396
|
+
}
|
|
5397
|
+
if (getTableLength(table) === 0) {
|
|
5398
|
+
throw new Error("empty table");
|
|
5399
|
+
}
|
|
5400
|
+
switch (table.shape) {
|
|
5401
|
+
case "array-row-table":
|
|
5402
|
+
return table.data[0].length;
|
|
5403
|
+
case "object-row-table":
|
|
5404
|
+
return Object.keys(table.data[0]).length;
|
|
5405
|
+
case "geojson-table":
|
|
5406
|
+
return Object.keys(table.features[0]).length;
|
|
5407
|
+
case "columnar-table":
|
|
5408
|
+
return Object.keys(table.data).length;
|
|
5409
|
+
case "arrow-table":
|
|
5410
|
+
const arrowTable = table.data;
|
|
5411
|
+
return arrowTable.numCols;
|
|
5412
|
+
default:
|
|
5413
|
+
throw new Error("table");
|
|
5414
|
+
}
|
|
5415
|
+
}
|
|
5416
|
+
function getTableCell(table, rowIndex, columnName) {
|
|
5417
|
+
var _a;
|
|
5418
|
+
switch (table.shape) {
|
|
5419
|
+
case "array-row-table":
|
|
5420
|
+
const columnIndex = getTableColumnIndex(table, columnName);
|
|
5421
|
+
return table.data[rowIndex][columnIndex];
|
|
5422
|
+
case "object-row-table":
|
|
5423
|
+
return table.data[rowIndex][columnName];
|
|
5424
|
+
case "geojson-table":
|
|
5425
|
+
return table.features[rowIndex][columnName];
|
|
5426
|
+
case "columnar-table":
|
|
5427
|
+
const column = table.data[columnName];
|
|
5428
|
+
return column[rowIndex];
|
|
5429
|
+
case "arrow-table":
|
|
5430
|
+
const arrowTable = table.data;
|
|
5431
|
+
const arrowColumnIndex = arrowTable.schema.fields.findIndex(
|
|
5432
|
+
(field) => field.name === columnName
|
|
5433
|
+
);
|
|
5434
|
+
return (_a = arrowTable.getChildAt(arrowColumnIndex)) == null ? void 0 : _a.get(rowIndex);
|
|
5435
|
+
default:
|
|
5436
|
+
throw new Error("todo");
|
|
5437
|
+
}
|
|
5438
|
+
}
|
|
5439
|
+
function getTableCellAt(table, rowIndex, columnIndex) {
|
|
5440
|
+
var _a;
|
|
5441
|
+
switch (table.shape) {
|
|
5442
|
+
case "array-row-table":
|
|
5443
|
+
return table.data[rowIndex][columnIndex];
|
|
5444
|
+
case "object-row-table":
|
|
5445
|
+
const columnName1 = getTableColumnName(table, columnIndex);
|
|
5446
|
+
return table.data[rowIndex][columnName1];
|
|
5447
|
+
case "geojson-table":
|
|
5448
|
+
const columnName2 = getTableColumnName(table, columnIndex);
|
|
5449
|
+
return table.features[rowIndex][columnName2];
|
|
5450
|
+
case "columnar-table":
|
|
5451
|
+
const columnName3 = getTableColumnName(table, columnIndex);
|
|
5452
|
+
const column = table.data[columnName3];
|
|
5453
|
+
return column[rowIndex];
|
|
5454
|
+
case "arrow-table":
|
|
5455
|
+
const arrowTable = table.data;
|
|
5456
|
+
return (_a = arrowTable.getChildAt(columnIndex)) == null ? void 0 : _a.get(rowIndex);
|
|
5457
|
+
default:
|
|
5458
|
+
throw new Error("todo");
|
|
5459
|
+
}
|
|
5460
|
+
}
|
|
5461
|
+
function getTableColumnIndex(table, columnName) {
|
|
5462
|
+
var _a;
|
|
5463
|
+
const columnIndex = (_a = table.schema) == null ? void 0 : _a.fields.findIndex((field) => field.name === columnName);
|
|
5464
|
+
if (columnIndex === void 0) {
|
|
5465
|
+
throw new Error(columnName);
|
|
5466
|
+
}
|
|
5467
|
+
return columnIndex;
|
|
5468
|
+
}
|
|
5469
|
+
function getTableColumnName(table, columnIndex) {
|
|
5470
|
+
var _a, _b;
|
|
5471
|
+
const columnName = (_b = (_a = table.schema) == null ? void 0 : _a.fields[columnIndex]) == null ? void 0 : _b.name;
|
|
5472
|
+
if (!columnName) {
|
|
5473
|
+
throw new Error(`${columnIndex}`);
|
|
5474
|
+
}
|
|
5475
|
+
return columnName;
|
|
5476
|
+
}
|
|
5477
|
+
function getTableRowAsObject(table, rowIndex, target, copy) {
|
|
5478
|
+
switch (table.shape) {
|
|
5479
|
+
case "object-row-table":
|
|
5480
|
+
return copy ? Object.fromEntries(Object.entries(table.data[rowIndex])) : table.data[rowIndex];
|
|
5481
|
+
case "array-row-table":
|
|
5482
|
+
if (table.schema) {
|
|
5483
|
+
const objectRow2 = target || {};
|
|
5484
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
5485
|
+
objectRow2[table.schema.fields[i].name] = table.data[rowIndex][i];
|
|
5486
|
+
}
|
|
5487
|
+
return objectRow2;
|
|
5488
|
+
}
|
|
5489
|
+
throw new Error("no schema");
|
|
5490
|
+
case "geojson-table":
|
|
5491
|
+
if (table.schema) {
|
|
5492
|
+
const objectRow2 = target || {};
|
|
5493
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
5494
|
+
objectRow2[table.schema.fields[i].name] = table.features[rowIndex][table.schema.fields[i].name];
|
|
5495
|
+
}
|
|
5496
|
+
return objectRow2;
|
|
5497
|
+
}
|
|
5498
|
+
throw new Error("no schema");
|
|
5499
|
+
case "columnar-table":
|
|
5500
|
+
if (table.schema) {
|
|
5501
|
+
const objectRow2 = target || {};
|
|
5502
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
5503
|
+
objectRow2[table.schema.fields[i].name] = table.data[table.schema.fields[i].name][rowIndex];
|
|
5504
|
+
}
|
|
5505
|
+
return objectRow2;
|
|
5506
|
+
} else {
|
|
5507
|
+
const objectRow2 = target || {};
|
|
5508
|
+
for (const [name, column] of Object.entries(table.data)) {
|
|
5509
|
+
objectRow2[name] = column[rowIndex];
|
|
5510
|
+
}
|
|
5511
|
+
return objectRow2;
|
|
5512
|
+
}
|
|
5513
|
+
case "arrow-table":
|
|
5514
|
+
const arrowTable = table.data;
|
|
5515
|
+
const objectRow = target || {};
|
|
5516
|
+
const row = arrowTable.get(rowIndex);
|
|
5517
|
+
const schema = arrowTable.schema;
|
|
5518
|
+
for (let i = 0; i < schema.fields.length; i++) {
|
|
5519
|
+
objectRow[schema.fields[i].name] = row == null ? void 0 : row[schema.fields[i].name];
|
|
5520
|
+
}
|
|
5521
|
+
return objectRow;
|
|
5522
|
+
default:
|
|
5523
|
+
throw new Error("shape");
|
|
5524
|
+
}
|
|
5525
|
+
}
|
|
5526
|
+
function getTableRowAsArray(table, rowIndex, target, copy) {
|
|
5527
|
+
switch (table.shape) {
|
|
5528
|
+
case "array-row-table":
|
|
5529
|
+
return copy ? Array.from(table.data[rowIndex]) : table.data[rowIndex];
|
|
5530
|
+
case "object-row-table":
|
|
5531
|
+
if (table.schema) {
|
|
5532
|
+
const arrayRow2 = target || [];
|
|
5533
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
5534
|
+
arrayRow2[i] = table.data[rowIndex][table.schema.fields[i].name];
|
|
5535
|
+
}
|
|
5536
|
+
return arrayRow2;
|
|
5537
|
+
}
|
|
5538
|
+
return Object.values(table.data[rowIndex]);
|
|
5539
|
+
case "geojson-table":
|
|
5540
|
+
if (table.schema) {
|
|
5541
|
+
const arrayRow2 = target || [];
|
|
5542
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
5543
|
+
arrayRow2[i] = table.features[rowIndex][table.schema.fields[i].name];
|
|
5544
|
+
}
|
|
5545
|
+
return arrayRow2;
|
|
5546
|
+
}
|
|
5547
|
+
return Object.values(table.features[rowIndex]);
|
|
5548
|
+
case "columnar-table":
|
|
5549
|
+
if (table.schema) {
|
|
5550
|
+
const arrayRow2 = target || [];
|
|
5551
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
5552
|
+
arrayRow2[i] = table.data[table.schema.fields[i].name][rowIndex];
|
|
5553
|
+
}
|
|
5554
|
+
return arrayRow2;
|
|
5555
|
+
} else {
|
|
5556
|
+
const arrayRow2 = target || [];
|
|
5557
|
+
let i = 0;
|
|
5558
|
+
for (const column of Object.values(table.data)) {
|
|
5559
|
+
arrayRow2[i] = column[rowIndex];
|
|
5560
|
+
i++;
|
|
5561
|
+
}
|
|
5562
|
+
return arrayRow2;
|
|
5563
|
+
}
|
|
5564
|
+
case "arrow-table":
|
|
5565
|
+
const arrowTable = table.data;
|
|
5566
|
+
const arrayRow = target || [];
|
|
5567
|
+
const row = arrowTable.get(rowIndex);
|
|
5568
|
+
const schema = arrowTable.schema;
|
|
5569
|
+
for (let i = 0; i < schema.fields.length; i++) {
|
|
5570
|
+
arrayRow[i] = row == null ? void 0 : row[schema.fields[i].name];
|
|
5571
|
+
}
|
|
5572
|
+
return arrayRow;
|
|
5573
|
+
default:
|
|
5574
|
+
throw new Error("shape");
|
|
5575
|
+
}
|
|
5576
|
+
}
|
|
5577
|
+
var init_table_accessors = __esm({
|
|
5578
|
+
"../core/src/schema-utils/lib/table/tables/table-accessors.ts"() {
|
|
5579
|
+
"use strict";
|
|
5580
|
+
}
|
|
5581
|
+
});
|
|
5582
|
+
|
|
5583
|
+
// ../core/src/schema-utils/lib/table/tables/table-column.ts
|
|
5584
|
+
function makeColumnFromField(field, length) {
|
|
5585
|
+
const ArrayType = getArrayTypeFromDataType(field.type, field.nullable);
|
|
5586
|
+
return new ArrayType(length);
|
|
5587
|
+
}
|
|
5588
|
+
var init_table_column = __esm({
|
|
5589
|
+
"../core/src/schema-utils/lib/table/tables/table-column.ts"() {
|
|
5590
|
+
"use strict";
|
|
5591
|
+
init_data_type();
|
|
5592
|
+
}
|
|
5593
|
+
});
|
|
5594
|
+
|
|
5595
|
+
// ../core/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts
|
|
5596
|
+
function* makeArrowRecordBatchIterator(table, options) {
|
|
5597
|
+
const arrowSchema = convertSchemaToArrow(table.schema);
|
|
5598
|
+
const length = getTableLength(table);
|
|
5599
|
+
const numColumns = getTableNumCols(table);
|
|
5600
|
+
const batchSize = (options == null ? void 0 : options.batchSize) || length;
|
|
5601
|
+
const builders = arrowSchema == null ? void 0 : arrowSchema.fields.map(
|
|
5602
|
+
(arrowField) => arrow6.makeBuilder({
|
|
5603
|
+
type: arrowField.type,
|
|
5604
|
+
nullValues: [null, void 0]
|
|
5605
|
+
})
|
|
5606
|
+
);
|
|
5607
|
+
const structField = new arrow6.Struct(arrowSchema.fields);
|
|
5608
|
+
let batchLength = 0;
|
|
5609
|
+
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
5610
|
+
for (let columnIndex = 0; columnIndex < numColumns; ++columnIndex) {
|
|
5611
|
+
const value = getTableCellAt(table, rowIndex, columnIndex);
|
|
5612
|
+
const builder = builders[columnIndex];
|
|
5613
|
+
builder.append(value);
|
|
5614
|
+
}
|
|
5615
|
+
batchLength++;
|
|
5616
|
+
if (batchLength >= batchSize) {
|
|
5617
|
+
const datas = builders.map((builder) => builder.flush());
|
|
5618
|
+
const structData = new arrow6.Data(structField, 0, batchLength, 0, void 0, datas);
|
|
5619
|
+
yield new arrow6.RecordBatch(arrowSchema, structData);
|
|
5620
|
+
batchLength = 0;
|
|
5621
|
+
}
|
|
5622
|
+
}
|
|
5623
|
+
if (batchLength > 0) {
|
|
5624
|
+
const datas = builders.map((builder) => builder.flush());
|
|
5625
|
+
const structData = new arrow6.Data(structField, 0, batchLength, 0, void 0, datas);
|
|
5626
|
+
yield new arrow6.RecordBatch(arrowSchema, structData);
|
|
5627
|
+
batchLength = 0;
|
|
5628
|
+
}
|
|
5629
|
+
builders.map((builder) => builder.finish());
|
|
5630
|
+
}
|
|
5631
|
+
var arrow6;
|
|
5632
|
+
var init_make_arrow_batch_iterator = __esm({
|
|
5633
|
+
"../core/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts"() {
|
|
5634
|
+
"use strict";
|
|
5635
|
+
arrow6 = __toESM(require("apache-arrow"), 1);
|
|
5636
|
+
init_convert_arrow_schema();
|
|
5637
|
+
init_table_accessors();
|
|
5638
|
+
}
|
|
5639
|
+
});
|
|
5640
|
+
|
|
5641
|
+
// ../core/src/schema-utils/lib/table/tables/convert-arrow-table.ts
|
|
5642
|
+
function convertTableToArrow(table, options) {
|
|
5643
|
+
switch (table.shape) {
|
|
5644
|
+
case "arrow-table":
|
|
5645
|
+
return table.data;
|
|
5646
|
+
case "columnar-table":
|
|
5647
|
+
// TODO - optimized implementation is possible
|
|
5648
|
+
// return convertColumnarTableToArrow(table, options);
|
|
5649
|
+
// fall through
|
|
5650
|
+
default:
|
|
5651
|
+
const arrowBatchIterator = makeArrowRecordBatchIterator(table, options);
|
|
5652
|
+
return new arrow7.Table(arrowBatchIterator);
|
|
5653
|
+
}
|
|
5654
|
+
}
|
|
5655
|
+
var arrow7;
|
|
5656
|
+
var init_convert_arrow_table = __esm({
|
|
5657
|
+
"../core/src/schema-utils/lib/table/tables/convert-arrow-table.ts"() {
|
|
5658
|
+
"use strict";
|
|
5659
|
+
arrow7 = __toESM(require("apache-arrow"), 1);
|
|
5660
|
+
init_make_arrow_batch_iterator();
|
|
5661
|
+
}
|
|
5662
|
+
});
|
|
5663
|
+
|
|
5664
|
+
// ../core/src/schema-utils/lib/table/tables/convert-table.ts
|
|
5665
|
+
function convertTable(table, shape) {
|
|
5666
|
+
switch (shape) {
|
|
5667
|
+
case "object-row-table":
|
|
5668
|
+
return convertToObjectRowTable(table);
|
|
5669
|
+
case "array-row-table":
|
|
5670
|
+
return convertToArrayRowTable(table);
|
|
5671
|
+
case "columnar-table":
|
|
5672
|
+
return convertToColumnarTable(table);
|
|
5673
|
+
case "arrow-table":
|
|
5674
|
+
return convertToArrowTable(table);
|
|
5675
|
+
default:
|
|
5676
|
+
throw new Error(shape);
|
|
5677
|
+
}
|
|
5678
|
+
}
|
|
5679
|
+
function convertToColumnarTable(table) {
|
|
5680
|
+
const schema = table.schema || deduceTableSchema(table);
|
|
5681
|
+
const fields = schema.fields;
|
|
5682
|
+
if (table.shape === "columnar-table") {
|
|
5683
|
+
return { ...table, schema };
|
|
5684
|
+
}
|
|
5685
|
+
const length = getTableLength(table);
|
|
5686
|
+
const columns = {};
|
|
5687
|
+
for (const field of fields) {
|
|
5688
|
+
const column = makeColumnFromField(field, length);
|
|
5689
|
+
columns[field.name] = column;
|
|
5690
|
+
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
5691
|
+
column[rowIndex] = getTableCell(table, rowIndex, field.name);
|
|
5692
|
+
}
|
|
5650
5693
|
}
|
|
5651
|
-
|
|
5652
|
-
|
|
5694
|
+
return {
|
|
5695
|
+
shape: "columnar-table",
|
|
5696
|
+
schema,
|
|
5697
|
+
data: columns
|
|
5698
|
+
};
|
|
5699
|
+
}
|
|
5700
|
+
function convertToArrayRowTable(table) {
|
|
5701
|
+
if (table.shape === "array-row-table") {
|
|
5702
|
+
return table;
|
|
5653
5703
|
}
|
|
5654
|
-
|
|
5655
|
-
|
|
5704
|
+
const length = getTableLength(table);
|
|
5705
|
+
const data = new Array(length);
|
|
5706
|
+
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
5707
|
+
data[rowIndex] = getTableRowAsArray(table, rowIndex);
|
|
5656
5708
|
}
|
|
5657
|
-
return
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
}
|
|
5662
|
-
function isArrowRecordBatch(input) {
|
|
5663
|
-
return "schema" in input && "data" in input && !Array.isArray(input.data);
|
|
5664
|
-
}
|
|
5665
|
-
function isArrowVector(input) {
|
|
5666
|
-
return "data" in input && Array.isArray(input.data);
|
|
5667
|
-
}
|
|
5668
|
-
function splitArrowTableBuffersInternal(table, options) {
|
|
5669
|
-
const recordBatches = table.batches.map(
|
|
5670
|
-
(recordBatch) => splitArrowRecordBatchBuffers(recordBatch, options)
|
|
5671
|
-
);
|
|
5672
|
-
return new arrow6.Table(table.schema, recordBatches);
|
|
5673
|
-
}
|
|
5674
|
-
function splitArrowRecordBatchBuffers(recordBatch, options) {
|
|
5675
|
-
return new arrow6.RecordBatch(
|
|
5676
|
-
recordBatch.schema,
|
|
5677
|
-
splitArrowDataBuffers(recordBatch.data, options)
|
|
5678
|
-
);
|
|
5679
|
-
}
|
|
5680
|
-
function splitArrowDataBuffers(data, options) {
|
|
5681
|
-
const children = data.children.map((childData) => splitArrowDataBuffers(childData, options));
|
|
5682
|
-
const dictionary = data.dictionary ? splitArrowVectorBuffers(data.dictionary, options) : void 0;
|
|
5683
|
-
const buffers = {
|
|
5684
|
-
[arrow6.BufferType.OFFSET]: splitArrowBuffer(data.buffers[arrow6.BufferType.OFFSET], options),
|
|
5685
|
-
[arrow6.BufferType.DATA]: splitArrowBuffer(data.buffers[arrow6.BufferType.DATA], options),
|
|
5686
|
-
[arrow6.BufferType.VALIDITY]: splitArrowBuffer(data.buffers[arrow6.BufferType.VALIDITY], options),
|
|
5687
|
-
[arrow6.BufferType.TYPE]: splitArrowBuffer(data.buffers[arrow6.BufferType.TYPE], options)
|
|
5709
|
+
return {
|
|
5710
|
+
shape: "array-row-table",
|
|
5711
|
+
schema: table.schema,
|
|
5712
|
+
data
|
|
5688
5713
|
};
|
|
5689
|
-
return new arrow6.Data(
|
|
5690
|
-
data.type,
|
|
5691
|
-
data.offset,
|
|
5692
|
-
data.length,
|
|
5693
|
-
// @ts-expect-error _nullCount is protected. Reuse it to preserve lazy null-count state.
|
|
5694
|
-
data._nullCount,
|
|
5695
|
-
buffers,
|
|
5696
|
-
children,
|
|
5697
|
-
dictionary
|
|
5698
|
-
);
|
|
5699
|
-
}
|
|
5700
|
-
function splitArrowVectorBuffers(vector, options) {
|
|
5701
|
-
return new arrow6.Vector(vector.data.map((data) => splitArrowDataBuffers(data, options)));
|
|
5702
5714
|
}
|
|
5703
|
-
function
|
|
5704
|
-
if (
|
|
5705
|
-
return
|
|
5706
|
-
}
|
|
5707
|
-
if (options.copy === "none") {
|
|
5708
|
-
return array;
|
|
5715
|
+
function convertToObjectRowTable(table) {
|
|
5716
|
+
if (table.shape === "object-row-table") {
|
|
5717
|
+
return table;
|
|
5709
5718
|
}
|
|
5710
|
-
|
|
5711
|
-
|
|
5719
|
+
const length = getTableLength(table);
|
|
5720
|
+
const data = new Array(length);
|
|
5721
|
+
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
5722
|
+
data[rowIndex] = getTableRowAsObject(table, rowIndex);
|
|
5712
5723
|
}
|
|
5713
|
-
return
|
|
5724
|
+
return {
|
|
5725
|
+
shape: "object-row-table",
|
|
5726
|
+
schema: table.schema,
|
|
5727
|
+
data
|
|
5728
|
+
};
|
|
5714
5729
|
}
|
|
5715
|
-
function
|
|
5716
|
-
|
|
5730
|
+
function convertToArrowTable(table) {
|
|
5731
|
+
const schema = table.schema || deduceTableSchema(table);
|
|
5732
|
+
const arrowTable = convertTableToArrow({ ...table, schema });
|
|
5733
|
+
return {
|
|
5734
|
+
shape: "arrow-table",
|
|
5735
|
+
schema,
|
|
5736
|
+
data: arrowTable
|
|
5737
|
+
};
|
|
5717
5738
|
}
|
|
5718
|
-
var
|
|
5719
|
-
|
|
5720
|
-
"../arrow/src/lib/utils/split-arrow-buffers.ts"() {
|
|
5739
|
+
var init_convert_table = __esm({
|
|
5740
|
+
"../core/src/schema-utils/lib/table/tables/convert-table.ts"() {
|
|
5721
5741
|
"use strict";
|
|
5722
|
-
|
|
5742
|
+
init_table_accessors();
|
|
5743
|
+
init_deduce_table_schema();
|
|
5744
|
+
init_table_column();
|
|
5745
|
+
init_convert_arrow_table();
|
|
5723
5746
|
}
|
|
5724
5747
|
});
|
|
5725
5748
|
|
|
5726
|
-
// ../
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
}
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
);
|
|
5741
|
-
return new arrow7.Table(schema, recordBatches);
|
|
5749
|
+
// ../core/src/schema-utils/deprecated.ts
|
|
5750
|
+
var convertTable2;
|
|
5751
|
+
var init_deprecated = __esm({
|
|
5752
|
+
"../core/src/schema-utils/deprecated.ts"() {
|
|
5753
|
+
"use strict";
|
|
5754
|
+
init_convert_table();
|
|
5755
|
+
convertTable2 = ((...args) => convertTable(
|
|
5756
|
+
...args
|
|
5757
|
+
));
|
|
5758
|
+
}
|
|
5759
|
+
});
|
|
5760
|
+
|
|
5761
|
+
// ../core/src/schema/metadata.ts
|
|
5762
|
+
function getMetadataValue(metadata, key) {
|
|
5763
|
+
return metadata instanceof Map ? metadata.get(key) || null : metadata[key] || null;
|
|
5742
5764
|
}
|
|
5743
|
-
function
|
|
5744
|
-
|
|
5765
|
+
function setMetadataValue(metadata, key, value) {
|
|
5766
|
+
if (metadata instanceof Map) {
|
|
5767
|
+
metadata.set(key, value);
|
|
5768
|
+
} else {
|
|
5769
|
+
metadata[key] = value;
|
|
5770
|
+
}
|
|
5745
5771
|
}
|
|
5746
|
-
function
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
}
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
};
|
|
5772
|
+
function getGeoMetadata(metadata) {
|
|
5773
|
+
if (!metadata) {
|
|
5774
|
+
return null;
|
|
5775
|
+
}
|
|
5776
|
+
const stringifiedGeoMetadata = getMetadataValue(metadata, "geo");
|
|
5777
|
+
const geoMetadata = stringifiedGeoMetadata && parseJSONStringMetadata(stringifiedGeoMetadata);
|
|
5778
|
+
if (!geoMetadata) {
|
|
5779
|
+
return null;
|
|
5780
|
+
}
|
|
5781
|
+
for (const column of Object.values(geoMetadata.columns || {})) {
|
|
5782
|
+
if (column && typeof column === "object" && typeof column.encoding === "string") {
|
|
5783
|
+
column.encoding = column.encoding.toLowerCase();
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5786
|
+
return geoMetadata;
|
|
5762
5787
|
}
|
|
5763
|
-
function
|
|
5764
|
-
|
|
5788
|
+
function unpackGeoMetadata(metadata) {
|
|
5789
|
+
const geoMetadata = getGeoMetadata(metadata);
|
|
5790
|
+
if (!geoMetadata) {
|
|
5791
|
+
return;
|
|
5792
|
+
}
|
|
5793
|
+
const { version: version2, primary_column: primaryColumn, columns } = geoMetadata;
|
|
5794
|
+
if (version2) {
|
|
5795
|
+
setMetadataValue(metadata, "geo.version", version2);
|
|
5796
|
+
}
|
|
5797
|
+
if (primaryColumn) {
|
|
5798
|
+
setMetadataValue(metadata, "geo.primary_column", primaryColumn);
|
|
5799
|
+
}
|
|
5800
|
+
setMetadataValue(metadata, "geo.columns", Object.keys(columns || {}).join(","));
|
|
5765
5801
|
}
|
|
5766
|
-
function
|
|
5767
|
-
const
|
|
5768
|
-
const
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
dictionary
|
|
5777
|
-
);
|
|
5802
|
+
function unpackJSONStringMetadata(metadata, metadataKey) {
|
|
5803
|
+
const stringifiedMetadata = getMetadataValue(metadata, metadataKey);
|
|
5804
|
+
const json = stringifiedMetadata && parseJSONStringMetadata(stringifiedMetadata);
|
|
5805
|
+
for (const [key, value] of Object.entries(json || {})) {
|
|
5806
|
+
setMetadataValue(
|
|
5807
|
+
metadata,
|
|
5808
|
+
`${metadataKey}.${key}`,
|
|
5809
|
+
typeof value === "string" ? value : JSON.stringify(value)
|
|
5810
|
+
);
|
|
5811
|
+
}
|
|
5778
5812
|
}
|
|
5779
|
-
function
|
|
5780
|
-
|
|
5813
|
+
function parseJSONStringMetadata(stringifiedMetadata) {
|
|
5814
|
+
if (!stringifiedMetadata) {
|
|
5815
|
+
return null;
|
|
5816
|
+
}
|
|
5817
|
+
try {
|
|
5818
|
+
const metadata = JSON.parse(stringifiedMetadata);
|
|
5819
|
+
return metadata && typeof metadata === "object" ? metadata : null;
|
|
5820
|
+
} catch {
|
|
5821
|
+
return null;
|
|
5822
|
+
}
|
|
5781
5823
|
}
|
|
5782
|
-
var
|
|
5783
|
-
|
|
5784
|
-
"../arrow/src/lib/utils/arrow-table-transport.ts"() {
|
|
5824
|
+
var init_metadata = __esm({
|
|
5825
|
+
"../core/src/schema/metadata.ts"() {
|
|
5785
5826
|
"use strict";
|
|
5786
|
-
arrow7 = __toESM(require("apache-arrow"), 1);
|
|
5787
|
-
init_src5();
|
|
5788
|
-
init_split_arrow_buffers();
|
|
5789
5827
|
}
|
|
5790
5828
|
});
|
|
5791
5829
|
|
|
5792
|
-
// ../
|
|
5793
|
-
var
|
|
5794
|
-
"../
|
|
5830
|
+
// ../core/src/schema/index.ts
|
|
5831
|
+
var init_schema = __esm({
|
|
5832
|
+
"../core/src/schema/index.ts"() {
|
|
5795
5833
|
"use strict";
|
|
5796
|
-
|
|
5797
|
-
|
|
5834
|
+
init_metadata();
|
|
5835
|
+
}
|
|
5836
|
+
});
|
|
5837
|
+
|
|
5838
|
+
// ../core/src/schema-utils/index.ts
|
|
5839
|
+
var init_schema_utils = __esm({
|
|
5840
|
+
"../core/src/schema-utils/index.ts"() {
|
|
5841
|
+
"use strict";
|
|
5842
|
+
init_deprecated();
|
|
5798
5843
|
}
|
|
5799
5844
|
});
|
|
5800
5845
|
|
|
5801
|
-
// ../
|
|
5846
|
+
// ../tables/src/parquet/lib/arrow/convert-schema-from-parquet.ts
|
|
5802
5847
|
function convertParquetSchema(parquetSchema, parquetMetadata, options) {
|
|
5803
5848
|
const fields = getFields(parquetSchema.schema, options);
|
|
5804
5849
|
const metadata = parquetMetadata && getSchemaMetadata(parquetMetadata);
|
|
@@ -5954,7 +5999,7 @@ function getSchemaMetadata(parquetMetadata) {
|
|
|
5954
5999
|
}
|
|
5955
6000
|
var PARQUET_TYPE_MAPPING;
|
|
5956
6001
|
var init_convert_schema_from_parquet = __esm({
|
|
5957
|
-
"../
|
|
6002
|
+
"../tables/src/parquet/lib/arrow/convert-schema-from-parquet.ts"() {
|
|
5958
6003
|
"use strict";
|
|
5959
6004
|
PARQUET_TYPE_MAPPING = {
|
|
5960
6005
|
BOOLEAN: "bool",
|
|
@@ -6000,7 +6045,7 @@ var init_convert_schema_from_parquet = __esm({
|
|
|
6000
6045
|
}
|
|
6001
6046
|
});
|
|
6002
6047
|
|
|
6003
|
-
// ../
|
|
6048
|
+
// ../tables/src/parquet/lib/geo/geospatial-metadata.ts
|
|
6004
6049
|
function applyGeoParquetToFieldMetadata(schema) {
|
|
6005
6050
|
var _a;
|
|
6006
6051
|
const geoMetadata = getGeoMetadata(schema.metadata);
|
|
@@ -6070,10 +6115,10 @@ function isStringFieldType(fieldType) {
|
|
|
6070
6115
|
}
|
|
6071
6116
|
var arrow8, GEOARROW_EXTENSION_NAME_KEY, GEOARROW_EXTENSION_METADATA_KEY, GEOPARQUET_TO_GEOARROW_ENCODINGS;
|
|
6072
6117
|
var init_geospatial_metadata = __esm({
|
|
6073
|
-
"../
|
|
6118
|
+
"../tables/src/parquet/lib/geo/geospatial-metadata.ts"() {
|
|
6074
6119
|
"use strict";
|
|
6075
6120
|
arrow8 = __toESM(require("apache-arrow"), 1);
|
|
6076
|
-
|
|
6121
|
+
init_schema();
|
|
6077
6122
|
GEOARROW_EXTENSION_NAME_KEY = "ARROW:extension:name";
|
|
6078
6123
|
GEOARROW_EXTENSION_METADATA_KEY = "ARROW:extension:metadata";
|
|
6079
6124
|
GEOPARQUET_TO_GEOARROW_ENCODINGS = {
|
|
@@ -6090,7 +6135,7 @@ var init_geospatial_metadata = __esm({
|
|
|
6090
6135
|
}
|
|
6091
6136
|
});
|
|
6092
6137
|
|
|
6093
|
-
// ../
|
|
6138
|
+
// ../tables/src/parquet/lib/parsers/get-parquet-schema.ts
|
|
6094
6139
|
async function getSchemaFromParquetReader(reader) {
|
|
6095
6140
|
const parquetSchema = await reader.getSchema();
|
|
6096
6141
|
const parquetMetadata = await reader.getFileMetadata();
|
|
@@ -6133,16 +6178,16 @@ function restoreArrowFieldMetadata(fields, arrowFields) {
|
|
|
6133
6178
|
}
|
|
6134
6179
|
var arrow9;
|
|
6135
6180
|
var init_get_parquet_schema = __esm({
|
|
6136
|
-
"../
|
|
6181
|
+
"../tables/src/parquet/lib/parsers/get-parquet-schema.ts"() {
|
|
6137
6182
|
"use strict";
|
|
6138
6183
|
arrow9 = __toESM(require("apache-arrow"), 1);
|
|
6139
|
-
|
|
6184
|
+
init_schema();
|
|
6140
6185
|
init_convert_schema_from_parquet();
|
|
6141
6186
|
init_geospatial_metadata();
|
|
6142
6187
|
}
|
|
6143
6188
|
});
|
|
6144
6189
|
|
|
6145
|
-
// ../
|
|
6190
|
+
// ../tables/src/parquet/lib/geo/geoparquet-covering.ts
|
|
6146
6191
|
function canGeoParquetRowGroupMatch(metadata, rowGroup, bbox, geometryColumn) {
|
|
6147
6192
|
var _a, _b;
|
|
6148
6193
|
const bounds = getBoundingBoxCoordinates(bbox, true);
|
|
@@ -6246,16 +6291,16 @@ function doLongitudeIntervalsIntersect(firstWest, firstEast, secondWest, secondE
|
|
|
6246
6291
|
);
|
|
6247
6292
|
}
|
|
6248
6293
|
var init_geoparquet_covering = __esm({
|
|
6249
|
-
"../
|
|
6294
|
+
"../tables/src/parquet/lib/geo/geoparquet-covering.ts"() {
|
|
6250
6295
|
"use strict";
|
|
6251
|
-
|
|
6296
|
+
init_schema();
|
|
6252
6297
|
}
|
|
6253
6298
|
});
|
|
6254
6299
|
|
|
6255
|
-
// ../
|
|
6300
|
+
// ../tables/src/parquet/parquetjs/utils/thrift-runtime.ts
|
|
6256
6301
|
var Thrift;
|
|
6257
6302
|
var init_thrift_runtime = __esm({
|
|
6258
|
-
"../
|
|
6303
|
+
"../tables/src/parquet/parquetjs/utils/thrift-runtime.ts"() {
|
|
6259
6304
|
"use strict";
|
|
6260
6305
|
((Thrift2) => {
|
|
6261
6306
|
let Type2;
|
|
@@ -6301,7 +6346,7 @@ var init_thrift_runtime = __esm({
|
|
|
6301
6346
|
}
|
|
6302
6347
|
});
|
|
6303
6348
|
|
|
6304
|
-
// ../
|
|
6349
|
+
// ../tables/src/parquet/parquetjs/utils/binary-utils.ts
|
|
6305
6350
|
function toUint8Array2(binary) {
|
|
6306
6351
|
if (binary instanceof Uint8Array) {
|
|
6307
6352
|
return binary;
|
|
@@ -6378,17 +6423,17 @@ function writeDoubleLE(binary, value, offset) {
|
|
|
6378
6423
|
}
|
|
6379
6424
|
var TEXT_DECODER, TEXT_ENCODER;
|
|
6380
6425
|
var init_binary_utils = __esm({
|
|
6381
|
-
"../
|
|
6426
|
+
"../tables/src/parquet/parquetjs/utils/binary-utils.ts"() {
|
|
6382
6427
|
"use strict";
|
|
6383
6428
|
TEXT_DECODER = new TextDecoder();
|
|
6384
6429
|
TEXT_ENCODER = new TextEncoder();
|
|
6385
6430
|
}
|
|
6386
6431
|
});
|
|
6387
6432
|
|
|
6388
|
-
// ../
|
|
6433
|
+
// ../tables/src/parquet/parquetjs/utils/uint8-array-compact-protocol.ts
|
|
6389
6434
|
var COMPACT_TYPE_STOP, COMPACT_TYPE_BOOLEAN_TRUE, COMPACT_TYPE_BOOLEAN_FALSE, COMPACT_TYPE_BYTE, COMPACT_TYPE_I16, COMPACT_TYPE_I32, COMPACT_TYPE_I64, COMPACT_TYPE_DOUBLE, COMPACT_TYPE_BINARY, COMPACT_TYPE_LIST, COMPACT_TYPE_SET, COMPACT_TYPE_MAP, COMPACT_TYPE_STRUCT, CompactInt64, Uint8ArrayCompactProtocol;
|
|
6390
6435
|
var init_uint8_array_compact_protocol = __esm({
|
|
6391
|
-
"../
|
|
6436
|
+
"../tables/src/parquet/parquetjs/utils/uint8-array-compact-protocol.ts"() {
|
|
6392
6437
|
"use strict";
|
|
6393
6438
|
init_thrift_runtime();
|
|
6394
6439
|
init_binary_utils();
|
|
@@ -6667,10 +6712,10 @@ var init_uint8_array_compact_protocol = __esm({
|
|
|
6667
6712
|
}
|
|
6668
6713
|
});
|
|
6669
6714
|
|
|
6670
|
-
// ../
|
|
6715
|
+
// ../tables/src/parquet/parquetjs/utils/uint8-array-transport.ts
|
|
6671
6716
|
var Uint8ArrayTransport;
|
|
6672
6717
|
var init_uint8_array_transport = __esm({
|
|
6673
|
-
"../
|
|
6718
|
+
"../tables/src/parquet/parquetjs/utils/uint8-array-transport.ts"() {
|
|
6674
6719
|
"use strict";
|
|
6675
6720
|
init_binary_utils();
|
|
6676
6721
|
Uint8ArrayTransport = class {
|
|
@@ -6736,10 +6781,10 @@ var init_uint8_array_transport = __esm({
|
|
|
6736
6781
|
}
|
|
6737
6782
|
});
|
|
6738
6783
|
|
|
6739
|
-
// ../
|
|
6784
|
+
// ../tables/src/parquet/parquetjs/utils/uint8-array-compact-protocol-writer.ts
|
|
6740
6785
|
var COMPACT_TYPE_STOP2, COMPACT_TYPE_BOOLEAN_TRUE2, COMPACT_TYPE_BOOLEAN_FALSE2, COMPACT_TYPE_BYTE2, COMPACT_TYPE_I162, COMPACT_TYPE_I322, COMPACT_TYPE_I642, COMPACT_TYPE_DOUBLE2, COMPACT_TYPE_BINARY2, COMPACT_TYPE_LIST2, COMPACT_TYPE_SET2, COMPACT_TYPE_MAP2, COMPACT_TYPE_STRUCT2, Uint8ArrayCompactProtocolWriter;
|
|
6741
6786
|
var init_uint8_array_compact_protocol_writer = __esm({
|
|
6742
|
-
"../
|
|
6787
|
+
"../tables/src/parquet/parquetjs/utils/uint8-array-compact-protocol-writer.ts"() {
|
|
6743
6788
|
"use strict";
|
|
6744
6789
|
init_thrift_runtime();
|
|
6745
6790
|
init_binary_utils();
|
|
@@ -6953,7 +6998,7 @@ var init_uint8_array_compact_protocol_writer = __esm({
|
|
|
6953
6998
|
}
|
|
6954
6999
|
});
|
|
6955
7000
|
|
|
6956
|
-
// ../
|
|
7001
|
+
// ../tables/src/parquet/lib/parquet-bloom-filter.ts
|
|
6957
7002
|
function encodeParquetBloomFilterValue(value, physicalType, typeLength) {
|
|
6958
7003
|
switch (physicalType) {
|
|
6959
7004
|
case "BOOLEAN":
|
|
@@ -7146,7 +7191,7 @@ function readUint64LE(value, offset) {
|
|
|
7146
7191
|
}
|
|
7147
7192
|
var UINT64_MASK, PRIME1, PRIME2, PRIME3, PRIME4, PRIME5, SALTS;
|
|
7148
7193
|
var init_parquet_bloom_filter = __esm({
|
|
7149
|
-
"../
|
|
7194
|
+
"../tables/src/parquet/lib/parquet-bloom-filter.ts"() {
|
|
7150
7195
|
"use strict";
|
|
7151
7196
|
init_uint8_array_compact_protocol();
|
|
7152
7197
|
init_uint8_array_transport();
|
|
@@ -7170,7 +7215,7 @@ var init_parquet_bloom_filter = __esm({
|
|
|
7170
7215
|
}
|
|
7171
7216
|
});
|
|
7172
7217
|
|
|
7173
|
-
// ../
|
|
7218
|
+
// ../tables/src/parquet/lib/parquet-bloom-filter-planner.ts
|
|
7174
7219
|
function getParquetBloomFilterProbes(predicate, rowGroup) {
|
|
7175
7220
|
const probes = [];
|
|
7176
7221
|
collectParquetBloomFilterProbes(predicate, rowGroup, probes);
|
|
@@ -7212,12 +7257,12 @@ function collectParquetBloomFilterProbes(predicate, rowGroup, probes) {
|
|
|
7212
7257
|
});
|
|
7213
7258
|
}
|
|
7214
7259
|
var init_parquet_bloom_filter_planner = __esm({
|
|
7215
|
-
"../
|
|
7260
|
+
"../tables/src/parquet/lib/parquet-bloom-filter-planner.ts"() {
|
|
7216
7261
|
"use strict";
|
|
7217
7262
|
}
|
|
7218
7263
|
});
|
|
7219
7264
|
|
|
7220
|
-
// ../
|
|
7265
|
+
// ../tables/src/parquet/lib/parquet-predicate.ts
|
|
7221
7266
|
function getParquetPredicateColumns(predicate) {
|
|
7222
7267
|
return [...new Set(getParquetPredicatePaths(predicate).map((path) => path[0]))];
|
|
7223
7268
|
}
|
|
@@ -7507,16 +7552,16 @@ function isParquetNotPredicate(predicate) {
|
|
|
7507
7552
|
return predicate.op === "not";
|
|
7508
7553
|
}
|
|
7509
7554
|
var init_parquet_predicate = __esm({
|
|
7510
|
-
"../
|
|
7555
|
+
"../tables/src/parquet/lib/parquet-predicate.ts"() {
|
|
7511
7556
|
"use strict";
|
|
7512
7557
|
init_binary_utils();
|
|
7513
7558
|
}
|
|
7514
7559
|
});
|
|
7515
7560
|
|
|
7516
|
-
// ../
|
|
7561
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/Type.ts
|
|
7517
7562
|
var Type;
|
|
7518
7563
|
var init_Type = __esm({
|
|
7519
|
-
"../
|
|
7564
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/Type.ts"() {
|
|
7520
7565
|
"use strict";
|
|
7521
7566
|
Type = /* @__PURE__ */ ((Type2) => {
|
|
7522
7567
|
Type2[Type2["BOOLEAN"] = 0] = "BOOLEAN";
|
|
@@ -7532,10 +7577,10 @@ var init_Type = __esm({
|
|
|
7532
7577
|
}
|
|
7533
7578
|
});
|
|
7534
7579
|
|
|
7535
|
-
// ../
|
|
7580
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/ConvertedType.ts
|
|
7536
7581
|
var ConvertedType;
|
|
7537
7582
|
var init_ConvertedType = __esm({
|
|
7538
|
-
"../
|
|
7583
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/ConvertedType.ts"() {
|
|
7539
7584
|
"use strict";
|
|
7540
7585
|
ConvertedType = /* @__PURE__ */ ((ConvertedType2) => {
|
|
7541
7586
|
ConvertedType2[ConvertedType2["UTF8"] = 0] = "UTF8";
|
|
@@ -7565,10 +7610,10 @@ var init_ConvertedType = __esm({
|
|
|
7565
7610
|
}
|
|
7566
7611
|
});
|
|
7567
7612
|
|
|
7568
|
-
// ../
|
|
7613
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/FieldRepetitionType.ts
|
|
7569
7614
|
var FieldRepetitionType;
|
|
7570
7615
|
var init_FieldRepetitionType = __esm({
|
|
7571
|
-
"../
|
|
7616
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/FieldRepetitionType.ts"() {
|
|
7572
7617
|
"use strict";
|
|
7573
7618
|
FieldRepetitionType = /* @__PURE__ */ ((FieldRepetitionType2) => {
|
|
7574
7619
|
FieldRepetitionType2[FieldRepetitionType2["REQUIRED"] = 0] = "REQUIRED";
|
|
@@ -7579,10 +7624,10 @@ var init_FieldRepetitionType = __esm({
|
|
|
7579
7624
|
}
|
|
7580
7625
|
});
|
|
7581
7626
|
|
|
7582
|
-
// ../
|
|
7627
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/Encoding.ts
|
|
7583
7628
|
var Encoding;
|
|
7584
7629
|
var init_Encoding = __esm({
|
|
7585
|
-
"../
|
|
7630
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/Encoding.ts"() {
|
|
7586
7631
|
"use strict";
|
|
7587
7632
|
Encoding = /* @__PURE__ */ ((Encoding2) => {
|
|
7588
7633
|
Encoding2[Encoding2["PLAIN"] = 0] = "PLAIN";
|
|
@@ -7599,10 +7644,10 @@ var init_Encoding = __esm({
|
|
|
7599
7644
|
}
|
|
7600
7645
|
});
|
|
7601
7646
|
|
|
7602
|
-
// ../
|
|
7647
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/CompressionCodec.ts
|
|
7603
7648
|
var CompressionCodec;
|
|
7604
7649
|
var init_CompressionCodec = __esm({
|
|
7605
|
-
"../
|
|
7650
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/CompressionCodec.ts"() {
|
|
7606
7651
|
"use strict";
|
|
7607
7652
|
CompressionCodec = /* @__PURE__ */ ((CompressionCodec2) => {
|
|
7608
7653
|
CompressionCodec2[CompressionCodec2["UNCOMPRESSED"] = 0] = "UNCOMPRESSED";
|
|
@@ -7618,10 +7663,10 @@ var init_CompressionCodec = __esm({
|
|
|
7618
7663
|
}
|
|
7619
7664
|
});
|
|
7620
7665
|
|
|
7621
|
-
// ../
|
|
7666
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/PageType.ts
|
|
7622
7667
|
var PageType;
|
|
7623
7668
|
var init_PageType = __esm({
|
|
7624
|
-
"../
|
|
7669
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/PageType.ts"() {
|
|
7625
7670
|
"use strict";
|
|
7626
7671
|
PageType = /* @__PURE__ */ ((PageType2) => {
|
|
7627
7672
|
PageType2[PageType2["DATA_PAGE"] = 0] = "DATA_PAGE";
|
|
@@ -7633,17 +7678,17 @@ var init_PageType = __esm({
|
|
|
7633
7678
|
}
|
|
7634
7679
|
});
|
|
7635
7680
|
|
|
7636
|
-
// ../
|
|
7681
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/BoundaryOrder.ts
|
|
7637
7682
|
var init_BoundaryOrder = __esm({
|
|
7638
|
-
"../
|
|
7683
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/BoundaryOrder.ts"() {
|
|
7639
7684
|
"use strict";
|
|
7640
7685
|
}
|
|
7641
7686
|
});
|
|
7642
7687
|
|
|
7643
|
-
// ../
|
|
7688
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/Statistics.ts
|
|
7644
7689
|
var Statistics;
|
|
7645
7690
|
var init_Statistics = __esm({
|
|
7646
|
-
"../
|
|
7691
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/Statistics.ts"() {
|
|
7647
7692
|
"use strict";
|
|
7648
7693
|
init_uint8_array_compact_protocol();
|
|
7649
7694
|
init_thrift_runtime();
|
|
@@ -7824,10 +7869,10 @@ var init_Statistics = __esm({
|
|
|
7824
7869
|
}
|
|
7825
7870
|
});
|
|
7826
7871
|
|
|
7827
|
-
// ../
|
|
7872
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/StringType.ts
|
|
7828
7873
|
var StringType;
|
|
7829
7874
|
var init_StringType = __esm({
|
|
7830
|
-
"../
|
|
7875
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/StringType.ts"() {
|
|
7831
7876
|
"use strict";
|
|
7832
7877
|
init_thrift_runtime();
|
|
7833
7878
|
StringType = class _StringType {
|
|
@@ -7862,10 +7907,10 @@ var init_StringType = __esm({
|
|
|
7862
7907
|
}
|
|
7863
7908
|
});
|
|
7864
7909
|
|
|
7865
|
-
// ../
|
|
7910
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/UUIDType.ts
|
|
7866
7911
|
var UUIDType;
|
|
7867
7912
|
var init_UUIDType = __esm({
|
|
7868
|
-
"../
|
|
7913
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/UUIDType.ts"() {
|
|
7869
7914
|
"use strict";
|
|
7870
7915
|
init_thrift_runtime();
|
|
7871
7916
|
UUIDType = class _UUIDType {
|
|
@@ -7900,10 +7945,10 @@ var init_UUIDType = __esm({
|
|
|
7900
7945
|
}
|
|
7901
7946
|
});
|
|
7902
7947
|
|
|
7903
|
-
// ../
|
|
7948
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/Float16Type.ts
|
|
7904
7949
|
var Float16Type;
|
|
7905
7950
|
var init_Float16Type = __esm({
|
|
7906
|
-
"../
|
|
7951
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/Float16Type.ts"() {
|
|
7907
7952
|
"use strict";
|
|
7908
7953
|
init_thrift_runtime();
|
|
7909
7954
|
Float16Type = class _Float16Type {
|
|
@@ -7929,10 +7974,10 @@ var init_Float16Type = __esm({
|
|
|
7929
7974
|
}
|
|
7930
7975
|
});
|
|
7931
7976
|
|
|
7932
|
-
// ../
|
|
7977
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/VariantType.ts
|
|
7933
7978
|
var VariantType;
|
|
7934
7979
|
var init_VariantType = __esm({
|
|
7935
|
-
"../
|
|
7980
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/VariantType.ts"() {
|
|
7936
7981
|
"use strict";
|
|
7937
7982
|
init_thrift_runtime();
|
|
7938
7983
|
VariantType = class _VariantType {
|
|
@@ -7970,10 +8015,10 @@ var init_VariantType = __esm({
|
|
|
7970
8015
|
}
|
|
7971
8016
|
});
|
|
7972
8017
|
|
|
7973
|
-
// ../
|
|
8018
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/EdgeInterpolationAlgorithm.ts
|
|
7974
8019
|
var EdgeInterpolationAlgorithm;
|
|
7975
8020
|
var init_EdgeInterpolationAlgorithm = __esm({
|
|
7976
|
-
"../
|
|
8021
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/EdgeInterpolationAlgorithm.ts"() {
|
|
7977
8022
|
"use strict";
|
|
7978
8023
|
EdgeInterpolationAlgorithm = /* @__PURE__ */ ((EdgeInterpolationAlgorithm2) => {
|
|
7979
8024
|
EdgeInterpolationAlgorithm2[EdgeInterpolationAlgorithm2["SPHERICAL"] = 0] = "SPHERICAL";
|
|
@@ -7986,10 +8031,10 @@ var init_EdgeInterpolationAlgorithm = __esm({
|
|
|
7986
8031
|
}
|
|
7987
8032
|
});
|
|
7988
8033
|
|
|
7989
|
-
// ../
|
|
8034
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/GeometryType.ts
|
|
7990
8035
|
var GeometryType;
|
|
7991
8036
|
var init_GeometryType = __esm({
|
|
7992
|
-
"../
|
|
8037
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/GeometryType.ts"() {
|
|
7993
8038
|
"use strict";
|
|
7994
8039
|
init_thrift_runtime();
|
|
7995
8040
|
GeometryType = class _GeometryType {
|
|
@@ -8027,10 +8072,10 @@ var init_GeometryType = __esm({
|
|
|
8027
8072
|
}
|
|
8028
8073
|
});
|
|
8029
8074
|
|
|
8030
|
-
// ../
|
|
8075
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/GeographyType.ts
|
|
8031
8076
|
var GeographyType;
|
|
8032
8077
|
var init_GeographyType = __esm({
|
|
8033
|
-
"../
|
|
8078
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/GeographyType.ts"() {
|
|
8034
8079
|
"use strict";
|
|
8035
8080
|
init_thrift_runtime();
|
|
8036
8081
|
GeographyType = class _GeographyType {
|
|
@@ -8077,10 +8122,10 @@ var init_GeographyType = __esm({
|
|
|
8077
8122
|
}
|
|
8078
8123
|
});
|
|
8079
8124
|
|
|
8080
|
-
// ../
|
|
8125
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/MapType.ts
|
|
8081
8126
|
var MapType;
|
|
8082
8127
|
var init_MapType = __esm({
|
|
8083
|
-
"../
|
|
8128
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/MapType.ts"() {
|
|
8084
8129
|
"use strict";
|
|
8085
8130
|
init_thrift_runtime();
|
|
8086
8131
|
MapType = class _MapType {
|
|
@@ -8115,10 +8160,10 @@ var init_MapType = __esm({
|
|
|
8115
8160
|
}
|
|
8116
8161
|
});
|
|
8117
8162
|
|
|
8118
|
-
// ../
|
|
8163
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/ListType.ts
|
|
8119
8164
|
var ListType;
|
|
8120
8165
|
var init_ListType = __esm({
|
|
8121
|
-
"../
|
|
8166
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/ListType.ts"() {
|
|
8122
8167
|
"use strict";
|
|
8123
8168
|
init_thrift_runtime();
|
|
8124
8169
|
ListType = class _ListType {
|
|
@@ -8153,10 +8198,10 @@ var init_ListType = __esm({
|
|
|
8153
8198
|
}
|
|
8154
8199
|
});
|
|
8155
8200
|
|
|
8156
|
-
// ../
|
|
8201
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/EnumType.ts
|
|
8157
8202
|
var EnumType;
|
|
8158
8203
|
var init_EnumType = __esm({
|
|
8159
|
-
"../
|
|
8204
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/EnumType.ts"() {
|
|
8160
8205
|
"use strict";
|
|
8161
8206
|
init_thrift_runtime();
|
|
8162
8207
|
EnumType = class _EnumType {
|
|
@@ -8191,10 +8236,10 @@ var init_EnumType = __esm({
|
|
|
8191
8236
|
}
|
|
8192
8237
|
});
|
|
8193
8238
|
|
|
8194
|
-
// ../
|
|
8239
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/DateType.ts
|
|
8195
8240
|
var DateType;
|
|
8196
8241
|
var init_DateType = __esm({
|
|
8197
|
-
"../
|
|
8242
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/DateType.ts"() {
|
|
8198
8243
|
"use strict";
|
|
8199
8244
|
init_thrift_runtime();
|
|
8200
8245
|
DateType = class _DateType {
|
|
@@ -8229,10 +8274,10 @@ var init_DateType = __esm({
|
|
|
8229
8274
|
}
|
|
8230
8275
|
});
|
|
8231
8276
|
|
|
8232
|
-
// ../
|
|
8277
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/NullType.ts
|
|
8233
8278
|
var NullType;
|
|
8234
8279
|
var init_NullType = __esm({
|
|
8235
|
-
"../
|
|
8280
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/NullType.ts"() {
|
|
8236
8281
|
"use strict";
|
|
8237
8282
|
init_thrift_runtime();
|
|
8238
8283
|
NullType = class _NullType {
|
|
@@ -8267,10 +8312,10 @@ var init_NullType = __esm({
|
|
|
8267
8312
|
}
|
|
8268
8313
|
});
|
|
8269
8314
|
|
|
8270
|
-
// ../
|
|
8315
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/DecimalType.ts
|
|
8271
8316
|
var DecimalType;
|
|
8272
8317
|
var init_DecimalType = __esm({
|
|
8273
|
-
"../
|
|
8318
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/DecimalType.ts"() {
|
|
8274
8319
|
"use strict";
|
|
8275
8320
|
init_thrift_runtime();
|
|
8276
8321
|
DecimalType = class _DecimalType {
|
|
@@ -8357,10 +8402,10 @@ var init_DecimalType = __esm({
|
|
|
8357
8402
|
}
|
|
8358
8403
|
});
|
|
8359
8404
|
|
|
8360
|
-
// ../
|
|
8405
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/MilliSeconds.ts
|
|
8361
8406
|
var MilliSeconds;
|
|
8362
8407
|
var init_MilliSeconds = __esm({
|
|
8363
|
-
"../
|
|
8408
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/MilliSeconds.ts"() {
|
|
8364
8409
|
"use strict";
|
|
8365
8410
|
init_thrift_runtime();
|
|
8366
8411
|
MilliSeconds = class _MilliSeconds {
|
|
@@ -8395,10 +8440,10 @@ var init_MilliSeconds = __esm({
|
|
|
8395
8440
|
}
|
|
8396
8441
|
});
|
|
8397
8442
|
|
|
8398
|
-
// ../
|
|
8443
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/MicroSeconds.ts
|
|
8399
8444
|
var MicroSeconds;
|
|
8400
8445
|
var init_MicroSeconds = __esm({
|
|
8401
|
-
"../
|
|
8446
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/MicroSeconds.ts"() {
|
|
8402
8447
|
"use strict";
|
|
8403
8448
|
init_thrift_runtime();
|
|
8404
8449
|
MicroSeconds = class _MicroSeconds {
|
|
@@ -8433,10 +8478,10 @@ var init_MicroSeconds = __esm({
|
|
|
8433
8478
|
}
|
|
8434
8479
|
});
|
|
8435
8480
|
|
|
8436
|
-
// ../
|
|
8481
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/NanoSeconds.ts
|
|
8437
8482
|
var NanoSeconds;
|
|
8438
8483
|
var init_NanoSeconds = __esm({
|
|
8439
|
-
"../
|
|
8484
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/NanoSeconds.ts"() {
|
|
8440
8485
|
"use strict";
|
|
8441
8486
|
init_thrift_runtime();
|
|
8442
8487
|
NanoSeconds = class _NanoSeconds {
|
|
@@ -8462,10 +8507,10 @@ var init_NanoSeconds = __esm({
|
|
|
8462
8507
|
}
|
|
8463
8508
|
});
|
|
8464
8509
|
|
|
8465
|
-
// ../
|
|
8510
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/TimeUnit.ts
|
|
8466
8511
|
var TimeUnit2;
|
|
8467
8512
|
var init_TimeUnit = __esm({
|
|
8468
|
-
"../
|
|
8513
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/TimeUnit.ts"() {
|
|
8469
8514
|
"use strict";
|
|
8470
8515
|
init_thrift_runtime();
|
|
8471
8516
|
init_MicroSeconds();
|
|
@@ -8603,10 +8648,10 @@ var init_TimeUnit = __esm({
|
|
|
8603
8648
|
}
|
|
8604
8649
|
});
|
|
8605
8650
|
|
|
8606
|
-
// ../
|
|
8651
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/TimestampType.ts
|
|
8607
8652
|
var TimestampType;
|
|
8608
8653
|
var init_TimestampType = __esm({
|
|
8609
|
-
"../
|
|
8654
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/TimestampType.ts"() {
|
|
8610
8655
|
"use strict";
|
|
8611
8656
|
init_thrift_runtime();
|
|
8612
8657
|
init_TimeUnit();
|
|
@@ -8694,10 +8739,10 @@ var init_TimestampType = __esm({
|
|
|
8694
8739
|
}
|
|
8695
8740
|
});
|
|
8696
8741
|
|
|
8697
|
-
// ../
|
|
8742
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/TimeType.ts
|
|
8698
8743
|
var TimeType;
|
|
8699
8744
|
var init_TimeType = __esm({
|
|
8700
|
-
"../
|
|
8745
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/TimeType.ts"() {
|
|
8701
8746
|
"use strict";
|
|
8702
8747
|
init_thrift_runtime();
|
|
8703
8748
|
init_TimeUnit();
|
|
@@ -8785,10 +8830,10 @@ var init_TimeType = __esm({
|
|
|
8785
8830
|
}
|
|
8786
8831
|
});
|
|
8787
8832
|
|
|
8788
|
-
// ../
|
|
8833
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/IntType.ts
|
|
8789
8834
|
var IntType;
|
|
8790
8835
|
var init_IntType = __esm({
|
|
8791
|
-
"../
|
|
8836
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/IntType.ts"() {
|
|
8792
8837
|
"use strict";
|
|
8793
8838
|
init_thrift_runtime();
|
|
8794
8839
|
IntType = class _IntType {
|
|
@@ -8875,10 +8920,10 @@ var init_IntType = __esm({
|
|
|
8875
8920
|
}
|
|
8876
8921
|
});
|
|
8877
8922
|
|
|
8878
|
-
// ../
|
|
8923
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/JsonType.ts
|
|
8879
8924
|
var JsonType;
|
|
8880
8925
|
var init_JsonType = __esm({
|
|
8881
|
-
"../
|
|
8926
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/JsonType.ts"() {
|
|
8882
8927
|
"use strict";
|
|
8883
8928
|
init_thrift_runtime();
|
|
8884
8929
|
JsonType = class _JsonType {
|
|
@@ -8913,10 +8958,10 @@ var init_JsonType = __esm({
|
|
|
8913
8958
|
}
|
|
8914
8959
|
});
|
|
8915
8960
|
|
|
8916
|
-
// ../
|
|
8961
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/BsonType.ts
|
|
8917
8962
|
var BsonType;
|
|
8918
8963
|
var init_BsonType = __esm({
|
|
8919
|
-
"../
|
|
8964
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/BsonType.ts"() {
|
|
8920
8965
|
"use strict";
|
|
8921
8966
|
init_thrift_runtime();
|
|
8922
8967
|
BsonType = class _BsonType {
|
|
@@ -8951,10 +8996,10 @@ var init_BsonType = __esm({
|
|
|
8951
8996
|
}
|
|
8952
8997
|
});
|
|
8953
8998
|
|
|
8954
|
-
// ../
|
|
8999
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/LogicalType.ts
|
|
8955
9000
|
var LogicalType;
|
|
8956
9001
|
var init_LogicalType = __esm({
|
|
8957
|
-
"../
|
|
9002
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/LogicalType.ts"() {
|
|
8958
9003
|
"use strict";
|
|
8959
9004
|
init_thrift_runtime();
|
|
8960
9005
|
init_BsonType();
|
|
@@ -9414,10 +9459,10 @@ var init_LogicalType = __esm({
|
|
|
9414
9459
|
}
|
|
9415
9460
|
});
|
|
9416
9461
|
|
|
9417
|
-
// ../
|
|
9462
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/SchemaElement.ts
|
|
9418
9463
|
var SchemaElement;
|
|
9419
9464
|
var init_SchemaElement = __esm({
|
|
9420
|
-
"../
|
|
9465
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/SchemaElement.ts"() {
|
|
9421
9466
|
"use strict";
|
|
9422
9467
|
init_thrift_runtime();
|
|
9423
9468
|
init_LogicalType();
|
|
@@ -9636,10 +9681,10 @@ var init_SchemaElement = __esm({
|
|
|
9636
9681
|
}
|
|
9637
9682
|
});
|
|
9638
9683
|
|
|
9639
|
-
// ../
|
|
9684
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/DataPageHeader.ts
|
|
9640
9685
|
var DataPageHeader;
|
|
9641
9686
|
var init_DataPageHeader = __esm({
|
|
9642
|
-
"../
|
|
9687
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/DataPageHeader.ts"() {
|
|
9643
9688
|
"use strict";
|
|
9644
9689
|
init_thrift_runtime();
|
|
9645
9690
|
init_Statistics();
|
|
@@ -9788,10 +9833,10 @@ var init_DataPageHeader = __esm({
|
|
|
9788
9833
|
}
|
|
9789
9834
|
});
|
|
9790
9835
|
|
|
9791
|
-
// ../
|
|
9836
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/IndexPageHeader.ts
|
|
9792
9837
|
var IndexPageHeader;
|
|
9793
9838
|
var init_IndexPageHeader = __esm({
|
|
9794
|
-
"../
|
|
9839
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/IndexPageHeader.ts"() {
|
|
9795
9840
|
"use strict";
|
|
9796
9841
|
init_thrift_runtime();
|
|
9797
9842
|
IndexPageHeader = class _IndexPageHeader {
|
|
@@ -9826,10 +9871,10 @@ var init_IndexPageHeader = __esm({
|
|
|
9826
9871
|
}
|
|
9827
9872
|
});
|
|
9828
9873
|
|
|
9829
|
-
// ../
|
|
9874
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/DictionaryPageHeader.ts
|
|
9830
9875
|
var DictionaryPageHeader;
|
|
9831
9876
|
var init_DictionaryPageHeader = __esm({
|
|
9832
|
-
"../
|
|
9877
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/DictionaryPageHeader.ts"() {
|
|
9833
9878
|
"use strict";
|
|
9834
9879
|
init_thrift_runtime();
|
|
9835
9880
|
DictionaryPageHeader = class _DictionaryPageHeader {
|
|
@@ -9933,10 +9978,10 @@ var init_DictionaryPageHeader = __esm({
|
|
|
9933
9978
|
}
|
|
9934
9979
|
});
|
|
9935
9980
|
|
|
9936
|
-
// ../
|
|
9981
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/DataPageHeaderV2.ts
|
|
9937
9982
|
var DataPageHeaderV2;
|
|
9938
9983
|
var init_DataPageHeaderV2 = __esm({
|
|
9939
|
-
"../
|
|
9984
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/DataPageHeaderV2.ts"() {
|
|
9940
9985
|
"use strict";
|
|
9941
9986
|
init_thrift_runtime();
|
|
9942
9987
|
init_Statistics();
|
|
@@ -10146,10 +10191,10 @@ var init_DataPageHeaderV2 = __esm({
|
|
|
10146
10191
|
}
|
|
10147
10192
|
});
|
|
10148
10193
|
|
|
10149
|
-
// ../
|
|
10194
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/PageHeader.ts
|
|
10150
10195
|
var PageHeader;
|
|
10151
10196
|
var init_PageHeader = __esm({
|
|
10152
|
-
"../
|
|
10197
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/PageHeader.ts"() {
|
|
10153
10198
|
"use strict";
|
|
10154
10199
|
init_thrift_runtime();
|
|
10155
10200
|
init_DataPageHeader();
|
|
@@ -10347,10 +10392,10 @@ var init_PageHeader = __esm({
|
|
|
10347
10392
|
}
|
|
10348
10393
|
});
|
|
10349
10394
|
|
|
10350
|
-
// ../
|
|
10395
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/KeyValue.ts
|
|
10351
10396
|
var KeyValue;
|
|
10352
10397
|
var init_KeyValue = __esm({
|
|
10353
|
-
"../
|
|
10398
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/KeyValue.ts"() {
|
|
10354
10399
|
"use strict";
|
|
10355
10400
|
init_thrift_runtime();
|
|
10356
10401
|
KeyValue = class _KeyValue {
|
|
@@ -10432,10 +10477,10 @@ var init_KeyValue = __esm({
|
|
|
10432
10477
|
}
|
|
10433
10478
|
});
|
|
10434
10479
|
|
|
10435
|
-
// ../
|
|
10480
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/SortingColumn.ts
|
|
10436
10481
|
var SortingColumn;
|
|
10437
10482
|
var init_SortingColumn = __esm({
|
|
10438
|
-
"../
|
|
10483
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/SortingColumn.ts"() {
|
|
10439
10484
|
"use strict";
|
|
10440
10485
|
init_thrift_runtime();
|
|
10441
10486
|
SortingColumn = class _SortingColumn {
|
|
@@ -10544,10 +10589,10 @@ var init_SortingColumn = __esm({
|
|
|
10544
10589
|
}
|
|
10545
10590
|
});
|
|
10546
10591
|
|
|
10547
|
-
// ../
|
|
10592
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/PageEncodingStats.ts
|
|
10548
10593
|
var PageEncodingStats;
|
|
10549
10594
|
var init_PageEncodingStats = __esm({
|
|
10550
|
-
"../
|
|
10595
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/PageEncodingStats.ts"() {
|
|
10551
10596
|
"use strict";
|
|
10552
10597
|
init_thrift_runtime();
|
|
10553
10598
|
PageEncodingStats = class _PageEncodingStats {
|
|
@@ -10656,7 +10701,7 @@ var init_PageEncodingStats = __esm({
|
|
|
10656
10701
|
}
|
|
10657
10702
|
});
|
|
10658
10703
|
|
|
10659
|
-
// ../
|
|
10704
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/BoundingBox.ts
|
|
10660
10705
|
function writeCoordinate(output, name, fieldId, value) {
|
|
10661
10706
|
if (value === void 0) return;
|
|
10662
10707
|
output.writeFieldBegin(name, Thrift.Type.DOUBLE, fieldId);
|
|
@@ -10674,7 +10719,7 @@ function getRequiredCoordinate(value, name) {
|
|
|
10674
10719
|
}
|
|
10675
10720
|
var BoundingBox;
|
|
10676
10721
|
var init_BoundingBox = __esm({
|
|
10677
|
-
"../
|
|
10722
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/BoundingBox.ts"() {
|
|
10678
10723
|
"use strict";
|
|
10679
10724
|
init_thrift_runtime();
|
|
10680
10725
|
BoundingBox = class _BoundingBox {
|
|
@@ -10741,10 +10786,10 @@ var init_BoundingBox = __esm({
|
|
|
10741
10786
|
}
|
|
10742
10787
|
});
|
|
10743
10788
|
|
|
10744
|
-
// ../
|
|
10789
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/GeospatialStatistics.ts
|
|
10745
10790
|
var GeospatialStatistics;
|
|
10746
10791
|
var init_GeospatialStatistics = __esm({
|
|
10747
|
-
"../
|
|
10792
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/GeospatialStatistics.ts"() {
|
|
10748
10793
|
"use strict";
|
|
10749
10794
|
init_thrift_runtime();
|
|
10750
10795
|
init_BoundingBox();
|
|
@@ -10801,7 +10846,7 @@ var init_GeospatialStatistics = __esm({
|
|
|
10801
10846
|
}
|
|
10802
10847
|
});
|
|
10803
10848
|
|
|
10804
|
-
// ../
|
|
10849
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/SizeStatistics.ts
|
|
10805
10850
|
function toInt64(value) {
|
|
10806
10851
|
return value === void 0 ? void 0 : typeof value === "number" ? new CompactInt64(value) : value;
|
|
10807
10852
|
}
|
|
@@ -10825,7 +10870,7 @@ function readInt64List(input) {
|
|
|
10825
10870
|
}
|
|
10826
10871
|
var SizeStatistics;
|
|
10827
10872
|
var init_SizeStatistics = __esm({
|
|
10828
|
-
"../
|
|
10873
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/SizeStatistics.ts"() {
|
|
10829
10874
|
"use strict";
|
|
10830
10875
|
init_uint8_array_compact_protocol();
|
|
10831
10876
|
init_thrift_runtime();
|
|
@@ -10876,7 +10921,7 @@ var init_SizeStatistics = __esm({
|
|
|
10876
10921
|
}
|
|
10877
10922
|
});
|
|
10878
10923
|
|
|
10879
|
-
// ../
|
|
10924
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/EncryptionAlgorithm.ts
|
|
10880
10925
|
function writeAlgorithm(output, name, fieldId, algorithm) {
|
|
10881
10926
|
output.writeFieldBegin(name, Thrift.Type.STRUCT, fieldId);
|
|
10882
10927
|
output.writeStructBegin(name);
|
|
@@ -10919,7 +10964,7 @@ function writeBinary(output, name, fieldId, value) {
|
|
|
10919
10964
|
}
|
|
10920
10965
|
var AesGcmV1, EncryptionAlgorithm;
|
|
10921
10966
|
var init_EncryptionAlgorithm = __esm({
|
|
10922
|
-
"../
|
|
10967
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/EncryptionAlgorithm.ts"() {
|
|
10923
10968
|
"use strict";
|
|
10924
10969
|
init_thrift_runtime();
|
|
10925
10970
|
AesGcmV1 = class {
|
|
@@ -10983,10 +11028,10 @@ var init_EncryptionAlgorithm = __esm({
|
|
|
10983
11028
|
}
|
|
10984
11029
|
});
|
|
10985
11030
|
|
|
10986
|
-
// ../
|
|
11031
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/ColumnCryptoMetaData.ts
|
|
10987
11032
|
var EncryptionWithFooterKey, EncryptionWithColumnKey, ColumnCryptoMetaData;
|
|
10988
11033
|
var init_ColumnCryptoMetaData = __esm({
|
|
10989
|
-
"../
|
|
11034
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/ColumnCryptoMetaData.ts"() {
|
|
10990
11035
|
"use strict";
|
|
10991
11036
|
init_thrift_runtime();
|
|
10992
11037
|
EncryptionWithFooterKey = class _EncryptionWithFooterKey {
|
|
@@ -11108,10 +11153,10 @@ var init_ColumnCryptoMetaData = __esm({
|
|
|
11108
11153
|
}
|
|
11109
11154
|
});
|
|
11110
11155
|
|
|
11111
|
-
// ../
|
|
11156
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/FileCryptoMetaData.ts
|
|
11112
11157
|
var FileCryptoMetaData;
|
|
11113
11158
|
var init_FileCryptoMetaData = __esm({
|
|
11114
|
-
"../
|
|
11159
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/FileCryptoMetaData.ts"() {
|
|
11115
11160
|
"use strict";
|
|
11116
11161
|
init_thrift_runtime();
|
|
11117
11162
|
init_EncryptionAlgorithm();
|
|
@@ -11165,10 +11210,10 @@ var init_FileCryptoMetaData = __esm({
|
|
|
11165
11210
|
}
|
|
11166
11211
|
});
|
|
11167
11212
|
|
|
11168
|
-
// ../
|
|
11213
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/ColumnMetaData.ts
|
|
11169
11214
|
var ColumnMetaData;
|
|
11170
11215
|
var init_ColumnMetaData = __esm({
|
|
11171
|
-
"../
|
|
11216
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/ColumnMetaData.ts"() {
|
|
11172
11217
|
"use strict";
|
|
11173
11218
|
init_uint8_array_compact_protocol();
|
|
11174
11219
|
init_thrift_runtime();
|
|
@@ -11610,10 +11655,10 @@ var init_ColumnMetaData = __esm({
|
|
|
11610
11655
|
}
|
|
11611
11656
|
});
|
|
11612
11657
|
|
|
11613
|
-
// ../
|
|
11658
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/ColumnChunk.ts
|
|
11614
11659
|
var ColumnChunk;
|
|
11615
11660
|
var init_ColumnChunk = __esm({
|
|
11616
|
-
"../
|
|
11661
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/ColumnChunk.ts"() {
|
|
11617
11662
|
"use strict";
|
|
11618
11663
|
init_uint8_array_compact_protocol();
|
|
11619
11664
|
init_thrift_runtime();
|
|
@@ -11827,10 +11872,10 @@ var init_ColumnChunk = __esm({
|
|
|
11827
11872
|
}
|
|
11828
11873
|
});
|
|
11829
11874
|
|
|
11830
|
-
// ../
|
|
11875
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/RowGroup.ts
|
|
11831
11876
|
var RowGroup;
|
|
11832
11877
|
var init_RowGroup = __esm({
|
|
11833
|
-
"../
|
|
11878
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/RowGroup.ts"() {
|
|
11834
11879
|
"use strict";
|
|
11835
11880
|
init_uint8_array_compact_protocol();
|
|
11836
11881
|
init_thrift_runtime();
|
|
@@ -11989,10 +12034,10 @@ var init_RowGroup = __esm({
|
|
|
11989
12034
|
}
|
|
11990
12035
|
});
|
|
11991
12036
|
|
|
11992
|
-
// ../
|
|
12037
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/TypeDefinedOrder.ts
|
|
11993
12038
|
var TypeDefinedOrder;
|
|
11994
12039
|
var init_TypeDefinedOrder = __esm({
|
|
11995
|
-
"../
|
|
12040
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/TypeDefinedOrder.ts"() {
|
|
11996
12041
|
"use strict";
|
|
11997
12042
|
init_thrift_runtime();
|
|
11998
12043
|
TypeDefinedOrder = class _TypeDefinedOrder {
|
|
@@ -12027,10 +12072,10 @@ var init_TypeDefinedOrder = __esm({
|
|
|
12027
12072
|
}
|
|
12028
12073
|
});
|
|
12029
12074
|
|
|
12030
|
-
// ../
|
|
12075
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/PageLocation.ts
|
|
12031
12076
|
var PageLocation;
|
|
12032
12077
|
var init_PageLocation = __esm({
|
|
12033
|
-
"../
|
|
12078
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/PageLocation.ts"() {
|
|
12034
12079
|
"use strict";
|
|
12035
12080
|
init_uint8_array_compact_protocol();
|
|
12036
12081
|
init_thrift_runtime();
|
|
@@ -12148,10 +12193,10 @@ var init_PageLocation = __esm({
|
|
|
12148
12193
|
}
|
|
12149
12194
|
});
|
|
12150
12195
|
|
|
12151
|
-
// ../
|
|
12196
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/OffsetIndex.ts
|
|
12152
12197
|
var OffsetIndex;
|
|
12153
12198
|
var init_OffsetIndex = __esm({
|
|
12154
|
-
"../
|
|
12199
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/OffsetIndex.ts"() {
|
|
12155
12200
|
"use strict";
|
|
12156
12201
|
init_thrift_runtime();
|
|
12157
12202
|
init_PageLocation();
|
|
@@ -12228,10 +12273,10 @@ var init_OffsetIndex = __esm({
|
|
|
12228
12273
|
}
|
|
12229
12274
|
});
|
|
12230
12275
|
|
|
12231
|
-
// ../
|
|
12276
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/ColumnIndex.ts
|
|
12232
12277
|
var ColumnIndex;
|
|
12233
12278
|
var init_ColumnIndex = __esm({
|
|
12234
|
-
"../
|
|
12279
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/ColumnIndex.ts"() {
|
|
12235
12280
|
"use strict";
|
|
12236
12281
|
init_uint8_array_compact_protocol();
|
|
12237
12282
|
init_thrift_runtime();
|
|
@@ -12424,10 +12469,10 @@ var init_ColumnIndex = __esm({
|
|
|
12424
12469
|
}
|
|
12425
12470
|
});
|
|
12426
12471
|
|
|
12427
|
-
// ../
|
|
12472
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/ColumnOrder.ts
|
|
12428
12473
|
var ColumnOrder;
|
|
12429
12474
|
var init_ColumnOrder = __esm({
|
|
12430
|
-
"../
|
|
12475
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/ColumnOrder.ts"() {
|
|
12431
12476
|
"use strict";
|
|
12432
12477
|
init_thrift_runtime();
|
|
12433
12478
|
init_TypeDefinedOrder();
|
|
@@ -12519,10 +12564,10 @@ var init_ColumnOrder = __esm({
|
|
|
12519
12564
|
}
|
|
12520
12565
|
});
|
|
12521
12566
|
|
|
12522
|
-
// ../
|
|
12567
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/FileMetaData.ts
|
|
12523
12568
|
var FileMetaData;
|
|
12524
12569
|
var init_FileMetaData = __esm({
|
|
12525
|
-
"../
|
|
12570
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/FileMetaData.ts"() {
|
|
12526
12571
|
"use strict";
|
|
12527
12572
|
init_uint8_array_compact_protocol();
|
|
12528
12573
|
init_thrift_runtime();
|
|
@@ -12790,9 +12835,9 @@ var init_FileMetaData = __esm({
|
|
|
12790
12835
|
}
|
|
12791
12836
|
});
|
|
12792
12837
|
|
|
12793
|
-
// ../
|
|
12838
|
+
// ../tables/src/parquet/parquetjs/parquet-thrift/index.ts
|
|
12794
12839
|
var init_parquet_thrift = __esm({
|
|
12795
|
-
"../
|
|
12840
|
+
"../tables/src/parquet/parquetjs/parquet-thrift/index.ts"() {
|
|
12796
12841
|
"use strict";
|
|
12797
12842
|
init_Type();
|
|
12798
12843
|
init_ConvertedType();
|
|
@@ -12852,68 +12897,21 @@ var init_parquet_thrift = __esm({
|
|
|
12852
12897
|
}
|
|
12853
12898
|
});
|
|
12854
12899
|
|
|
12855
|
-
// ../
|
|
12856
|
-
var BSONFormat;
|
|
12857
|
-
var init_bson_format = __esm({
|
|
12858
|
-
"../bson/src/bson-format.ts"() {
|
|
12859
|
-
"use strict";
|
|
12860
|
-
BSONFormat = {
|
|
12861
|
-
name: "BSON",
|
|
12862
|
-
id: "bson",
|
|
12863
|
-
module: "bson",
|
|
12864
|
-
extensions: ["bson"],
|
|
12865
|
-
mimeTypes: ["application/bson"],
|
|
12866
|
-
category: "json",
|
|
12867
|
-
encoding: "binary",
|
|
12868
|
-
format: "bson",
|
|
12869
|
-
binary: true
|
|
12870
|
-
};
|
|
12871
|
-
}
|
|
12872
|
-
});
|
|
12873
|
-
|
|
12874
|
-
// ../bson/src/lib/encoders/encode-bson.ts
|
|
12900
|
+
// ../tables/src/bson/lib/encoders/encode-bson.ts
|
|
12875
12901
|
function encodeBSONSync(value, options) {
|
|
12876
12902
|
const uint8Array = BSON.serialize(value);
|
|
12877
12903
|
return ensureArrayBuffer(uint8Array);
|
|
12878
12904
|
}
|
|
12879
12905
|
var BSON;
|
|
12880
12906
|
var init_encode_bson = __esm({
|
|
12881
|
-
"../
|
|
12907
|
+
"../tables/src/bson/lib/encoders/encode-bson.ts"() {
|
|
12882
12908
|
"use strict";
|
|
12883
12909
|
BSON = __toESM(require("bson"), 1);
|
|
12884
|
-
|
|
12885
|
-
}
|
|
12886
|
-
});
|
|
12887
|
-
|
|
12888
|
-
// ../bson/src/bson-writer.ts
|
|
12889
|
-
var VERSION3, BSONWriter;
|
|
12890
|
-
var init_bson_writer = __esm({
|
|
12891
|
-
"../bson/src/bson-writer.ts"() {
|
|
12892
|
-
"use strict";
|
|
12893
|
-
init_encode_bson();
|
|
12894
|
-
init_bson_format();
|
|
12895
|
-
VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
12896
|
-
BSONWriter = {
|
|
12897
|
-
...BSONFormat,
|
|
12898
|
-
name: "BSON",
|
|
12899
|
-
id: "bson",
|
|
12900
|
-
module: "bson",
|
|
12901
|
-
version: VERSION3,
|
|
12902
|
-
extensions: ["bson"],
|
|
12903
|
-
options: {
|
|
12904
|
-
bson: {}
|
|
12905
|
-
},
|
|
12906
|
-
async encode(data, options) {
|
|
12907
|
-
return encodeBSONSync(data, {});
|
|
12908
|
-
},
|
|
12909
|
-
encodeSync(data, options) {
|
|
12910
|
-
return encodeBSONSync(data, {});
|
|
12911
|
-
}
|
|
12912
|
-
};
|
|
12910
|
+
init_loader_utils();
|
|
12913
12911
|
}
|
|
12914
12912
|
});
|
|
12915
12913
|
|
|
12916
|
-
// ../
|
|
12914
|
+
// ../tables/src/bson/lib/parsers/parse-bson.ts
|
|
12917
12915
|
function parseBSONSync(value, options) {
|
|
12918
12916
|
const documentArrayBuffer = getBSONDocumentArrayBuffer(value, options);
|
|
12919
12917
|
const { concatenatedDocuments: _concatenatedDocuments, ...deserializeOptions } = options || {};
|
|
@@ -12965,22 +12963,13 @@ function countConcatenatedBSONDocuments(value) {
|
|
|
12965
12963
|
}
|
|
12966
12964
|
var BSON2;
|
|
12967
12965
|
var init_parse_bson = __esm({
|
|
12968
|
-
"../
|
|
12966
|
+
"../tables/src/bson/lib/parsers/parse-bson.ts"() {
|
|
12969
12967
|
"use strict";
|
|
12970
12968
|
BSON2 = __toESM(require("bson"), 1);
|
|
12971
12969
|
}
|
|
12972
12970
|
});
|
|
12973
12971
|
|
|
12974
|
-
// ../
|
|
12975
|
-
var init_src7 = __esm({
|
|
12976
|
-
"../bson/src/index.ts"() {
|
|
12977
|
-
"use strict";
|
|
12978
|
-
init_bson_writer();
|
|
12979
|
-
init_parse_bson();
|
|
12980
|
-
}
|
|
12981
|
-
});
|
|
12982
|
-
|
|
12983
|
-
// ../parquet/src/parquetjs/schema/types.ts
|
|
12972
|
+
// ../tables/src/parquet/parquetjs/schema/types.ts
|
|
12984
12973
|
function toPrimitive(type, value, field) {
|
|
12985
12974
|
if (!(type in PARQUET_LOGICAL_TYPES)) {
|
|
12986
12975
|
throw new Error(`invalid type: ${type}`);
|
|
@@ -13264,8 +13253,7 @@ function fromPrimitive_JSON(value) {
|
|
|
13264
13253
|
return JSON.parse(decodeUtf82(toUint8Array2(value)));
|
|
13265
13254
|
}
|
|
13266
13255
|
function toPrimitive_BSON(value) {
|
|
13267
|
-
|
|
13268
|
-
const arrayBuffer = (_b = (_a = BSONWriter).encodeSync) == null ? void 0 : _b.call(_a, value);
|
|
13256
|
+
const arrayBuffer = encodeBSONSync(value);
|
|
13269
13257
|
return toUint8Array2(arrayBuffer);
|
|
13270
13258
|
}
|
|
13271
13259
|
function fromPrimitive_BSON(value) {
|
|
@@ -13379,9 +13367,10 @@ function decimalFromPrimitive_BYTE_ARRAY(value, field) {
|
|
|
13379
13367
|
}
|
|
13380
13368
|
var PARQUET_LOGICAL_TYPES, kMillisPerDay;
|
|
13381
13369
|
var init_types = __esm({
|
|
13382
|
-
"../
|
|
13370
|
+
"../tables/src/parquet/parquetjs/schema/types.ts"() {
|
|
13383
13371
|
"use strict";
|
|
13384
|
-
|
|
13372
|
+
init_encode_bson();
|
|
13373
|
+
init_parse_bson();
|
|
13385
13374
|
init_binary_utils();
|
|
13386
13375
|
PARQUET_LOGICAL_TYPES = {
|
|
13387
13376
|
BOOLEAN: {
|
|
@@ -13588,7 +13577,7 @@ var init_types = __esm({
|
|
|
13588
13577
|
}
|
|
13589
13578
|
});
|
|
13590
13579
|
|
|
13591
|
-
// ../
|
|
13580
|
+
// ../tables/src/parquet/lib/parquet-page-index.ts
|
|
13592
13581
|
async function createParquetPagePruningPlan(file, rowGroup, schema, selectedColumnPaths, predicate, signal, options) {
|
|
13593
13582
|
const rowCount = Number(rowGroup.num_rows);
|
|
13594
13583
|
const selectedColumnChunks = getSelectedColumnChunks(rowGroup, selectedColumnPaths);
|
|
@@ -14014,7 +14003,7 @@ function mergeByteRanges(ranges) {
|
|
|
14014
14003
|
return merged;
|
|
14015
14004
|
}
|
|
14016
14005
|
var init_parquet_page_index = __esm({
|
|
14017
|
-
"../
|
|
14006
|
+
"../tables/src/parquet/lib/parquet-page-index.ts"() {
|
|
14018
14007
|
"use strict";
|
|
14019
14008
|
init_parquet_thrift();
|
|
14020
14009
|
init_types();
|
|
@@ -14025,10 +14014,10 @@ var init_parquet_page_index = __esm({
|
|
|
14025
14014
|
}
|
|
14026
14015
|
});
|
|
14027
14016
|
|
|
14028
|
-
// ../
|
|
14017
|
+
// ../tables/src/parquet/parquet-format.ts
|
|
14029
14018
|
var ParquetFormat;
|
|
14030
14019
|
var init_parquet_format = __esm({
|
|
14031
|
-
"../
|
|
14020
|
+
"../tables/src/parquet/parquet-format.ts"() {
|
|
14032
14021
|
"use strict";
|
|
14033
14022
|
ParquetFormat = {
|
|
14034
14023
|
name: "Apache Parquet",
|
|
@@ -14043,10 +14032,10 @@ var init_parquet_format = __esm({
|
|
|
14043
14032
|
}
|
|
14044
14033
|
});
|
|
14045
14034
|
|
|
14046
|
-
// ../
|
|
14035
|
+
// ../tables/src/parquet/parquet-loader-options.ts
|
|
14047
14036
|
var PARQUET_LOADER_DEFAULT_OPTIONS;
|
|
14048
14037
|
var init_parquet_loader_options = __esm({
|
|
14049
|
-
"../
|
|
14038
|
+
"../tables/src/parquet/parquet-loader-options.ts"() {
|
|
14050
14039
|
"use strict";
|
|
14051
14040
|
PARQUET_LOADER_DEFAULT_OPTIONS = {
|
|
14052
14041
|
columns: void 0,
|
|
@@ -14056,21 +14045,21 @@ var init_parquet_loader_options = __esm({
|
|
|
14056
14045
|
}
|
|
14057
14046
|
});
|
|
14058
14047
|
|
|
14059
|
-
// ../
|
|
14060
|
-
var
|
|
14048
|
+
// ../tables/src/parquet/parquet-loader-base.ts
|
|
14049
|
+
var VERSION3, PARQUET_LOADER_BASE;
|
|
14061
14050
|
var init_parquet_loader_base = __esm({
|
|
14062
|
-
"../
|
|
14051
|
+
"../tables/src/parquet/parquet-loader-base.ts"() {
|
|
14063
14052
|
"use strict";
|
|
14064
14053
|
init_parquet_format();
|
|
14065
14054
|
init_parquet_loader_options();
|
|
14066
|
-
|
|
14055
|
+
VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
14067
14056
|
PARQUET_LOADER_BASE = {
|
|
14068
14057
|
...ParquetFormat,
|
|
14069
14058
|
dataType: null,
|
|
14070
14059
|
batchType: null,
|
|
14071
14060
|
id: "parquet",
|
|
14072
|
-
module: "
|
|
14073
|
-
version:
|
|
14061
|
+
module: "tables",
|
|
14062
|
+
version: VERSION3,
|
|
14074
14063
|
options: {
|
|
14075
14064
|
parquet: {
|
|
14076
14065
|
...PARQUET_LOADER_DEFAULT_OPTIONS
|
|
@@ -14080,39 +14069,42 @@ var init_parquet_loader_base = __esm({
|
|
|
14080
14069
|
}
|
|
14081
14070
|
});
|
|
14082
14071
|
|
|
14083
|
-
// ../
|
|
14072
|
+
// ../tables/src/parquet/parquet-source-worker-factory.ts
|
|
14084
14073
|
var PARQUET_SOURCE_WORKER_LOAD_WORKER;
|
|
14085
14074
|
var init_parquet_source_worker_factory = __esm({
|
|
14086
|
-
"../
|
|
14075
|
+
"../tables/src/parquet/parquet-source-worker-factory.ts"() {
|
|
14087
14076
|
"use strict";
|
|
14088
14077
|
PARQUET_SOURCE_WORKER_LOAD_WORKER = void 0;
|
|
14089
14078
|
}
|
|
14090
14079
|
});
|
|
14091
14080
|
|
|
14092
|
-
// ../
|
|
14081
|
+
// ../tables/src/parquet/parquet-source-worker-url.ts
|
|
14093
14082
|
function resolveParquetSourceWorkerUrl() {
|
|
14094
14083
|
if (!import_meta.url) {
|
|
14095
14084
|
return true;
|
|
14096
14085
|
}
|
|
14097
14086
|
try {
|
|
14098
|
-
return new URL(
|
|
14087
|
+
return new URL(
|
|
14088
|
+
getParquetSourceWorkerFile(),
|
|
14089
|
+
import_meta.url.replace("/src/parquet/", "/dist/parquet/")
|
|
14090
|
+
).toString();
|
|
14099
14091
|
} catch {
|
|
14100
14092
|
return true;
|
|
14101
14093
|
}
|
|
14102
14094
|
}
|
|
14103
14095
|
function getParquetSourceWorkerFile() {
|
|
14104
|
-
return "../
|
|
14096
|
+
return "../parquet-source-worker.js";
|
|
14105
14097
|
}
|
|
14106
14098
|
var import_meta, PARQUET_SOURCE_WORKER_URL;
|
|
14107
14099
|
var init_parquet_source_worker_url = __esm({
|
|
14108
|
-
"../
|
|
14100
|
+
"../tables/src/parquet/parquet-source-worker-url.ts"() {
|
|
14109
14101
|
"use strict";
|
|
14110
14102
|
import_meta = {};
|
|
14111
14103
|
PARQUET_SOURCE_WORKER_URL = resolveParquetSourceWorkerUrl();
|
|
14112
14104
|
}
|
|
14113
14105
|
});
|
|
14114
14106
|
|
|
14115
|
-
// ../
|
|
14107
|
+
// ../tables/src/parquet/lib/parquet-source-worker-client.ts
|
|
14116
14108
|
function canDecodeParquetSourceOnWorker(options) {
|
|
14117
14109
|
return isBrowser && canParseWithWorker(PARQUET_SOURCE_WORKER, options);
|
|
14118
14110
|
}
|
|
@@ -14125,9 +14117,9 @@ async function decodeParquetSourceRowGroupOnWorker(input, options) {
|
|
|
14125
14117
|
}
|
|
14126
14118
|
var PARQUET_SOURCE_WORKER;
|
|
14127
14119
|
var init_parquet_source_worker_client = __esm({
|
|
14128
|
-
"../
|
|
14120
|
+
"../tables/src/parquet/lib/parquet-source-worker-client.ts"() {
|
|
14129
14121
|
"use strict";
|
|
14130
|
-
|
|
14122
|
+
init_loader_utils();
|
|
14131
14123
|
init_parquet_loader_base();
|
|
14132
14124
|
init_parquet_source_worker_factory();
|
|
14133
14125
|
init_parquet_source_worker_url();
|
|
@@ -14141,7 +14133,7 @@ var init_parquet_source_worker_client = __esm({
|
|
|
14141
14133
|
}
|
|
14142
14134
|
});
|
|
14143
14135
|
|
|
14144
|
-
// ../
|
|
14136
|
+
// ../tables/src/parquet/lib/slice-parquet-batch.ts
|
|
14145
14137
|
function sliceParquetBatch(batch, rowCount) {
|
|
14146
14138
|
var _a, _b;
|
|
14147
14139
|
if (!Number.isSafeInteger(rowCount) || rowCount < 0 || rowCount > batch.length) {
|
|
@@ -14161,12 +14153,12 @@ function sliceParquetBatch(batch, rowCount) {
|
|
|
14161
14153
|
};
|
|
14162
14154
|
}
|
|
14163
14155
|
var init_slice_parquet_batch = __esm({
|
|
14164
|
-
"../
|
|
14156
|
+
"../tables/src/parquet/lib/slice-parquet-batch.ts"() {
|
|
14165
14157
|
"use strict";
|
|
14166
14158
|
}
|
|
14167
14159
|
});
|
|
14168
14160
|
|
|
14169
|
-
// ../
|
|
14161
|
+
// ../tables/src/parquet/lib/sources/parquet-range-file.ts
|
|
14170
14162
|
function getCurrentTime() {
|
|
14171
14163
|
var _a;
|
|
14172
14164
|
return ((_a = globalThis.performance) == null ? void 0 : _a.now()) ?? Date.now();
|
|
@@ -14237,9 +14229,9 @@ function createCombinedAbortSignal(firstSignal, secondSignal) {
|
|
|
14237
14229
|
}
|
|
14238
14230
|
var DEFAULT_RANGE_CACHE_BYTES, ParquetRangeFile;
|
|
14239
14231
|
var init_parquet_range_file = __esm({
|
|
14240
|
-
"../
|
|
14232
|
+
"../tables/src/parquet/lib/sources/parquet-range-file.ts"() {
|
|
14241
14233
|
"use strict";
|
|
14242
|
-
|
|
14234
|
+
init_loader_utils();
|
|
14243
14235
|
DEFAULT_RANGE_CACHE_BYTES = 65536;
|
|
14244
14236
|
ParquetRangeFile = class {
|
|
14245
14237
|
/** URL used as the file handle. */
|
|
@@ -14431,10 +14423,10 @@ var init_parquet_range_file = __esm({
|
|
|
14431
14423
|
}
|
|
14432
14424
|
});
|
|
14433
14425
|
|
|
14434
|
-
// ../
|
|
14426
|
+
// ../tables/src/parquet/parquet-source-capabilities.ts
|
|
14435
14427
|
var PARQUET_TABLE_QUERY_CAPABILITIES, PARQUET_SOURCE_CAPABILITIES;
|
|
14436
14428
|
var init_parquet_source_capabilities = __esm({
|
|
14437
|
-
"../
|
|
14429
|
+
"../tables/src/parquet/parquet-source-capabilities.ts"() {
|
|
14438
14430
|
"use strict";
|
|
14439
14431
|
PARQUET_TABLE_QUERY_CAPABILITIES = Object.freeze({
|
|
14440
14432
|
projection: "pushdown",
|
|
@@ -14465,25 +14457,25 @@ var init_parquet_source_capabilities = __esm({
|
|
|
14465
14457
|
}
|
|
14466
14458
|
});
|
|
14467
14459
|
|
|
14468
|
-
// ../
|
|
14460
|
+
// ../tables/src/parquet/parquet-source-loader-types.ts
|
|
14469
14461
|
async function preloadParquetSourceLoader() {
|
|
14470
14462
|
const { ParquetSourceLoaderWithParser: ParquetSourceLoaderWithParser2 } = await Promise.resolve().then(() => (init_parquet_source_loader(), parquet_source_loader_exports));
|
|
14471
14463
|
return ParquetSourceLoaderWithParser2;
|
|
14472
14464
|
}
|
|
14473
|
-
var
|
|
14465
|
+
var VERSION4, ParquetSourceLoader;
|
|
14474
14466
|
var init_parquet_source_loader_types = __esm({
|
|
14475
|
-
"../
|
|
14467
|
+
"../tables/src/parquet/parquet-source-loader-types.ts"() {
|
|
14476
14468
|
"use strict";
|
|
14477
14469
|
init_parquet_format();
|
|
14478
|
-
|
|
14470
|
+
VERSION4 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
14479
14471
|
ParquetSourceLoader = {
|
|
14480
14472
|
...ParquetFormat,
|
|
14481
14473
|
dataType: null,
|
|
14482
14474
|
batchType: null,
|
|
14483
14475
|
name: "ParquetSourceLoader",
|
|
14484
14476
|
id: "parquet-source",
|
|
14485
|
-
module: "
|
|
14486
|
-
version:
|
|
14477
|
+
module: "tables",
|
|
14478
|
+
version: VERSION4,
|
|
14487
14479
|
type: "parquet",
|
|
14488
14480
|
fromUrl: true,
|
|
14489
14481
|
fromBlob: true,
|
|
@@ -14546,7 +14538,7 @@ var init_parquet_source_loader_types = __esm({
|
|
|
14546
14538
|
}
|
|
14547
14539
|
});
|
|
14548
14540
|
|
|
14549
|
-
// ../
|
|
14541
|
+
// ../tables/src/parquet/parquetjs/compression.ts
|
|
14550
14542
|
async function preloadCompressions(options) {
|
|
14551
14543
|
registerJSModules(options == null ? void 0 : options.modules);
|
|
14552
14544
|
}
|
|
@@ -14597,10 +14589,10 @@ function createParquetDecompressor(method) {
|
|
|
14597
14589
|
}
|
|
14598
14590
|
var PARQUET_COMPRESSION_METHODS, ParquetLzoDecompressor;
|
|
14599
14591
|
var init_compression2 = __esm({
|
|
14600
|
-
"../
|
|
14592
|
+
"../tables/src/parquet/parquetjs/compression.ts"() {
|
|
14601
14593
|
"use strict";
|
|
14602
|
-
|
|
14603
|
-
|
|
14594
|
+
init_src();
|
|
14595
|
+
init_loader_utils();
|
|
14604
14596
|
init_binary_utils();
|
|
14605
14597
|
PARQUET_COMPRESSION_METHODS = {
|
|
14606
14598
|
UNCOMPRESSED: true,
|
|
@@ -14665,7 +14657,7 @@ var init_compression2 = __esm({
|
|
|
14665
14657
|
}
|
|
14666
14658
|
});
|
|
14667
14659
|
|
|
14668
|
-
// ../
|
|
14660
|
+
// ../tables/src/parquet/parquetjs/codecs/declare.ts
|
|
14669
14661
|
function reserveParquetByteArrayOutput(output, additionalByteLength) {
|
|
14670
14662
|
const requiredByteLength = output.byteLength + additionalByteLength;
|
|
14671
14663
|
if (requiredByteLength <= output.data.byteLength) return;
|
|
@@ -14681,12 +14673,12 @@ function getParquetValueOutput(options, count) {
|
|
|
14681
14673
|
};
|
|
14682
14674
|
}
|
|
14683
14675
|
var init_declare = __esm({
|
|
14684
|
-
"../
|
|
14676
|
+
"../tables/src/parquet/parquetjs/codecs/declare.ts"() {
|
|
14685
14677
|
"use strict";
|
|
14686
14678
|
}
|
|
14687
14679
|
});
|
|
14688
14680
|
|
|
14689
|
-
// ../
|
|
14681
|
+
// ../tables/src/parquet/parquetjs/codecs/plain.ts
|
|
14690
14682
|
function encodeValues(type, values, opts = {}) {
|
|
14691
14683
|
switch (type) {
|
|
14692
14684
|
case "BOOLEAN":
|
|
@@ -15024,7 +15016,7 @@ function toPrimitiveBytes(value) {
|
|
|
15024
15016
|
}
|
|
15025
15017
|
var JULIAN_DAY_UNIX_EPOCH, NANOSECONDS_PER_DAY, INT64_MIN, INT64_MAX, IS_LITTLE_ENDIAN, MAXIMUM_INLINE_BYTE_COPY_LENGTH;
|
|
15026
15018
|
var init_plain = __esm({
|
|
15027
|
-
"../
|
|
15019
|
+
"../tables/src/parquet/parquetjs/codecs/plain.ts"() {
|
|
15028
15020
|
"use strict";
|
|
15029
15021
|
init_declare();
|
|
15030
15022
|
init_binary_utils();
|
|
@@ -15037,7 +15029,7 @@ var init_plain = __esm({
|
|
|
15037
15029
|
}
|
|
15038
15030
|
});
|
|
15039
15031
|
|
|
15040
|
-
// ../
|
|
15032
|
+
// ../tables/src/parquet/parquetjs/codecs/rle.ts
|
|
15041
15033
|
function encodeValues2(type, values, opts) {
|
|
15042
15034
|
if (!("bitWidth" in opts)) {
|
|
15043
15035
|
throw new Error("bitWidth is required");
|
|
@@ -15749,14 +15741,14 @@ function encodeRunRepeated(value, count, opts) {
|
|
|
15749
15741
|
return concatUint8Arrays([encodeUnsignedVarIntNumber(count << 1), buf]);
|
|
15750
15742
|
}
|
|
15751
15743
|
var init_rle = __esm({
|
|
15752
|
-
"../
|
|
15744
|
+
"../tables/src/parquet/parquetjs/codecs/rle.ts"() {
|
|
15753
15745
|
"use strict";
|
|
15754
15746
|
init_declare();
|
|
15755
15747
|
init_binary_utils();
|
|
15756
15748
|
}
|
|
15757
15749
|
});
|
|
15758
15750
|
|
|
15759
|
-
// ../
|
|
15751
|
+
// ../tables/src/parquet/parquetjs/codecs/dictionary.ts
|
|
15760
15752
|
function decodeValues3(type, cursor, count, opts) {
|
|
15761
15753
|
const bitWidth = cursor.buffer[cursor.offset];
|
|
15762
15754
|
cursor.offset += 1;
|
|
@@ -15776,14 +15768,14 @@ function encodeValues3(_type, values, options) {
|
|
|
15776
15768
|
return output;
|
|
15777
15769
|
}
|
|
15778
15770
|
var init_dictionary = __esm({
|
|
15779
|
-
"../
|
|
15771
|
+
"../tables/src/parquet/parquetjs/codecs/dictionary.ts"() {
|
|
15780
15772
|
"use strict";
|
|
15781
15773
|
init_rle();
|
|
15782
15774
|
init_rle();
|
|
15783
15775
|
}
|
|
15784
15776
|
});
|
|
15785
15777
|
|
|
15786
|
-
// ../
|
|
15778
|
+
// ../tables/src/parquet/parquetjs/codecs/delta.ts
|
|
15787
15779
|
function encodeDeltaBinaryPackedValues(type, values, _options) {
|
|
15788
15780
|
if (type !== "INT32" && type !== "INT64") {
|
|
15789
15781
|
throw new Error(`DELTA_BINARY_PACKED does not support Parquet type ${type}`);
|
|
@@ -16584,7 +16576,7 @@ function assertReadable2(cursor, byteLength) {
|
|
|
16584
16576
|
}
|
|
16585
16577
|
var DELTA_BLOCK_SIZE, DELTA_MINI_BLOCK_COUNT, DELTA_VALUES_PER_MINI_BLOCK, UINT32_BASE, IS_LITTLE_ENDIAN2;
|
|
16586
16578
|
var init_delta = __esm({
|
|
16587
|
-
"../
|
|
16579
|
+
"../tables/src/parquet/parquetjs/codecs/delta.ts"() {
|
|
16588
16580
|
"use strict";
|
|
16589
16581
|
init_binary_utils();
|
|
16590
16582
|
init_declare();
|
|
@@ -16596,7 +16588,7 @@ var init_delta = __esm({
|
|
|
16596
16588
|
}
|
|
16597
16589
|
});
|
|
16598
16590
|
|
|
16599
|
-
// ../
|
|
16591
|
+
// ../tables/src/parquet/parquetjs/codecs/byte-stream-split.ts
|
|
16600
16592
|
function isByteStreamSplitType(type) {
|
|
16601
16593
|
return BYTE_STREAM_SPLIT_TYPES.has(type);
|
|
16602
16594
|
}
|
|
@@ -16749,7 +16741,7 @@ function getDirectOutputBytes(type, output, outputOffset, count, int64AsBigInt)
|
|
|
16749
16741
|
}
|
|
16750
16742
|
var BYTE_STREAM_SPLIT_TYPES, IS_LITTLE_ENDIAN3;
|
|
16751
16743
|
var init_byte_stream_split = __esm({
|
|
16752
|
-
"../
|
|
16744
|
+
"../tables/src/parquet/parquetjs/codecs/byte-stream-split.ts"() {
|
|
16753
16745
|
"use strict";
|
|
16754
16746
|
init_binary_utils();
|
|
16755
16747
|
init_declare();
|
|
@@ -16764,10 +16756,10 @@ var init_byte_stream_split = __esm({
|
|
|
16764
16756
|
}
|
|
16765
16757
|
});
|
|
16766
16758
|
|
|
16767
|
-
// ../
|
|
16759
|
+
// ../tables/src/parquet/parquetjs/codecs/index.ts
|
|
16768
16760
|
var PARQUET_CODECS;
|
|
16769
16761
|
var init_codecs = __esm({
|
|
16770
|
-
"../
|
|
16762
|
+
"../tables/src/parquet/parquetjs/codecs/index.ts"() {
|
|
16771
16763
|
"use strict";
|
|
16772
16764
|
init_plain();
|
|
16773
16765
|
init_rle();
|
|
@@ -16819,7 +16811,7 @@ var init_codecs = __esm({
|
|
|
16819
16811
|
}
|
|
16820
16812
|
});
|
|
16821
16813
|
|
|
16822
|
-
// ../
|
|
16814
|
+
// ../tables/src/parquet/parquetjs/schema/variant.ts
|
|
16823
16815
|
function decodeVariant(metadataInput, valueInput) {
|
|
16824
16816
|
const metadata = toUint8Array2(metadataInput);
|
|
16825
16817
|
const value = toUint8Array2(valueInput);
|
|
@@ -17058,14 +17050,14 @@ function checkedEnd(offset, endOffset) {
|
|
|
17058
17050
|
}
|
|
17059
17051
|
var MAXIMUM_VARIANT_NESTING;
|
|
17060
17052
|
var init_variant = __esm({
|
|
17061
|
-
"../
|
|
17053
|
+
"../tables/src/parquet/parquetjs/schema/variant.ts"() {
|
|
17062
17054
|
"use strict";
|
|
17063
17055
|
init_binary_utils();
|
|
17064
17056
|
MAXIMUM_VARIANT_NESTING = 1024;
|
|
17065
17057
|
}
|
|
17066
17058
|
});
|
|
17067
17059
|
|
|
17068
|
-
// ../
|
|
17060
|
+
// ../tables/src/parquet/parquetjs/schema/shred.ts
|
|
17069
17061
|
function shredBuffer(schema) {
|
|
17070
17062
|
const columnData = {};
|
|
17071
17063
|
for (const field of schema.fieldList) {
|
|
@@ -17511,7 +17503,7 @@ function getDecodedColumnValue(columnData, valueIndex) {
|
|
|
17511
17503
|
}
|
|
17512
17504
|
var VARIANT_TYPED_VALUE_FIELD_NAMES;
|
|
17513
17505
|
var init_shred = __esm({
|
|
17514
|
-
"../
|
|
17506
|
+
"../tables/src/parquet/parquetjs/schema/shred.ts"() {
|
|
17515
17507
|
"use strict";
|
|
17516
17508
|
init_types();
|
|
17517
17509
|
init_variant();
|
|
@@ -17544,7 +17536,7 @@ var init_shred = __esm({
|
|
|
17544
17536
|
}
|
|
17545
17537
|
});
|
|
17546
17538
|
|
|
17547
|
-
// ../
|
|
17539
|
+
// ../tables/src/parquet/parquetjs/schema/schema.ts
|
|
17548
17540
|
function setCompress(schema, type) {
|
|
17549
17541
|
for (const name in schema) {
|
|
17550
17542
|
const node = schema[name];
|
|
@@ -17642,8 +17634,8 @@ function listFields(fields) {
|
|
|
17642
17634
|
return list;
|
|
17643
17635
|
}
|
|
17644
17636
|
var ParquetSchema;
|
|
17645
|
-
var
|
|
17646
|
-
"../
|
|
17637
|
+
var init_schema2 = __esm({
|
|
17638
|
+
"../tables/src/parquet/parquetjs/schema/schema.ts"() {
|
|
17647
17639
|
"use strict";
|
|
17648
17640
|
init_codecs();
|
|
17649
17641
|
init_byte_stream_split();
|
|
@@ -17723,10 +17715,10 @@ var init_schema = __esm({
|
|
|
17723
17715
|
}
|
|
17724
17716
|
});
|
|
17725
17717
|
|
|
17726
|
-
// ../
|
|
17718
|
+
// ../tables/src/parquet/lib/constants.ts
|
|
17727
17719
|
var PARQUET_MAGIC, PARQUET_MAGIC_ENCRYPTED, PARQUET_RDLVL_TYPE, PARQUET_RDLVL_ENCODING;
|
|
17728
17720
|
var init_constants = __esm({
|
|
17729
|
-
"../
|
|
17721
|
+
"../tables/src/parquet/lib/constants.ts"() {
|
|
17730
17722
|
"use strict";
|
|
17731
17723
|
PARQUET_MAGIC = "PAR1";
|
|
17732
17724
|
PARQUET_MAGIC_ENCRYPTED = "PARE";
|
|
@@ -17735,7 +17727,7 @@ var init_constants = __esm({
|
|
|
17735
17727
|
}
|
|
17736
17728
|
});
|
|
17737
17729
|
|
|
17738
|
-
// ../
|
|
17730
|
+
// ../tables/src/parquet/parquetjs/utils/read-utils.ts
|
|
17739
17731
|
function serializeThrift(obj) {
|
|
17740
17732
|
const protocol = new Uint8ArrayCompactProtocolWriter();
|
|
17741
17733
|
obj.write(protocol);
|
|
@@ -17819,7 +17811,7 @@ function fieldIndexOf(arr, elem) {
|
|
|
17819
17811
|
return -1;
|
|
17820
17812
|
}
|
|
17821
17813
|
var init_read_utils = __esm({
|
|
17822
|
-
"../
|
|
17814
|
+
"../tables/src/parquet/parquetjs/utils/read-utils.ts"() {
|
|
17823
17815
|
"use strict";
|
|
17824
17816
|
init_parquet_thrift();
|
|
17825
17817
|
init_uint8_array_compact_protocol();
|
|
@@ -17828,7 +17820,7 @@ var init_read_utils = __esm({
|
|
|
17828
17820
|
}
|
|
17829
17821
|
});
|
|
17830
17822
|
|
|
17831
|
-
// ../
|
|
17823
|
+
// ../tables/src/parquet/parquetjs/utils/crc32.ts
|
|
17832
17824
|
function crc322(bytes) {
|
|
17833
17825
|
let checksum = 4294967295;
|
|
17834
17826
|
for (const byte of bytes) {
|
|
@@ -17840,12 +17832,12 @@ function crc322(bytes) {
|
|
|
17840
17832
|
return (checksum ^ 4294967295) >>> 0;
|
|
17841
17833
|
}
|
|
17842
17834
|
var init_crc32 = __esm({
|
|
17843
|
-
"../
|
|
17835
|
+
"../tables/src/parquet/parquetjs/utils/crc32.ts"() {
|
|
17844
17836
|
"use strict";
|
|
17845
17837
|
}
|
|
17846
17838
|
});
|
|
17847
17839
|
|
|
17848
|
-
// ../
|
|
17840
|
+
// ../tables/src/parquet/parquetjs/parser/decoders.ts
|
|
17849
17841
|
async function decodeDataPages(buffer, context) {
|
|
17850
17842
|
var _a, _b;
|
|
17851
17843
|
const cursor = {
|
|
@@ -18705,7 +18697,7 @@ function decodeDictionaryValues(dictionaryCursor, pageHeader, context) {
|
|
|
18705
18697
|
}
|
|
18706
18698
|
var EMPTY_PARQUET_LEVEL_BUFFER;
|
|
18707
18699
|
var init_decoders = __esm({
|
|
18708
|
-
"../
|
|
18700
|
+
"../tables/src/parquet/parquetjs/parser/decoders.ts"() {
|
|
18709
18701
|
"use strict";
|
|
18710
18702
|
init_codecs();
|
|
18711
18703
|
init_parquet_thrift();
|
|
@@ -18717,7 +18709,7 @@ var init_decoders = __esm({
|
|
|
18717
18709
|
}
|
|
18718
18710
|
});
|
|
18719
18711
|
|
|
18720
|
-
// ../
|
|
18712
|
+
// ../tables/src/parquet/parquetjs/parser/encoded-pages.ts
|
|
18721
18713
|
async function scanParquetEncodedPages(buffer, context) {
|
|
18722
18714
|
const pages = [];
|
|
18723
18715
|
let offset = 0;
|
|
@@ -18903,7 +18895,7 @@ function verifyEncodedPageChecksum(compressedBody, pageHeader, verifyPageChecksu
|
|
|
18903
18895
|
}
|
|
18904
18896
|
}
|
|
18905
18897
|
var init_encoded_pages = __esm({
|
|
18906
|
-
"../
|
|
18898
|
+
"../tables/src/parquet/parquetjs/parser/encoded-pages.ts"() {
|
|
18907
18899
|
"use strict";
|
|
18908
18900
|
init_parquet_thrift();
|
|
18909
18901
|
init_crc32();
|
|
@@ -18912,7 +18904,7 @@ var init_encoded_pages = __esm({
|
|
|
18912
18904
|
}
|
|
18913
18905
|
});
|
|
18914
18906
|
|
|
18915
|
-
// ../
|
|
18907
|
+
// ../tables/src/parquet/lib/parquet-encryption.ts
|
|
18916
18908
|
function readParquetEncryptedModule(buffer, offset = 0) {
|
|
18917
18909
|
if (offset + 4 > buffer.length) {
|
|
18918
18910
|
throw new Error("Invalid encrypted Parquet module: missing module length");
|
|
@@ -19049,12 +19041,12 @@ function toUint8Array3(value) {
|
|
|
19049
19041
|
return value instanceof ArrayBuffer ? new Uint8Array(value) : new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
|
|
19050
19042
|
}
|
|
19051
19043
|
var init_parquet_encryption = __esm({
|
|
19052
|
-
"../
|
|
19044
|
+
"../tables/src/parquet/lib/parquet-encryption.ts"() {
|
|
19053
19045
|
"use strict";
|
|
19054
19046
|
}
|
|
19055
19047
|
});
|
|
19056
19048
|
|
|
19057
|
-
// ../
|
|
19049
|
+
// ../tables/src/parquet/parquetjs/parser/parquet-reader.ts
|
|
19058
19050
|
function hasOnlyArrowByteArrayDataPageEncodings(encodings, dictionaryPageOffset) {
|
|
19059
19051
|
if (dictionaryPageOffset !== void 0 || encodings.length === 0) {
|
|
19060
19052
|
return false;
|
|
@@ -19150,9 +19142,9 @@ function countDefinedValues(definitionLevels, definitionLevelMaximum, start, end
|
|
|
19150
19142
|
}
|
|
19151
19143
|
var MAXIMUM_CONCURRENT_COLUMN_READS, ParquetReader;
|
|
19152
19144
|
var init_parquet_reader = __esm({
|
|
19153
|
-
"../
|
|
19145
|
+
"../tables/src/parquet/parquetjs/parser/parquet-reader.ts"() {
|
|
19154
19146
|
"use strict";
|
|
19155
|
-
|
|
19147
|
+
init_schema2();
|
|
19156
19148
|
init_decoders();
|
|
19157
19149
|
init_encoded_pages();
|
|
19158
19150
|
init_shred();
|
|
@@ -20169,7 +20161,7 @@ var init_parquet_reader = __esm({
|
|
|
20169
20161
|
}
|
|
20170
20162
|
});
|
|
20171
20163
|
|
|
20172
|
-
// ../
|
|
20164
|
+
// ../tables/src/parquet/parquet-source-loader.ts
|
|
20173
20165
|
var parquet_source_loader_exports = {};
|
|
20174
20166
|
__export(parquet_source_loader_exports, {
|
|
20175
20167
|
PARQUET_SOURCE_CAPABILITIES: () => PARQUET_SOURCE_CAPABILITIES,
|
|
@@ -20803,12 +20795,13 @@ function hasObjectVersion(version2) {
|
|
|
20803
20795
|
}
|
|
20804
20796
|
var _preloadParquetSourceLoader, _createMetadataDataSource, ParquetSourceLoaderBase, ParquetSourceLoaderWithParser, ParquetSource;
|
|
20805
20797
|
var init_parquet_source_loader = __esm({
|
|
20806
|
-
"../
|
|
20798
|
+
"../tables/src/parquet/parquet-source-loader.ts"() {
|
|
20807
20799
|
"use strict";
|
|
20808
|
-
|
|
20809
|
-
|
|
20810
|
-
|
|
20811
|
-
|
|
20800
|
+
init_arrow_transport();
|
|
20801
|
+
init_indexed_arrow_table();
|
|
20802
|
+
init_loader_utils();
|
|
20803
|
+
init_schema_utils();
|
|
20804
|
+
init_schema();
|
|
20812
20805
|
init_get_parquet_schema();
|
|
20813
20806
|
init_geoparquet_covering();
|
|
20814
20807
|
init_parquet_bloom_filter();
|
|
@@ -21819,15 +21812,15 @@ __export(iceberg_exports, {
|
|
|
21819
21812
|
});
|
|
21820
21813
|
module.exports = __toCommonJS(iceberg_exports);
|
|
21821
21814
|
|
|
21822
|
-
// ../
|
|
21823
|
-
|
|
21815
|
+
// ../tables/src/parquet/iceberg-table-source.ts
|
|
21816
|
+
init_loader_utils();
|
|
21824
21817
|
var arrow10 = __toESM(require("apache-arrow"), 1);
|
|
21825
21818
|
|
|
21826
|
-
// ../
|
|
21819
|
+
// ../tables/src/avro/lib/parsers/parse-avro.ts
|
|
21827
21820
|
var arrow = __toESM(require("apache-arrow"), 1);
|
|
21828
21821
|
|
|
21829
|
-
// ../
|
|
21830
|
-
|
|
21822
|
+
// ../tables/src/avro/avro-compression.ts
|
|
21823
|
+
init_src();
|
|
21831
21824
|
function toUint8Array(binary) {
|
|
21832
21825
|
if (binary instanceof Uint8Array) return binary;
|
|
21833
21826
|
if (ArrayBuffer.isView(binary))
|
|
@@ -21877,7 +21870,7 @@ function crc32(bytes) {
|
|
|
21877
21870
|
return checksum ^ 4294967295;
|
|
21878
21871
|
}
|
|
21879
21872
|
|
|
21880
|
-
// ../
|
|
21873
|
+
// ../tables/src/avro/lib/parsers/parse-avro.ts
|
|
21881
21874
|
var MAGIC = [79, 98, 106, 1];
|
|
21882
21875
|
async function parseAvro(arrayBuffer, options) {
|
|
21883
21876
|
const bytes = new Uint8Array(arrayBuffer);
|
|
@@ -22493,8 +22486,8 @@ function decodeSignedBytes(bytes) {
|
|
|
22493
22486
|
return value & signBit ? value - (signBit << 1n) : value;
|
|
22494
22487
|
}
|
|
22495
22488
|
|
|
22496
|
-
// ../
|
|
22497
|
-
|
|
22489
|
+
// ../tables/src/parquet/parquet-dataset-source.ts
|
|
22490
|
+
init_loader_utils();
|
|
22498
22491
|
init_parquet_source_loader();
|
|
22499
22492
|
init_slice_parquet_batch();
|
|
22500
22493
|
init_parquet_source_capabilities();
|
|
@@ -23085,7 +23078,7 @@ function createParquetDatasetScanExecutionTelemetry(before, after, startedAt, st
|
|
|
23085
23078
|
});
|
|
23086
23079
|
}
|
|
23087
23080
|
|
|
23088
|
-
// ../
|
|
23081
|
+
// ../tables/src/parquet/iceberg-table-source.ts
|
|
23089
23082
|
init_parquet_source_capabilities();
|
|
23090
23083
|
var IcebergTableSource = class extends DataSource {
|
|
23091
23084
|
metadataPromise = null;
|
|
@@ -23820,7 +23813,7 @@ function combineAbortSignals(signal, closeSignal, controller) {
|
|
|
23820
23813
|
};
|
|
23821
23814
|
}
|
|
23822
23815
|
|
|
23823
|
-
// ../
|
|
23816
|
+
// ../tables/src/parquet/iceberg-rest-catalog.ts
|
|
23824
23817
|
var IcebergRestCatalog = class {
|
|
23825
23818
|
options;
|
|
23826
23819
|
constructor(options) {
|