@loaders.gl/core 5.0.0 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.cjs +4129 -0
- package/dist/api.cjs.map +6 -0
- package/dist/api.d.ts +34 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +50 -0
- package/dist/api.js.map +1 -0
- package/dist/arrow-geometry/index.cjs +5 -2
- package/dist/arrow-geometry/index.cjs.map +2 -2
- package/dist/arrow-geometry/index.d.ts +1 -0
- package/dist/arrow-geometry/index.d.ts.map +1 -1
- package/dist/arrow-geometry/index.js +1 -0
- package/dist/arrow-geometry/index.js.map +1 -1
- package/dist/arrow-geometry/triangulate-wkb-geometry-column.cjs +100 -0
- package/dist/arrow-geometry/triangulate-wkb-geometry-column.cjs.map +7 -0
- package/dist/arrow-geometry/triangulate-wkb-geometry-column.d.ts +15 -0
- package/dist/arrow-geometry/triangulate-wkb-geometry-column.d.ts.map +1 -0
- package/dist/arrow-geometry/triangulate-wkb-geometry-column.js +87 -0
- package/dist/arrow-geometry/triangulate-wkb-geometry-column.js.map +1 -0
- package/dist/dist.dev.js +458 -539
- package/dist/dist.min.js +3 -3
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts.map +1 -1
- package/dist/geoarrow/index.cjs +1 -1
- package/dist/geoarrow/index.cjs.map +1 -1
- package/dist/geoarrow/index.d.ts +2 -2
- package/dist/geoarrow/index.d.ts.map +1 -1
- package/dist/geoarrow/index.js +1 -1
- package/dist/geoarrow/index.js.map +1 -1
- package/dist/geoarrow/lib/kernels/decode-wkt-native.cjs +1 -1
- package/dist/geoarrow/lib/kernels/decode-wkt-native.cjs.map +1 -1
- package/dist/geoarrow/lib/kernels/decode-wkt-native.d.ts +1 -1
- package/dist/geoarrow/lib/kernels/decode-wkt-native.d.ts.map +1 -1
- package/dist/geoarrow/lib/kernels/decode-wkt-native.js +1 -1
- package/dist/geoarrow/lib/kernels/decode-wkt-native.js.map +1 -1
- package/dist/index.cjs +67 -4114
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +1 -33
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -46
- package/dist/index.js.map +1 -1
- package/dist/lib/api/encode-table.d.ts +4 -4
- package/dist/lib/api/encode-table.d.ts.map +1 -1
- package/dist/lib/api/encode-table.js +21 -3
- package/dist/lib/api/encode-table.js.map +1 -1
- package/dist/lib/api/encode.d.ts +6 -6
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +46 -7
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/loader-utils/index.cjs +94 -24
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +3 -2
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +2 -1
- package/dist/loader-utils/index.js.map +1 -1
- package/dist/loader-utils/json-loader-metadata.cjs +85 -0
- package/dist/loader-utils/json-loader-metadata.cjs.map +6 -0
- package/dist/loader-utils/json-loader-metadata.d.ts +51 -0
- package/dist/loader-utils/json-loader-metadata.d.ts.map +1 -0
- package/dist/loader-utils/json-loader-metadata.js +31 -0
- package/dist/loader-utils/json-loader-metadata.js.map +1 -0
- package/dist/loader-utils/json-loader.cjs +80 -0
- package/dist/loader-utils/json-loader.cjs.map +6 -0
- package/dist/loader-utils/json-loader.d.ts +4 -4
- package/dist/loader-utils/json-loader.d.ts.map +1 -1
- package/dist/loader-utils/json-loader.js +3 -17
- package/dist/loader-utils/json-loader.js.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +1 -1
- package/dist/loader-utils/lib/request-utils/authentication.d.ts +2 -0
- package/dist/loader-utils/lib/request-utils/authentication.d.ts.map +1 -1
- package/dist/loader-utils/lib/request-utils/authentication.js +12 -0
- package/dist/loader-utils/lib/request-utils/authentication.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/raster-source.d.ts +21 -1
- package/dist/loader-utils/lib/sources/raster-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/raster-source.js.map +1 -1
- package/dist/loader-utils/lib/sources/raster-tile.d.ts +7 -0
- package/dist/loader-utils/lib/sources/raster-tile.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-tile.js +34 -0
- package/dist/loader-utils/lib/sources/raster-tile.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.d.ts +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.d.ts.map +1 -1
- package/dist/loader-utils/tile-grid.d.ts +2 -1
- package/dist/loader-utils/tile-grid.d.ts.map +1 -1
- package/dist/loader-utils/tile-grid.js +1 -1
- package/dist/loader-utils/tile-grid.js.map +1 -1
- package/dist/loader-utils/writer-types.d.ts +2 -0
- package/dist/loader-utils/writer-types.d.ts.map +1 -1
- package/dist/null-loader-metadata.cjs +89 -0
- package/dist/null-loader-metadata.cjs.map +6 -0
- package/dist/null-loader-metadata.d.ts +48 -0
- package/dist/null-loader-metadata.d.ts.map +1 -0
- package/dist/null-loader-metadata.js +30 -0
- package/dist/null-loader-metadata.js.map +1 -0
- package/dist/null-loader.cjs +84 -0
- package/dist/null-loader.cjs.map +6 -0
- package/dist/null-loader.d.ts +6 -6
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +2 -15
- package/dist/null-loader.js.map +1 -1
- package/dist/null-worker-node.js +58 -28
- package/dist/null-worker.js +58 -28
- package/dist/scan/arrow-execution/expressions.d.ts +1 -1
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -1
- package/dist/scan/arrow-query.cjs +2 -0
- package/dist/scan/arrow-query.cjs.map +2 -2
- package/dist/scan/arrow-query.d.ts +1 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/arrow-query.js +1 -1
- package/dist/scan/arrow-query.js.map +1 -1
- package/dist/scan/index.cjs +16 -22
- package/dist/scan/index.cjs.map +2 -2
- package/dist/scan/index.d.ts +7 -7
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +4 -6
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/plan-arrow-table-query.d.ts +1 -1
- package/dist/scan/plan-arrow-table-query.d.ts.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +7 -19
- package/dist/scan/query-arrow-table-in-batches.cjs.map +2 -2
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.js +7 -22
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -1
- package/dist/scan/query-executor.cjs +202 -0
- package/dist/scan/query-executor.cjs.map +7 -0
- package/dist/scan/query-executor.d.ts +27 -0
- package/dist/scan/query-executor.d.ts.map +1 -0
- package/dist/scan/query-executor.js +203 -0
- package/dist/scan/query-executor.js.map +1 -0
- package/dist/scan/query.cjs +92 -205
- package/dist/scan/query.cjs.map +3 -3
- package/dist/scan/query.d.ts +5 -4
- package/dist/scan/query.d.ts.map +1 -1
- package/dist/scan/query.js +94 -238
- package/dist/scan/query.js.map +1 -1
- package/dist/schema-utils/index.cjs +182 -0
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +3 -0
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +3 -0
- package/dist/schema-utils/index.js.map +1 -1
- package/dist/schema-utils/lib/arrow/arrow-converter.d.ts +24 -0
- package/dist/schema-utils/lib/arrow/arrow-converter.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-converter.js +43 -0
- package/dist/schema-utils/lib/arrow/arrow-converter.js.map +1 -0
- package/dist/schema-utils/lib/arrow/convert-arrow-variable-width.d.ts +29 -0
- package/dist/schema-utils/lib/arrow/convert-arrow-variable-width.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/convert-arrow-variable-width.js +89 -0
- package/dist/schema-utils/lib/arrow/convert-arrow-variable-width.js.map +1 -0
- package/dist/schema-utils/lib/arrow/convert-arrow.d.ts +17 -0
- package/dist/schema-utils/lib/arrow/convert-arrow.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/convert-arrow.js +24 -0
- package/dist/schema-utils/lib/arrow/convert-arrow.js.map +1 -0
- package/dist/schema-utils/lib/arrow/tighten-arrow-table-schema-nullability.d.ts +4 -0
- package/dist/schema-utils/lib/arrow/tighten-arrow-table-schema-nullability.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/tighten-arrow-table-schema-nullability.js +51 -0
- package/dist/schema-utils/lib/arrow/tighten-arrow-table-schema-nullability.js.map +1 -0
- package/dist/worker-utils/index.cjs +2 -2
- package/dist/worker-utils/lib/env-utils/version.js +1 -1
- package/package.json +49 -23
- package/src/api.ts +99 -0
- package/src/arrow-geometry/index.ts +5 -0
- package/src/arrow-geometry/triangulate-wkb-geometry-column.ts +122 -0
- package/src/geoarrow/index.ts +2 -2
- package/src/geoarrow/lib/kernels/decode-wkt-native.ts +1 -1
- package/src/index.ts +2 -94
- package/src/lib/api/encode-table.ts +31 -6
- package/src/lib/api/encode.ts +61 -11
- package/src/loader-utils/index.ts +3 -0
- package/src/loader-utils/json-loader-metadata.ts +35 -0
- package/src/loader-utils/json-loader.ts +3 -18
- package/src/loader-utils/lib/request-utils/authentication.ts +17 -0
- package/src/loader-utils/lib/sources/raster-source.ts +22 -1
- package/src/loader-utils/lib/sources/raster-tile.ts +46 -0
- package/src/loader-utils/tile-grid.ts +16 -1
- package/src/loader-utils/writer-types.ts +2 -0
- package/src/null-loader-metadata.ts +32 -0
- package/src/null-loader.ts +2 -17
- package/src/scan/arrow-query.ts +1 -1
- package/src/scan/index.ts +24 -13
- package/src/scan/query-arrow-table-in-batches.ts +7 -24
- package/src/scan/query-executor.ts +286 -0
- package/src/scan/query.ts +112 -299
- package/src/schema-utils/index.ts +14 -0
- package/src/schema-utils/lib/arrow/arrow-converter.ts +74 -0
- package/src/schema-utils/lib/arrow/convert-arrow-variable-width.ts +121 -0
- package/src/schema-utils/lib/arrow/convert-arrow.ts +52 -0
- package/src/schema-utils/lib/arrow/tighten-arrow-table-schema-nullability.ts +83 -0
- package/dist/cluster-source.cjs +0 -6360
- package/dist/cluster-source.cjs.map +0 -6
- package/dist/cluster-source.d.ts +0 -2
- package/dist/cluster-source.d.ts.map +0 -1
- package/dist/cluster-source.js +0 -2
- package/dist/cluster-source.js.map +0 -1
- package/dist/federated-table-scan-source.cjs +0 -1905
- package/dist/federated-table-scan-source.cjs.map +0 -6
- package/dist/federated-table-scan-source.d.ts +0 -2
- package/dist/federated-table-scan-source.d.ts.map +0 -1
- package/dist/federated-table-scan-source.js +0 -2
- package/dist/federated-table-scan-source.js.map +0 -1
- package/dist/geoarrow/geoarrow-builder.cjs +0 -31
- package/dist/geoarrow/geoarrow-builder.cjs.map +0 -7
- package/dist/geoarrow/geoarrow-builder.d.ts +0 -3
- package/dist/geoarrow/geoarrow-builder.d.ts.map +0 -1
- package/dist/geoarrow/geoarrow-builder.js +0 -5
- package/dist/geoarrow/geoarrow-builder.js.map +0 -1
- package/dist/vector-table-scan-source.cjs +0 -1200
- package/dist/vector-table-scan-source.cjs.map +0 -6
- package/dist/vector-table-scan-source.d.ts +0 -2
- package/dist/vector-table-scan-source.d.ts.map +0 -1
- package/dist/vector-table-scan-source.js +0 -2
- package/dist/vector-table-scan-source.js.map +0 -1
- package/src/cluster-source.ts +0 -1
- package/src/federated-table-scan-source.ts +0 -1
- package/src/geoarrow/geoarrow-builder.ts +0 -21
- package/src/vector-table-scan-source.ts +0 -1
package/dist/null-worker-node.js
CHANGED
|
@@ -76,6 +76,62 @@ var init_worker_threads = __esm({
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
+
// src/null-loader-metadata.ts
|
|
80
|
+
var VERSION, NullLoaderMetadata, NullLoader;
|
|
81
|
+
var init_null_loader_metadata = __esm({
|
|
82
|
+
"src/null-loader-metadata.ts"() {
|
|
83
|
+
"use strict";
|
|
84
|
+
VERSION = true ? "5.0.2" : "latest";
|
|
85
|
+
NullLoaderMetadata = {
|
|
86
|
+
dataType: null,
|
|
87
|
+
batchType: null,
|
|
88
|
+
name: "Null loader",
|
|
89
|
+
id: "null",
|
|
90
|
+
module: "core",
|
|
91
|
+
version: VERSION,
|
|
92
|
+
mimeTypes: ["application/x.empty"],
|
|
93
|
+
extensions: ["null"],
|
|
94
|
+
tests: [() => false],
|
|
95
|
+
options: {
|
|
96
|
+
null: {}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
NullLoader = {
|
|
100
|
+
...NullLoaderMetadata,
|
|
101
|
+
async preload() {
|
|
102
|
+
const implementation = await Promise.resolve().then(() => (init_null_loader(), null_loader_exports));
|
|
103
|
+
return implementation.NullLoader;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// src/null-loader.ts
|
|
110
|
+
var null_loader_exports = {};
|
|
111
|
+
__export(null_loader_exports, {
|
|
112
|
+
NullLoader: () => NullLoader2
|
|
113
|
+
});
|
|
114
|
+
function parseSync(arrayBuffer, options, context) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
var NullLoader2;
|
|
118
|
+
var init_null_loader = __esm({
|
|
119
|
+
"src/null-loader.ts"() {
|
|
120
|
+
"use strict";
|
|
121
|
+
init_null_loader_metadata();
|
|
122
|
+
NullLoader2 = {
|
|
123
|
+
...NullLoaderMetadata,
|
|
124
|
+
parse: async (arrayBuffer, options, context) => parseSync(arrayBuffer, options || {}, context),
|
|
125
|
+
parseSync,
|
|
126
|
+
parseInBatches: async function* generator(asyncIterator, options, context) {
|
|
127
|
+
for await (const batch of asyncIterator) {
|
|
128
|
+
yield parseSync(batch, options, context);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
79
135
|
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/node/worker_threads.js
|
|
80
136
|
var import_worker_threads = require("worker_threads");
|
|
81
137
|
var parentPort = import_worker_threads.parentPort;
|
|
@@ -1194,32 +1250,6 @@ function getWorkerLoaderOptions(loader, options) {
|
|
|
1194
1250
|
};
|
|
1195
1251
|
}
|
|
1196
1252
|
|
|
1197
|
-
// src/null-loader.ts
|
|
1198
|
-
var VERSION = true ? "5.0.0" : "latest";
|
|
1199
|
-
var NullLoader = {
|
|
1200
|
-
dataType: null,
|
|
1201
|
-
batchType: null,
|
|
1202
|
-
name: "Null loader",
|
|
1203
|
-
id: "null",
|
|
1204
|
-
module: "core",
|
|
1205
|
-
version: VERSION,
|
|
1206
|
-
mimeTypes: ["application/x.empty"],
|
|
1207
|
-
extensions: ["null"],
|
|
1208
|
-
parse: async (arrayBuffer, options, context) => parseSync(arrayBuffer, options || {}, context),
|
|
1209
|
-
parseSync,
|
|
1210
|
-
parseInBatches: async function* generator(asyncIterator, options, context) {
|
|
1211
|
-
for await (const batch of asyncIterator) {
|
|
1212
|
-
yield parseSync(batch, options, context);
|
|
1213
|
-
}
|
|
1214
|
-
},
|
|
1215
|
-
tests: [() => false],
|
|
1216
|
-
options: {
|
|
1217
|
-
null: {}
|
|
1218
|
-
}
|
|
1219
|
-
};
|
|
1220
|
-
function parseSync(arrayBuffer, options, context) {
|
|
1221
|
-
return null;
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
1253
|
// src/workers/null-worker.ts
|
|
1225
|
-
|
|
1254
|
+
init_null_loader();
|
|
1255
|
+
createLoaderWorker(NullLoader2);
|
package/dist/null-worker.js
CHANGED
|
@@ -42,6 +42,62 @@
|
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
+
// src/null-loader-metadata.ts
|
|
46
|
+
var VERSION, NullLoaderMetadata, NullLoader;
|
|
47
|
+
var init_null_loader_metadata = __esm({
|
|
48
|
+
"src/null-loader-metadata.ts"() {
|
|
49
|
+
"use strict";
|
|
50
|
+
VERSION = true ? "5.0.2" : "latest";
|
|
51
|
+
NullLoaderMetadata = {
|
|
52
|
+
dataType: null,
|
|
53
|
+
batchType: null,
|
|
54
|
+
name: "Null loader",
|
|
55
|
+
id: "null",
|
|
56
|
+
module: "core",
|
|
57
|
+
version: VERSION,
|
|
58
|
+
mimeTypes: ["application/x.empty"],
|
|
59
|
+
extensions: ["null"],
|
|
60
|
+
tests: [() => false],
|
|
61
|
+
options: {
|
|
62
|
+
null: {}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
NullLoader = {
|
|
66
|
+
...NullLoaderMetadata,
|
|
67
|
+
async preload() {
|
|
68
|
+
const implementation = await Promise.resolve().then(() => (init_null_loader(), null_loader_exports));
|
|
69
|
+
return implementation.NullLoader;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// src/null-loader.ts
|
|
76
|
+
var null_loader_exports = {};
|
|
77
|
+
__export(null_loader_exports, {
|
|
78
|
+
NullLoader: () => NullLoader2
|
|
79
|
+
});
|
|
80
|
+
function parseSync(arrayBuffer, options, context) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
var NullLoader2;
|
|
84
|
+
var init_null_loader = __esm({
|
|
85
|
+
"src/null-loader.ts"() {
|
|
86
|
+
"use strict";
|
|
87
|
+
init_null_loader_metadata();
|
|
88
|
+
NullLoader2 = {
|
|
89
|
+
...NullLoaderMetadata,
|
|
90
|
+
parse: async (arrayBuffer, options, context) => parseSync(arrayBuffer, options || {}, context),
|
|
91
|
+
parseSync,
|
|
92
|
+
parseInBatches: async function* generator(asyncIterator, options, context) {
|
|
93
|
+
for await (const batch of asyncIterator) {
|
|
94
|
+
yield parseSync(batch, options, context);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
45
101
|
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/node/worker_threads-browser.js
|
|
46
102
|
var parentPort = globalThis.process?.getBuiltinModule?.("node:worker_threads")?.parentPort ?? null;
|
|
47
103
|
|
|
@@ -1142,33 +1198,7 @@
|
|
|
1142
1198
|
};
|
|
1143
1199
|
}
|
|
1144
1200
|
|
|
1145
|
-
// src/null-loader.ts
|
|
1146
|
-
var VERSION = true ? "5.0.0" : "latest";
|
|
1147
|
-
var NullLoader = {
|
|
1148
|
-
dataType: null,
|
|
1149
|
-
batchType: null,
|
|
1150
|
-
name: "Null loader",
|
|
1151
|
-
id: "null",
|
|
1152
|
-
module: "core",
|
|
1153
|
-
version: VERSION,
|
|
1154
|
-
mimeTypes: ["application/x.empty"],
|
|
1155
|
-
extensions: ["null"],
|
|
1156
|
-
parse: async (arrayBuffer, options, context) => parseSync(arrayBuffer, options || {}, context),
|
|
1157
|
-
parseSync,
|
|
1158
|
-
parseInBatches: async function* generator(asyncIterator, options, context) {
|
|
1159
|
-
for await (const batch of asyncIterator) {
|
|
1160
|
-
yield parseSync(batch, options, context);
|
|
1161
|
-
}
|
|
1162
|
-
},
|
|
1163
|
-
tests: [() => false],
|
|
1164
|
-
options: {
|
|
1165
|
-
null: {}
|
|
1166
|
-
}
|
|
1167
|
-
};
|
|
1168
|
-
function parseSync(arrayBuffer, options, context) {
|
|
1169
|
-
return null;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
1201
|
// src/workers/null-worker.ts
|
|
1173
|
-
|
|
1202
|
+
init_null_loader();
|
|
1203
|
+
createLoaderWorker(NullLoader2);
|
|
1174
1204
|
})();
|
|
@@ -2,5 +2,5 @@ export { compileArrowExpression, compileArrowPredicate } from '@math.gl/sql/arro
|
|
|
2
2
|
export { getExpressionColumns, getProjectionColumns } from '@math.gl/sql/expressions';
|
|
3
3
|
export { prepareArrowProjection } from '@math.gl/sql/query';
|
|
4
4
|
/** Converts typed SELECT items into ordinary SQL CAST expressions. */
|
|
5
|
-
export declare function normalizeTypedProjection(query: import(
|
|
5
|
+
export declare function normalizeTypedProjection(query: import("../query.js").TypedTableQuery | import('@math.gl/sql/parser').TableQuery): import('@math.gl/sql/parser').TableQuery;
|
|
6
6
|
//# sourceMappingURL=expressions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expressions.d.ts","sourceRoot":"","sources":["../../../src/scan/arrow-execution/expressions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,sBAAsB,EAAE,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAC,oBAAoB,EAAE,oBAAoB,EAAC,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAC,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAE1D,sEAAsE;AACtE,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"expressions.d.ts","sourceRoot":"","sources":["../../../src/scan/arrow-execution/expressions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,sBAAsB,EAAE,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAC,oBAAoB,EAAE,oBAAoB,EAAC,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAC,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAE1D,sEAAsE;AACtE,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,aAAU,EAAE,eAAe,GAAG,OAAO,qBAAqB,EAAE,UAAU,GACnF,OAAO,qBAAqB,EAAE,UAAU,CAyB1C"}
|
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var arrow_query_exports = {};
|
|
22
22
|
__export(arrow_query_exports, {
|
|
23
23
|
ARROW_TABLE_QUERY_CAPABILITIES: () => import_plan_arrow_table_query.ARROW_TABLE_QUERY_CAPABILITIES,
|
|
24
|
+
explainArrowTableQuery: () => import_plan_arrow_table_query.explainArrowTableQuery,
|
|
24
25
|
getSQLPredicateColumnNames: () => import_table_query.getSQLPredicateColumnNames,
|
|
25
26
|
planTableQuery: () => import_table_query.planTableQuery,
|
|
26
27
|
queryArrowTable: () => import_query_arrow_table.queryArrowTable,
|
|
@@ -34,6 +35,7 @@ var import_table_query = require("./table-query.cjs");
|
|
|
34
35
|
// Annotate the CommonJS export names for ESM import in node:
|
|
35
36
|
0 && (module.exports = {
|
|
36
37
|
ARROW_TABLE_QUERY_CAPABILITIES,
|
|
38
|
+
explainArrowTableQuery,
|
|
37
39
|
getSQLPredicateColumnNames,
|
|
38
40
|
planTableQuery,
|
|
39
41
|
queryArrowTable,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/scan/arrow-query.ts"],
|
|
4
|
-
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport {ARROW_TABLE_QUERY_CAPABILITIES} from './plan-arrow-table-query';\nexport {queryArrowTable} from './query-arrow-table';\nexport {queryArrowTableInBatches} from './query-arrow-table-in-batches';\nexport {getSQLPredicateColumnNames, planTableQuery} from './table-query';\n\nexport type {\n TableQueryFilterStep,\n TableQueryLimitStep,\n TableQuery,\n TableSelection,\n TableQueryExecutionOptions,\n TableQueryOptions,\n TableQueryPlan,\n TableQueryPlanStep,\n TableQueryProjectStep,\n TableQueryScanStep\n} from './table-query';\nexport type {ArrowQueryOptions} from './query-arrow-table';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,
|
|
4
|
+
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport {ARROW_TABLE_QUERY_CAPABILITIES, explainArrowTableQuery} from './plan-arrow-table-query';\nexport {queryArrowTable} from './query-arrow-table';\nexport {queryArrowTableInBatches} from './query-arrow-table-in-batches';\nexport {getSQLPredicateColumnNames, planTableQuery} from './table-query';\n\nexport type {\n TableQueryFilterStep,\n TableQueryLimitStep,\n TableQuery,\n TableSelection,\n TableQueryExecutionOptions,\n TableQueryOptions,\n TableQueryPlan,\n TableQueryPlanStep,\n TableQueryProjectStep,\n TableQueryScanStep\n} from './table-query';\nexport type {ArrowQueryOptions} from './query-arrow-table';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oCAAqE;AACrE,+BAA8B;AAC9B,0CAAuC;AACvC,yBAAyD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ARROW_TABLE_QUERY_CAPABILITIES } from "./plan-arrow-table-query.js";
|
|
1
|
+
export { ARROW_TABLE_QUERY_CAPABILITIES, explainArrowTableQuery } from "./plan-arrow-table-query.js";
|
|
2
2
|
export { queryArrowTable } from "./query-arrow-table.js";
|
|
3
3
|
export { queryArrowTableInBatches } from "./query-arrow-table-in-batches.js";
|
|
4
4
|
export { getSQLPredicateColumnNames, planTableQuery } from "./table-query.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-query.d.ts","sourceRoot":"","sources":["../../src/scan/arrow-query.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,8BAA8B,EAAC,oCAAiC;
|
|
1
|
+
{"version":3,"file":"arrow-query.d.ts","sourceRoot":"","sources":["../../src/scan/arrow-query.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,8BAA8B,EAAE,sBAAsB,EAAC,oCAAiC;AAChG,OAAO,EAAC,eAAe,EAAC,+BAA4B;AACpD,OAAO,EAAC,wBAAwB,EAAC,0CAAuC;AACxE,OAAO,EAAC,0BAA0B,EAAE,cAAc,EAAC,yBAAsB;AAEzE,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,0BAA0B,EAC1B,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EACnB,yBAAsB;AACvB,YAAY,EAAC,iBAAiB,EAAC,+BAA4B"}
|
package/dist/scan/arrow-query.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// loaders.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
-
export { ARROW_TABLE_QUERY_CAPABILITIES } from "./plan-arrow-table-query.js";
|
|
4
|
+
export { ARROW_TABLE_QUERY_CAPABILITIES, explainArrowTableQuery } from "./plan-arrow-table-query.js";
|
|
5
5
|
export { queryArrowTable } from "./query-arrow-table.js";
|
|
6
6
|
export { queryArrowTableInBatches } from "./query-arrow-table-in-batches.js";
|
|
7
7
|
export { getSQLPredicateColumnNames, planTableQuery } from "./table-query.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-query.js","sourceRoot":"","sources":["../../src/scan/arrow-query.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,8BAA8B,EAAC,oCAAiC;
|
|
1
|
+
{"version":3,"file":"arrow-query.js","sourceRoot":"","sources":["../../src/scan/arrow-query.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,8BAA8B,EAAE,sBAAsB,EAAC,oCAAiC;AAChG,OAAO,EAAC,eAAe,EAAC,+BAA4B;AACpD,OAAO,EAAC,wBAAwB,EAAC,0CAAuC;AACxE,OAAO,EAAC,0BAA0B,EAAE,cAAc,EAAC,yBAAsB"}
|
package/dist/scan/index.cjs
CHANGED
|
@@ -15,47 +15,45 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
19
|
|
|
21
20
|
// src/scan/index.ts
|
|
22
21
|
var scan_exports = {};
|
|
23
22
|
__export(scan_exports, {
|
|
24
|
-
ARROW_TABLE_QUERY_CAPABILITIES: () => import_plan_arrow_table_query.ARROW_TABLE_QUERY_CAPABILITIES,
|
|
25
23
|
AddressedVectorTableScanSource: () => import_vector_table_scan_source.AddressedVectorTableScanSource,
|
|
26
24
|
FEDERATED_TABLE_QUERY_CAPABILITIES: () => import_federated_table_scan_source.FEDERATED_TABLE_QUERY_CAPABILITIES,
|
|
27
25
|
FederatedTableScanSource: () => import_federated_table_scan_source.FederatedTableScanSource,
|
|
26
|
+
SQL_PREDICATE_JSON_SCHEMA: () => import_sql_predicate_schema.SQL_PREDICATE_JSON_SCHEMA,
|
|
28
27
|
VectorFeatureTableScanSource: () => import_vector_table_scan_source.VectorFeatureTableScanSource,
|
|
29
28
|
VectorTileTableScanSource: () => import_vector_table_scan_source.VectorTileTableScanSource,
|
|
30
|
-
|
|
29
|
+
bindSQLPredicate: () => import_bind_sql_predicate.bindSQLPredicate,
|
|
31
30
|
createQueryMetadata: () => import_loader_utils3.createQueryMetadata,
|
|
32
31
|
createScanEngine: () => import_scan_engine.createScanEngine,
|
|
33
32
|
createScanQueryMetadata: () => import_loader_utils2.createScanQueryMetadata,
|
|
34
33
|
executeTableScanBatches: () => import_loader_utils.executeTableScanBatches,
|
|
35
|
-
explainArrowTableQuery: () => import_plan_arrow_table_query.explainArrowTableQuery,
|
|
36
34
|
explainTableQuery: () => import_table_query2.explainTableQuery,
|
|
37
|
-
filterArrowTable: () => import_arrow_execution.filterArrowTable,
|
|
38
35
|
filterTableBatch: () => import_loader_utils.filterTableBatch,
|
|
39
36
|
getFederatedTableBatchProvenance: () => import_federated_table_scan_source.getFederatedTableBatchProvenance,
|
|
40
37
|
getSQLPredicateColumnNames: () => import_table_query2.getSQLPredicateColumnNames,
|
|
41
38
|
intersectPointCloudBounds: () => import_loader_utils2.intersectPointCloudBounds,
|
|
39
|
+
isSQLPredicate: () => import_sql_predicate_schema.isSQLPredicate,
|
|
40
|
+
isSQLPredicateParameter: () => import_sql_predicate_types.isSQLPredicateParameter,
|
|
42
41
|
normalizeTableQuery: () => normalizeTableQuery,
|
|
43
42
|
parseSQLPredicate: () => import_parse_sql_predicate.parseSQLPredicate,
|
|
44
43
|
planLogicalTableQuery: () => planLogicalTableQuery,
|
|
45
44
|
planTableQuery: () => import_table_query2.planTableQuery,
|
|
46
|
-
|
|
45
|
+
preloadQuery: () => import_query.preloadQuery,
|
|
47
46
|
projectTableBatch: () => import_loader_utils.projectTableBatch,
|
|
48
47
|
projectTableSchema: () => import_loader_utils.projectTableSchema,
|
|
49
48
|
query: () => import_query.query,
|
|
50
|
-
queryArrowTable: () => import_query_arrow_table.queryArrowTable,
|
|
51
|
-
queryArrowTableInWorker: () => import_arrow_query_worker.queryArrowTableInWorker,
|
|
52
49
|
queryGroupedSQL: () => import_query_grouped_sql.queryGroupedSQL,
|
|
53
50
|
queryInBatches: () => import_query.queryInBatches,
|
|
54
51
|
queryProgressive: () => import_query.queryProgressive,
|
|
55
52
|
registerScanBackend: () => import_scan_engine.registerScanBackend,
|
|
56
53
|
selectPointCloudScanTiles: () => import_loader_utils2.selectPointCloudScanTiles,
|
|
57
54
|
truncateTableBatch: () => import_loader_utils.truncateTableBatch,
|
|
58
|
-
validatePointCloudQueryOptions: () => import_loader_utils2.validatePointCloudQueryOptions
|
|
55
|
+
validatePointCloudQueryOptions: () => import_loader_utils2.validatePointCloudQueryOptions,
|
|
56
|
+
validateSQLPredicate: () => import_sql_predicate_schema.validateSQLPredicate
|
|
59
57
|
});
|
|
60
58
|
module.exports = __toCommonJS(scan_exports);
|
|
61
59
|
var import_scan_engine = require("./scan-engine.cjs");
|
|
@@ -64,9 +62,9 @@ var import_parse_sql_predicate = require("./parse-sql-predicate.cjs");
|
|
|
64
62
|
var import_loader_utils2 = require("@loaders.gl/core/loader-utils");
|
|
65
63
|
var import_federated_table_scan_source = require("./federated-table-scan-source.cjs");
|
|
66
64
|
var import_vector_table_scan_source = require("./vector-table-scan-source.cjs");
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
|
|
65
|
+
var import_bind_sql_predicate = require("./bind-sql-predicate.cjs");
|
|
66
|
+
var import_sql_predicate_schema = require("./sql-predicate-schema.cjs");
|
|
67
|
+
var import_sql_predicate_types = require("./sql-predicate-types.cjs");
|
|
70
68
|
var import_table_query2 = require("./table-query.cjs");
|
|
71
69
|
|
|
72
70
|
// src/loader-utils/lib/scan-utils/columnar-predicate.ts
|
|
@@ -208,41 +206,37 @@ function validateTableReference(reference) {
|
|
|
208
206
|
}
|
|
209
207
|
|
|
210
208
|
// src/scan/index.ts
|
|
211
|
-
var import_arrow_execution = require("./arrow-execution.cjs");
|
|
212
209
|
var import_query_grouped_sql = require("./query-grouped-sql.cjs");
|
|
213
210
|
var import_query = require("./query.cjs");
|
|
214
211
|
var import_loader_utils3 = require("@loaders.gl/core/loader-utils");
|
|
215
|
-
var import_arrow_query_worker = require("./arrow-query-worker.cjs");
|
|
216
212
|
// Annotate the CommonJS export names for ESM import in node:
|
|
217
213
|
0 && (module.exports = {
|
|
218
|
-
ARROW_TABLE_QUERY_CAPABILITIES,
|
|
219
214
|
AddressedVectorTableScanSource,
|
|
220
215
|
FEDERATED_TABLE_QUERY_CAPABILITIES,
|
|
221
216
|
FederatedTableScanSource,
|
|
217
|
+
SQL_PREDICATE_JSON_SCHEMA,
|
|
222
218
|
VectorFeatureTableScanSource,
|
|
223
219
|
VectorTileTableScanSource,
|
|
224
|
-
|
|
220
|
+
bindSQLPredicate,
|
|
225
221
|
createQueryMetadata,
|
|
226
222
|
createScanEngine,
|
|
227
223
|
createScanQueryMetadata,
|
|
228
224
|
executeTableScanBatches,
|
|
229
|
-
explainArrowTableQuery,
|
|
230
225
|
explainTableQuery,
|
|
231
|
-
filterArrowTable,
|
|
232
226
|
filterTableBatch,
|
|
233
227
|
getFederatedTableBatchProvenance,
|
|
234
228
|
getSQLPredicateColumnNames,
|
|
235
229
|
intersectPointCloudBounds,
|
|
230
|
+
isSQLPredicate,
|
|
231
|
+
isSQLPredicateParameter,
|
|
236
232
|
normalizeTableQuery,
|
|
237
233
|
parseSQLPredicate,
|
|
238
234
|
planLogicalTableQuery,
|
|
239
235
|
planTableQuery,
|
|
240
|
-
|
|
236
|
+
preloadQuery,
|
|
241
237
|
projectTableBatch,
|
|
242
238
|
projectTableSchema,
|
|
243
239
|
query,
|
|
244
|
-
queryArrowTable,
|
|
245
|
-
queryArrowTableInWorker,
|
|
246
240
|
queryGroupedSQL,
|
|
247
241
|
queryInBatches,
|
|
248
242
|
queryProgressive,
|
|
@@ -250,6 +244,6 @@ var import_arrow_query_worker = require("./arrow-query-worker.cjs");
|
|
|
250
244
|
selectPointCloudScanTiles,
|
|
251
245
|
truncateTableBatch,
|
|
252
246
|
validatePointCloudQueryOptions,
|
|
253
|
-
|
|
247
|
+
validateSQLPredicate
|
|
254
248
|
});
|
|
255
249
|
//# sourceMappingURL=index.cjs.map
|
package/dist/scan/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/scan/index.ts", "../../src/loader-utils/lib/scan-utils/columnar-predicate.ts", "../../src/loader-utils/lib/scan-utils/table-query.ts", "../../src/loader-utils/lib/scan-utils/logical-table-query.ts"],
|
|
4
|
-
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport {createScanEngine, registerScanBackend} from './scan-engine';\n// The low-level executor lives in loader-utils so format packages can reuse it without importing\n// this optional module. It is re-exported here as the scan package's common batch adapter.\nexport {\n executeTableScanBatches,\n filterTableBatch,\n projectTableBatch,\n projectTableSchema,\n truncateTableBatch\n} from '@loaders.gl/core/loader-utils';\nexport type {TableScanBatchReader, TableScanBatchOperators} from '@loaders.gl/core/loader-utils';\nexport type {\n ScanBackend,\n ScanBackendLoader,\n ScanBackendName,\n ScanEngine,\n ScanEngineOptions\n} from './scan-engine';\n\n// Re-export the query vocabulary from one optional entry point for applications. Format adapters\n// should continue importing the lightweight contracts from @loaders.gl/core/loader-utils.\nexport {parseSQLPredicate} from './parse-sql-predicate';\nexport type {ArrowQueryOptions} from './query-arrow-table';\nexport type {SQLPredicate} from './sql-predicate-types';\nexport type {\n RelationalAggregate,\n RelationalExpression,\n RelationalOrderKey,\n TableQuery,\n TableReference,\n TableSourceCollection,\n TableSelection,\n TableQueryExecutionOptions,\n TableQueryOptions\n} from '@loaders.gl/core/loader-utils';\n\nexport {\n createScanQueryMetadata,\n intersectPointCloudBounds,\n selectPointCloudScanTiles,\n validatePointCloudQueryOptions\n} from '@loaders.gl/core/loader-utils';\nexport type {\n CreateScanQueryMetadataOptions,\n PointCloudQueryBounds,\n PointCloudQueryCapabilities,\n PointCloudQueryOptions,\n PointCloudScanChildrenLoader,\n PointCloudScanReadOptions,\n PointCloudScanSource,\n PointCloudScanTile,\n RasterQueryCapabilities,\n RasterQueryOptions,\n ScanBounds,\n ScanColumnMetadata,\n ScanColumnRole,\n ScanExecutionMethod,\n TableQueryExecutionSummary,\n TableQueryCompleteCallback,\n TableQueryExecutionStatus,\n TableQuerySourceExecutionSummary,\n ScanExecutionSupport,\n ScanQueryCapabilities,\n ScanQueryMetadata,\n ScanQueryMetadataOptions,\n ScanQueryMetadataProvider,\n ScanRasterLevel,\n ScanSourceStatistics,\n ScanSpatialMetadata,\n TableScanReadOptions,\n TableScanSource\n} from '@loaders.gl/core/loader-utils';\nexport type {ScanQuery} from './scan-query';\n\nexport {\n FEDERATED_TABLE_QUERY_CAPABILITIES,\n FederatedTableScanSource,\n getFederatedTableBatchProvenance\n} from './federated-table-scan-source';\nexport type {\n FederatedTableBatch,\n FederatedTableBatchProvenance,\n FederatedTableScanExplain,\n FederatedTableScanSourceOptions,\n FederatedTableSchemaPolicy,\n FederatedTableSourceEntry,\n FederatedTableSourceExplain\n} from './federated-table-scan-source';\n\nexport {\n AddressedVectorTableScanSource,\n VectorFeatureTableScanSource,\n VectorTileTableScanSource\n} from './vector-table-scan-source';\nexport type {\n VectorFeatureTableScanSourceOptions,\n VectorTableScanSourceOptions,\n VectorTileTableScanSourceOptions\n} from './vector-table-scan-source';\n\nexport {ARROW_TABLE_QUERY_CAPABILITIES, explainArrowTableQuery} from './plan-arrow-table-query';\nexport {queryArrowTable} from './query-arrow-table';\nexport * from './sql-predicate';\nexport {explainTableQuery, getSQLPredicateColumnNames, planTableQuery} from './table-query';\nexport type {\n TableQueryPlan,\n TableQueryPlanStep,\n TableQueryFilterStep,\n TableQueryLimitStep,\n TableQueryProjectStep,\n TableQueryScanStep\n} from './table-query';\n\nexport {\n normalizeTableQuery,\n planLogicalTableQuery\n} from '../loader-utils/lib/scan-utils/logical-table-query';\nexport type {\n NormalizedTableSelection,\n NormalizedTableQuery,\n LogicalTableQueryProjectStep,\n LogicalTableQueryPlan\n} from '../loader-utils/lib/scan-utils/logical-table-query';\n\nexport {projectArrowTable, filterArrowTable} from './arrow-execution';\nexport type {ArrowFilterOptions} from './arrow-execution';\n\nexport {queryGroupedSQL} from './query-grouped-sql';\nexport {query, queryInBatches, queryProgressive} from './query';\nexport type {\n ProgressiveAggregate,\n ProgressiveAggregateQuery,\n ProgressiveQueryOptions,\n ProgressiveQuerySnapshot\n} from './query-progressive';\nexport type {\n Query,\n QueryOptions,\n SQLQueryParser,\n TypedTableQuery,\n TypedColumnSelection,\n TypedColumnType\n} from './query';\n\nexport {createQueryMetadata} from '@loaders.gl/core/loader-utils';\nexport type {\n CreateQueryMetadataOptions,\n QueryMetadata,\n QueryMetadataOptions,\n QueryCapabilities,\n TableQuerySource,\n TableQueryReadOptions,\n TableQueryPushdownRequest,\n TableQueryPushdownPlan,\n TableQueryCapabilities,\n QueryPushdownCapabilityHints\n} from '@loaders.gl/core/loader-utils';\n\nexport {\n createArrowQueryWorker,\n queryArrowTableInWorker,\n type ArrowQueryWorkerOptions,\n type ArrowQueryWorkerSession\n} from './arrow-query-worker';\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {\n compileColumnarPredicate,\n type ColumnarPredicate,\n type ColumnarPredicateReader\n} from '@math.gl/sql/columnar-predicate';\nimport type {ArrayType} from '@loaders.gl/core/schema';\n\nexport {\n bindColumnarPredicateParameters,\n copyColumnarPredicate,\n getColumnarPredicateColumns,\n getColumnarPredicateParameterNames,\n getColumnarPredicatePath,\n getColumnarPredicatePaths,\n isColumnarPredicateParameter,\n isColumnarPredicateValue,\n validateColumnarPredicate,\n type ColumnarComparisonPredicate,\n type ColumnarInPredicate,\n type ColumnarLogicalPredicate,\n type ColumnarNotPredicate,\n type ColumnarNullPredicate,\n type ColumnarPredicate,\n type ColumnarPredicateInputValue,\n type ColumnarPredicateParameter,\n type ColumnarPredicateParameterValues,\n type ColumnarPredicateProperty,\n type ColumnarPredicateValue,\n type ParameterizedColumnarPredicate\n} from '@math.gl/sql/columnar-predicate';\n\n/** Finds the source rows matching a bound portable predicate. */\nexport function filterColumnarRowIndices(\n predicate: ColumnarPredicate | undefined,\n columns: Record<string, ArrayType>,\n rowCount: number\n): number[] {\n if (!predicate) return Array.from({length: rowCount}, (_, index) => index);\n const evaluate = compileColumnarPredicate(predicate, path => bindColumnarReader(columns, path));\n const result: number[] = [];\n for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {\n if (evaluate(rowIndex) === true) result.push(rowIndex);\n }\n return result;\n}\n\n/** Gathers selected rows from format-neutral column arrays. */\nexport function gatherColumnarColumns(\n columns: Record<string, ArrayType>,\n rowIndices: readonly number[],\n selectedColumns?: ReadonlySet<string>\n): Record<string, ArrayType> {\n const result: Record<string, ArrayType> = {};\n for (const [name, column] of Object.entries(columns)) {\n if (!selectedColumns || selectedColumns.has(name)) {\n result[name] = rowIndices.map(rowIndex => (column as ArrayLike<unknown>)[rowIndex]);\n }\n }\n return result;\n}\n\n/** Binds a portable predicate path to one source column. */\nfunction bindColumnarReader(\n columns: Record<string, ArrayType>,\n [name, ...path]: readonly string[]\n): ColumnarPredicateReader {\n const column = columns[name];\n return rowIndex => {\n let value = column?.[rowIndex];\n for (const property of path) {\n if (value == null) return null;\n value = value[property];\n }\n return value as ReturnType<ColumnarPredicateReader>;\n };\n}\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {\n getColumnarPredicateColumns,\n validateColumnarPredicate,\n type ColumnarPredicate,\n type ColumnarPredicateProperty\n} from './columnar-predicate';\n\n/** One source column selected for logical output, optionally under a new name. */\nexport type TableSelection =\n | string\n | Readonly<{\n /** Source column name, resolved before aliases are applied. */\n column: string;\n /** Output field name. Defaults to the source column name. */\n as?: string;\n }>;\n\n/** Named source, or a named table exposed by a source. Strings are literal names, not dotted paths. */\nexport type TableReference =\n | string\n | Readonly<{\n /** Name of a registered data source. */\n source: string;\n /** Name of a table exposed by that source. */\n table: string;\n }>;\n\n/** Logical query description, independent of cancellation and execution observers. */\nexport type TableQuery<\n PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate\n> = Readonly<{\n /** Optional named source or qualified table selected before planning. */\n from?: TableReference;\n /** Output columns in selection order. Omission selects all source columns. */\n select?: readonly TableSelection[];\n /** Predicate evaluated against source columns before output aliases are applied. */\n where?: PredicateT;\n /** Number of filtered rows skipped before applying the limit. */\n offset?: number;\n /** Maximum number of rows retained after filtering and offset. */\n limit?: number;\n}>;\n\n/** Controls one execution without becoming part of the logical query. */\nexport type TableQueryExecutionOptions = Readonly<{\n /** Cooperatively cancels source discovery and execution. */\n signal?: AbortSignal;\n /** Receives one terminal summary, including cancellation, failure, and early termination. */\n onQueryComplete?: import('./scan-query-metadata').TableQueryCompleteCallback;\n}>;\n\n/** Immutable, backend-neutral request for a scan, filter, projection, and limit. */\nexport type TableQueryOptions<\n PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate\n> = Pick<TableQueryExecutionOptions, 'signal'> &\n Readonly<{\n /** Portable predicate applied before projection. */\n predicate?: PredicateT;\n /** Output columns in caller-specified order. Defaults to every source column. */\n columns?: readonly string[];\n /** Maximum number of rows retained after filtering and projection. */\n limit?: number;\n }>;\n\n/** Reads the minimum source columns required by the remaining table-query plan. */\nexport type TableQueryScanStep = Readonly<{\n /** Plan discriminator. */\n kind: 'scan';\n /** Source columns required for filtering and output. */\n columns: readonly string[];\n}>;\n\n/** Applies a portable predicate while all predicate columns remain available. */\nexport type TableQueryFilterStep<PredicateT = ColumnarPredicate> = Readonly<{\n /** Plan discriminator. */\n kind: 'filter';\n /** Predicate evaluated using three-valued Boolean semantics. */\n predicate: PredicateT;\n}>;\n\n/** Narrows the result to requested output columns. */\nexport type TableQueryProjectStep = Readonly<{\n /** Plan discriminator. */\n kind: 'project';\n /** Output columns in caller-specified order. */\n columns: readonly string[];\n}>;\n\n/** Retains the first rows in source order after filtering and projection. */\nexport type TableQueryLimitStep = Readonly<{\n /** Plan discriminator. */\n kind: 'limit';\n /** Maximum number of retained rows. */\n limit: number;\n}>;\n\n/** One immutable operation in a normalized table-query plan. */\nexport type TableQueryPlanStep<PredicateT = ColumnarPredicate> =\n | TableQueryScanStep\n | TableQueryFilterStep<PredicateT>\n | TableQueryProjectStep\n | TableQueryLimitStep;\n\n/** Immutable logical query plan shared by CPU, SQL, and GPU backends. */\nexport type TableQueryPlan<PredicateT = ColumnarPredicate> =\n readonly TableQueryPlanStep<PredicateT>[];\n\n/** Capability levels for an individual portable table-query operator. */\nexport type TableQueryOperatorSupport =\n | 'unsupported'\n | 'residual'\n | 'pushdown'\n | 'pushdown+residual';\n\n/** Optimization and correctness capabilities advertised by a table-query backend. */\nexport type TableQueryCapabilities = Readonly<{\n /** Whether output projection can avoid reading unrequested columns. */\n projection: TableQueryOperatorSupport;\n /** Whether predicates are unsupported, residual, pushed down, or both pushed and residual. */\n predicate: TableQueryOperatorSupport;\n /** Whether limits are unsupported, applied after execution, or stop physical work early. */\n limit: TableQueryOperatorSupport;\n /** Whether exact CAST semantics can execute at the source; conversions require negotiation. */\n cast?: TableQueryOperatorSupport;\n /** Whether the source can skip filtered rows before its limit. */\n offset?: TableQueryOperatorSupport;\n /** Whether the backend can stream bounded result batches. */\n streaming: boolean;\n /** Whether active and queued physical work observes cancellation. */\n cancellation: boolean;\n /** Whether scalar expressions can be evaluated before projection. */\n expressions?: TableQueryOperatorSupport;\n /** Whether output rows can be ordered before the global limit. */\n orderBy?: TableQueryOperatorSupport;\n /** Whether grouped aggregate output is supported. */\n aggregates?: TableQueryOperatorSupport;\n}>;\n\n/**\n * Produces the canonical scan, filter, project, and limit sequence for a table query.\n *\n * Predicate columns are retained by the scan even if callers omit them from the output projection.\n * This makes SQL `WHERE` semantics independent of a backend's internal API call order.\n */\nexport function planTableQuery<\n ValueT,\n PropertyT extends ColumnarPredicateProperty,\n PredicateT extends ColumnarPredicate<ValueT, PropertyT>\n>(\n sourceColumnNames: readonly string[],\n options: TableQueryOptions<PredicateT> = {}\n): TableQueryPlan<PredicateT> {\n validateTableQueryOptions(sourceColumnNames, options);\n\n const outputColumnNames = options.columns ? [...options.columns] : [...sourceColumnNames];\n const predicateColumnNames = options.predicate\n ? getColumnarPredicateColumns(options.predicate)\n : [];\n const requiredColumnNames = new Set([...outputColumnNames, ...predicateColumnNames]);\n const scanColumnNames = sourceColumnNames.filter(columnName =>\n requiredColumnNames.has(columnName)\n );\n const steps: TableQueryPlanStep<PredicateT>[] = [\n Object.freeze({kind: 'scan' as const, columns: Object.freeze(scanColumnNames)})\n ];\n\n if (options.predicate) {\n steps.push(Object.freeze({kind: 'filter' as const, predicate: options.predicate}));\n }\n steps.push(Object.freeze({kind: 'project' as const, columns: Object.freeze(outputColumnNames)}));\n if (options.limit !== undefined) {\n steps.push(Object.freeze({kind: 'limit' as const, limit: options.limit}));\n }\n return Object.freeze(steps);\n}\n\n/** Validates a portable table query against the columns exposed by one source. */\nexport function validateTableQueryOptions<\n ValueT,\n PropertyT extends ColumnarPredicateProperty,\n PredicateT extends ColumnarPredicate<ValueT, PropertyT>\n>(sourceColumnNames: readonly string[], options: TableQueryOptions<PredicateT>): void {\n const availableColumnNames = new Set(sourceColumnNames);\n const outputColumnNames = options.columns ?? sourceColumnNames;\n const seenColumnNames = new Set<string>();\n for (const columnName of outputColumnNames) {\n if (!availableColumnNames.has(columnName)) {\n throw new Error(`Table query column not found: ${columnName}`);\n }\n if (seenColumnNames.has(columnName)) {\n throw new Error(`Table query column was selected more than once: ${columnName}`);\n }\n seenColumnNames.add(columnName);\n }\n validateTableQueryLimit(options.limit);\n if (options.predicate) {\n validateColumnarPredicate(options.predicate, availableColumnNames);\n }\n}\n\n/** Validates a portable table-query limit independently of source-schema validation. */\nexport function validateTableQueryLimit(limit: number | undefined): void {\n if (limit !== undefined && (!Number.isSafeInteger(limit) || limit < 0)) {\n throw new Error('Table query limit must be a non-negative safe integer.');\n }\n}\n\n/** Validates a logical row offset before any batches are read. */\nexport function validateTableQueryOffset(offset: number | undefined): void {\n if (offset !== undefined && (!Number.isSafeInteger(offset) || offset < 0)) {\n throw new Error('Table query offset must be a non-negative safe integer.');\n }\n}\n\n/** Static format hints only; omission means unknown and never authorizes execution. */\nexport type QueryPushdownCapabilityHints = Readonly<{\n /** The format may support reading only selected columns. */\n projection?: boolean;\n /** The format may support predicate evaluation or pruning. */\n predicate?: boolean;\n /** An implementation may evaluate some CAST conversions. */\n cast?: boolean;\n /** An implementation may skip rows at the source. */\n offset?: boolean;\n /** An implementation may stop source work after a row limit. */\n limit?: boolean;\n}>;\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {\n validateColumnarPredicate,\n type ColumnarPredicate,\n type ColumnarPredicateProperty\n} from './columnar-predicate';\nimport {\n planTableQuery,\n validateTableQueryLimit,\n validateTableQueryOffset,\n type TableQuery,\n type TableReference,\n type TableQueryPlanStep\n} from './table-query';\n\n/** Explicit source-to-output mapping for one selected field. */\nexport type NormalizedTableSelection = Readonly<{\n /** Column read from the source. */\n column: string;\n /** Name of the returned field. */\n as: string;\n}>;\n\n/** Logical query with all output selections expanded into explicit mappings. */\nexport type NormalizedTableQuery<PredicateT = ColumnarPredicate> = Readonly<{\n /** Optional source reference preserved separately from physical scan operations. */\n from?: TableReference;\n /** Output mappings in caller-specified order. */\n select: readonly NormalizedTableSelection[];\n /** Predicate resolved against source names before aliases. */\n where?: PredicateT;\n /** Global number of filtered rows skipped before applying the limit. */\n offset?: number;\n /** Global post-filter row limit. */\n limit?: number;\n}>;\n\n/** Logical projection retaining source names separately from output names. */\nexport type LogicalTableQueryProjectStep = Readonly<{\n /** Plan discriminator. */\n kind: 'project';\n /** Output mappings applied after filtering. */\n select: readonly NormalizedTableSelection[];\n}>;\n\n/** Scan, filter, aliased projection, and limit operations in execution order. */\nexport type LogicalTableQueryPlan<PredicateT = ColumnarPredicate> = readonly (\n | Exclude<TableQueryPlanStep<PredicateT>, {kind: 'project'}>\n | Readonly<{kind: 'offset'; offset: number}>\n | LogicalTableQueryProjectStep\n)[];\n\n/** Validates logical query fields and expands selections without modifying caller input. */\nexport function normalizeTableQuery<\n PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate\n>(\n sourceColumnNames: readonly string[],\n query: TableQuery<PredicateT> = {}\n): NormalizedTableQuery<PredicateT> {\n if (!query || typeof query !== 'object' || Array.isArray(query)) {\n throw new Error('Table query must be an object.');\n }\n for (const key of Object.keys(query)) {\n if (!['from', 'select', 'where', 'offset', 'limit'].includes(key)) {\n throw new Error(`Unsupported table query option: ${key}`);\n }\n }\n if (query.select !== undefined && (!Array.isArray(query.select) || query.select.length === 0)) {\n throw new Error('Table query select must be a non-empty array.');\n }\n validateTableReference(query.from);\n validateTableQueryOffset(query.offset);\n validateTableQueryLimit(query.limit);\n if (query.where !== undefined) {\n validateColumnarPredicate(query.where, new Set(sourceColumnNames));\n }\n const outputNames = new Set<string>();\n const select = (query.select ?? sourceColumnNames).map(selection => {\n if (\n typeof selection !== 'string' &&\n (!selection || typeof selection !== 'object' || Array.isArray(selection))\n ) {\n throw new Error('Table query selection must be a column name or {column, as}.');\n }\n if (\n typeof selection !== 'string' &&\n Object.keys(selection).some(key => key !== 'column' && key !== 'as')\n ) {\n throw new Error('Unsupported table query selection field.');\n }\n const column = typeof selection === 'string' ? selection : selection.column;\n const outputName =\n typeof selection === 'string'\n ? selection\n : selection.as === undefined\n ? column\n : selection.as;\n if (typeof column !== 'string' || !sourceColumnNames.includes(column)) {\n throw new Error(`Table query column not found: ${column}`);\n }\n if (typeof outputName !== 'string' || outputName.length === 0) {\n throw new Error('Table query output name must be a non-empty string.');\n }\n if (outputNames.has(outputName)) {\n throw new Error(`Duplicate table query output name: ${outputName}`);\n }\n outputNames.add(outputName);\n return Object.freeze({column, as: outputName});\n });\n // Reuse source-column and predicate validation; aliases never participate in WHERE resolution.\n planTableQuery(sourceColumnNames, {\n columns: [...new Set(select.map(selection => selection.column))],\n predicate: query.where,\n limit: query.limit\n });\n return Object.freeze({\n select: Object.freeze(select),\n ...(query.from === undefined\n ? {}\n : {from: typeof query.from === 'string' ? query.from : Object.freeze({...query.from})}),\n ...(query.where === undefined ? {} : {where: query.where}),\n ...(query.offset === undefined ? {} : {offset: query.offset}),\n ...(query.limit === undefined ? {} : {limit: query.limit})\n });\n}\n\n/** Builds a logical plan using the shared scan planner and an explicit aliased projection. */\nexport function planLogicalTableQuery<\n PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate\n>(\n sourceColumnNames: readonly string[],\n query: TableQuery<PredicateT> = {}\n): LogicalTableQueryPlan<PredicateT> {\n const normalized = normalizeTableQuery(sourceColumnNames, query);\n const plan = planTableQuery(sourceColumnNames, {\n columns: [...new Set(normalized.select.map(selection => selection.column))],\n predicate: normalized.where,\n limit: normalized.limit\n });\n const steps: LogicalTableQueryPlan<PredicateT>[number][] = [];\n for (const step of plan) {\n if (step.kind === 'limit' && normalized.offset !== undefined)\n steps.push(Object.freeze({kind: 'offset', offset: normalized.offset}));\n steps.push(\n step.kind === 'project' ? Object.freeze({kind: 'project', select: normalized.select}) : step\n );\n }\n if (normalized.limit === undefined && normalized.offset !== undefined)\n steps.push(Object.freeze({kind: 'offset', offset: normalized.offset}));\n return Object.freeze(steps);\n}\n\n/** Validates identifiers without interpreting dots or rewriting quoted names. */\nexport function validateTableReference(\n reference: unknown\n): asserts reference is TableReference | undefined {\n if (reference === undefined) return;\n if (typeof reference === 'string' && reference.trim()) return;\n if (reference && typeof reference === 'object' && !Array.isArray(reference)) {\n const value = reference as Record<string, unknown>;\n if (\n Object.keys(value).every(key => key === 'source' || key === 'table') &&\n typeof value.source === 'string' &&\n value.source.trim() &&\n typeof value.table === 'string' &&\n value.table.trim()\n )\n return;\n }\n throw new Error('FROM must be a source name or {source, table} with non-empty names.');\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport {createScanEngine, registerScanBackend} from './scan-engine';\n// The low-level executor lives in loader-utils so format packages can reuse it without importing\n// this optional module. It is re-exported here as the scan package's common batch adapter.\nexport {\n executeTableScanBatches,\n filterTableBatch,\n projectTableBatch,\n projectTableSchema,\n truncateTableBatch\n} from '@loaders.gl/core/loader-utils';\nexport type {TableScanBatchReader, TableScanBatchOperators} from '@loaders.gl/core/loader-utils';\nexport type {\n ScanBackend,\n ScanBackendLoader,\n ScanBackendName,\n ScanEngine,\n ScanEngineOptions\n} from './scan-engine';\n\n// Re-export the query vocabulary from one optional entry point for applications. Format adapters\n// should continue importing the lightweight contracts from @loaders.gl/core/loader-utils.\nexport {parseSQLPredicate} from './parse-sql-predicate';\nexport type {ArrowFilterOptions} from './arrow-execution';\nexport type {ArrowQueryOptions} from './query-arrow-table';\nexport type {SQLPredicate} from './sql-predicate-types';\nexport type {\n RelationalAggregate,\n RelationalExpression,\n RelationalOrderKey,\n TableQuery,\n TableReference,\n TableSourceCollection,\n TableSelection,\n TableQueryExecutionOptions,\n TableQueryOptions\n} from '@loaders.gl/core/loader-utils';\n\nexport {\n createScanQueryMetadata,\n intersectPointCloudBounds,\n selectPointCloudScanTiles,\n validatePointCloudQueryOptions\n} from '@loaders.gl/core/loader-utils';\nexport type {\n CreateScanQueryMetadataOptions,\n PointCloudQueryBounds,\n PointCloudQueryCapabilities,\n PointCloudQueryOptions,\n PointCloudScanChildrenLoader,\n PointCloudScanReadOptions,\n PointCloudScanSource,\n PointCloudScanTile,\n RasterQueryCapabilities,\n RasterQueryOptions,\n ScanBounds,\n ScanColumnMetadata,\n ScanColumnRole,\n ScanExecutionMethod,\n TableQueryExecutionSummary,\n TableQueryCompleteCallback,\n TableQueryExecutionStatus,\n TableQuerySourceExecutionSummary,\n ScanExecutionSupport,\n ScanQueryCapabilities,\n ScanQueryMetadata,\n ScanQueryMetadataOptions,\n ScanQueryMetadataProvider,\n ScanRasterLevel,\n ScanSourceStatistics,\n ScanSpatialMetadata,\n TableScanReadOptions,\n TableScanSource\n} from '@loaders.gl/core/loader-utils';\nexport type {ScanQuery} from './scan-query';\n\nexport {\n FEDERATED_TABLE_QUERY_CAPABILITIES,\n FederatedTableScanSource,\n getFederatedTableBatchProvenance\n} from './federated-table-scan-source';\nexport type {\n FederatedTableBatch,\n FederatedTableBatchProvenance,\n FederatedTableScanExplain,\n FederatedTableScanSourceOptions,\n FederatedTableSchemaPolicy,\n FederatedTableSourceEntry,\n FederatedTableSourceExplain\n} from './federated-table-scan-source';\n\nexport {\n AddressedVectorTableScanSource,\n VectorFeatureTableScanSource,\n VectorTileTableScanSource\n} from './vector-table-scan-source';\nexport type {\n VectorFeatureTableScanSourceOptions,\n VectorTableScanSourceOptions,\n VectorTileTableScanSourceOptions\n} from './vector-table-scan-source';\n\nexport {bindSQLPredicate} from './bind-sql-predicate';\nexport {\n isSQLPredicate,\n SQL_PREDICATE_JSON_SCHEMA,\n validateSQLPredicate\n} from './sql-predicate-schema';\nexport {isSQLPredicateParameter} from './sql-predicate-types';\nexport type {\n BoundSQLPredicate,\n SQLComparisonPredicate,\n SQLInPredicate,\n SQLLogicalPredicate,\n SQLNotPredicate,\n SQLNullPredicate,\n SQLPredicateParameter,\n SQLPredicateParameterValues,\n SQLPredicateParserOptions,\n SQLPredicateProperty,\n SQLPredicateScalar,\n SQLPredicateValue\n} from './sql-predicate-types';\nexport {explainTableQuery, getSQLPredicateColumnNames, planTableQuery} from './table-query';\nexport type {\n TableQueryPlan,\n TableQueryPlanStep,\n TableQueryFilterStep,\n TableQueryLimitStep,\n TableQueryProjectStep,\n TableQueryScanStep\n} from './table-query';\n\nexport {\n normalizeTableQuery,\n planLogicalTableQuery\n} from '../loader-utils/lib/scan-utils/logical-table-query';\nexport type {\n NormalizedTableSelection,\n NormalizedTableQuery,\n LogicalTableQueryProjectStep,\n LogicalTableQueryPlan\n} from '../loader-utils/lib/scan-utils/logical-table-query';\n\nexport {queryGroupedSQL} from './query-grouped-sql';\nexport {preloadQuery, query, queryInBatches, queryProgressive} from './query';\nexport type {\n ProgressiveAggregate,\n ProgressiveAggregateQuery,\n ProgressiveQueryOptions,\n ProgressiveQuerySnapshot\n} from './query-progressive';\nexport type {\n Query,\n QueryOptions,\n SQLQueryParser,\n TypedTableQuery,\n TypedColumnSelection,\n TypedColumnType\n} from './query';\n\nexport {createQueryMetadata} from '@loaders.gl/core/loader-utils';\nexport type {\n CreateQueryMetadataOptions,\n QueryMetadata,\n QueryMetadataOptions,\n QueryCapabilities,\n TableQuerySource,\n TableQueryReadOptions,\n TableQueryPushdownRequest,\n TableQueryPushdownPlan,\n TableQueryCapabilities,\n QueryPushdownCapabilityHints\n} from '@loaders.gl/core/loader-utils';\n\nexport type {ArrowQueryWorkerOptions, ArrowQueryWorkerSession} from './arrow-query-worker';\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {\n compileColumnarPredicate,\n type ColumnarPredicate,\n type ColumnarPredicateReader\n} from '@math.gl/sql/columnar-predicate';\nimport type {ArrayType} from '@loaders.gl/core/schema';\n\nexport {\n bindColumnarPredicateParameters,\n copyColumnarPredicate,\n getColumnarPredicateColumns,\n getColumnarPredicateParameterNames,\n getColumnarPredicatePath,\n getColumnarPredicatePaths,\n isColumnarPredicateParameter,\n isColumnarPredicateValue,\n validateColumnarPredicate,\n type ColumnarComparisonPredicate,\n type ColumnarInPredicate,\n type ColumnarLogicalPredicate,\n type ColumnarNotPredicate,\n type ColumnarNullPredicate,\n type ColumnarPredicate,\n type ColumnarPredicateInputValue,\n type ColumnarPredicateParameter,\n type ColumnarPredicateParameterValues,\n type ColumnarPredicateProperty,\n type ColumnarPredicateValue,\n type ParameterizedColumnarPredicate\n} from '@math.gl/sql/columnar-predicate';\n\n/** Finds the source rows matching a bound portable predicate. */\nexport function filterColumnarRowIndices(\n predicate: ColumnarPredicate | undefined,\n columns: Record<string, ArrayType>,\n rowCount: number\n): number[] {\n if (!predicate) return Array.from({length: rowCount}, (_, index) => index);\n const evaluate = compileColumnarPredicate(predicate, path => bindColumnarReader(columns, path));\n const result: number[] = [];\n for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {\n if (evaluate(rowIndex) === true) result.push(rowIndex);\n }\n return result;\n}\n\n/** Gathers selected rows from format-neutral column arrays. */\nexport function gatherColumnarColumns(\n columns: Record<string, ArrayType>,\n rowIndices: readonly number[],\n selectedColumns?: ReadonlySet<string>\n): Record<string, ArrayType> {\n const result: Record<string, ArrayType> = {};\n for (const [name, column] of Object.entries(columns)) {\n if (!selectedColumns || selectedColumns.has(name)) {\n result[name] = rowIndices.map(rowIndex => (column as ArrayLike<unknown>)[rowIndex]);\n }\n }\n return result;\n}\n\n/** Binds a portable predicate path to one source column. */\nfunction bindColumnarReader(\n columns: Record<string, ArrayType>,\n [name, ...path]: readonly string[]\n): ColumnarPredicateReader {\n const column = columns[name];\n return rowIndex => {\n let value = column?.[rowIndex];\n for (const property of path) {\n if (value == null) return null;\n value = value[property];\n }\n return value as ReturnType<ColumnarPredicateReader>;\n };\n}\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {\n getColumnarPredicateColumns,\n validateColumnarPredicate,\n type ColumnarPredicate,\n type ColumnarPredicateProperty\n} from './columnar-predicate';\n\n/** One source column selected for logical output, optionally under a new name. */\nexport type TableSelection =\n | string\n | Readonly<{\n /** Source column name, resolved before aliases are applied. */\n column: string;\n /** Output field name. Defaults to the source column name. */\n as?: string;\n }>;\n\n/** Named source, or a named table exposed by a source. Strings are literal names, not dotted paths. */\nexport type TableReference =\n | string\n | Readonly<{\n /** Name of a registered data source. */\n source: string;\n /** Name of a table exposed by that source. */\n table: string;\n }>;\n\n/** Logical query description, independent of cancellation and execution observers. */\nexport type TableQuery<\n PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate\n> = Readonly<{\n /** Optional named source or qualified table selected before planning. */\n from?: TableReference;\n /** Output columns in selection order. Omission selects all source columns. */\n select?: readonly TableSelection[];\n /** Predicate evaluated against source columns before output aliases are applied. */\n where?: PredicateT;\n /** Number of filtered rows skipped before applying the limit. */\n offset?: number;\n /** Maximum number of rows retained after filtering and offset. */\n limit?: number;\n}>;\n\n/** Controls one execution without becoming part of the logical query. */\nexport type TableQueryExecutionOptions = Readonly<{\n /** Cooperatively cancels source discovery and execution. */\n signal?: AbortSignal;\n /** Receives one terminal summary, including cancellation, failure, and early termination. */\n onQueryComplete?: import('./scan-query-metadata').TableQueryCompleteCallback;\n}>;\n\n/** Immutable, backend-neutral request for a scan, filter, projection, and limit. */\nexport type TableQueryOptions<\n PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate\n> = Pick<TableQueryExecutionOptions, 'signal'> &\n Readonly<{\n /** Portable predicate applied before projection. */\n predicate?: PredicateT;\n /** Output columns in caller-specified order. Defaults to every source column. */\n columns?: readonly string[];\n /** Maximum number of rows retained after filtering and projection. */\n limit?: number;\n }>;\n\n/** Reads the minimum source columns required by the remaining table-query plan. */\nexport type TableQueryScanStep = Readonly<{\n /** Plan discriminator. */\n kind: 'scan';\n /** Source columns required for filtering and output. */\n columns: readonly string[];\n}>;\n\n/** Applies a portable predicate while all predicate columns remain available. */\nexport type TableQueryFilterStep<PredicateT = ColumnarPredicate> = Readonly<{\n /** Plan discriminator. */\n kind: 'filter';\n /** Predicate evaluated using three-valued Boolean semantics. */\n predicate: PredicateT;\n}>;\n\n/** Narrows the result to requested output columns. */\nexport type TableQueryProjectStep = Readonly<{\n /** Plan discriminator. */\n kind: 'project';\n /** Output columns in caller-specified order. */\n columns: readonly string[];\n}>;\n\n/** Retains the first rows in source order after filtering and projection. */\nexport type TableQueryLimitStep = Readonly<{\n /** Plan discriminator. */\n kind: 'limit';\n /** Maximum number of retained rows. */\n limit: number;\n}>;\n\n/** One immutable operation in a normalized table-query plan. */\nexport type TableQueryPlanStep<PredicateT = ColumnarPredicate> =\n | TableQueryScanStep\n | TableQueryFilterStep<PredicateT>\n | TableQueryProjectStep\n | TableQueryLimitStep;\n\n/** Immutable logical query plan shared by CPU, SQL, and GPU backends. */\nexport type TableQueryPlan<PredicateT = ColumnarPredicate> =\n readonly TableQueryPlanStep<PredicateT>[];\n\n/** Capability levels for an individual portable table-query operator. */\nexport type TableQueryOperatorSupport =\n | 'unsupported'\n | 'residual'\n | 'pushdown'\n | 'pushdown+residual';\n\n/** Optimization and correctness capabilities advertised by a table-query backend. */\nexport type TableQueryCapabilities = Readonly<{\n /** Whether output projection can avoid reading unrequested columns. */\n projection: TableQueryOperatorSupport;\n /** Whether predicates are unsupported, residual, pushed down, or both pushed and residual. */\n predicate: TableQueryOperatorSupport;\n /** Whether limits are unsupported, applied after execution, or stop physical work early. */\n limit: TableQueryOperatorSupport;\n /** Whether exact CAST semantics can execute at the source; conversions require negotiation. */\n cast?: TableQueryOperatorSupport;\n /** Whether the source can skip filtered rows before its limit. */\n offset?: TableQueryOperatorSupport;\n /** Whether the backend can stream bounded result batches. */\n streaming: boolean;\n /** Whether active and queued physical work observes cancellation. */\n cancellation: boolean;\n /** Whether scalar expressions can be evaluated before projection. */\n expressions?: TableQueryOperatorSupport;\n /** Whether output rows can be ordered before the global limit. */\n orderBy?: TableQueryOperatorSupport;\n /** Whether grouped aggregate output is supported. */\n aggregates?: TableQueryOperatorSupport;\n}>;\n\n/**\n * Produces the canonical scan, filter, project, and limit sequence for a table query.\n *\n * Predicate columns are retained by the scan even if callers omit them from the output projection.\n * This makes SQL `WHERE` semantics independent of a backend's internal API call order.\n */\nexport function planTableQuery<\n ValueT,\n PropertyT extends ColumnarPredicateProperty,\n PredicateT extends ColumnarPredicate<ValueT, PropertyT>\n>(\n sourceColumnNames: readonly string[],\n options: TableQueryOptions<PredicateT> = {}\n): TableQueryPlan<PredicateT> {\n validateTableQueryOptions(sourceColumnNames, options);\n\n const outputColumnNames = options.columns ? [...options.columns] : [...sourceColumnNames];\n const predicateColumnNames = options.predicate\n ? getColumnarPredicateColumns(options.predicate)\n : [];\n const requiredColumnNames = new Set([...outputColumnNames, ...predicateColumnNames]);\n const scanColumnNames = sourceColumnNames.filter(columnName =>\n requiredColumnNames.has(columnName)\n );\n const steps: TableQueryPlanStep<PredicateT>[] = [\n Object.freeze({kind: 'scan' as const, columns: Object.freeze(scanColumnNames)})\n ];\n\n if (options.predicate) {\n steps.push(Object.freeze({kind: 'filter' as const, predicate: options.predicate}));\n }\n steps.push(Object.freeze({kind: 'project' as const, columns: Object.freeze(outputColumnNames)}));\n if (options.limit !== undefined) {\n steps.push(Object.freeze({kind: 'limit' as const, limit: options.limit}));\n }\n return Object.freeze(steps);\n}\n\n/** Validates a portable table query against the columns exposed by one source. */\nexport function validateTableQueryOptions<\n ValueT,\n PropertyT extends ColumnarPredicateProperty,\n PredicateT extends ColumnarPredicate<ValueT, PropertyT>\n>(sourceColumnNames: readonly string[], options: TableQueryOptions<PredicateT>): void {\n const availableColumnNames = new Set(sourceColumnNames);\n const outputColumnNames = options.columns ?? sourceColumnNames;\n const seenColumnNames = new Set<string>();\n for (const columnName of outputColumnNames) {\n if (!availableColumnNames.has(columnName)) {\n throw new Error(`Table query column not found: ${columnName}`);\n }\n if (seenColumnNames.has(columnName)) {\n throw new Error(`Table query column was selected more than once: ${columnName}`);\n }\n seenColumnNames.add(columnName);\n }\n validateTableQueryLimit(options.limit);\n if (options.predicate) {\n validateColumnarPredicate(options.predicate, availableColumnNames);\n }\n}\n\n/** Validates a portable table-query limit independently of source-schema validation. */\nexport function validateTableQueryLimit(limit: number | undefined): void {\n if (limit !== undefined && (!Number.isSafeInteger(limit) || limit < 0)) {\n throw new Error('Table query limit must be a non-negative safe integer.');\n }\n}\n\n/** Validates a logical row offset before any batches are read. */\nexport function validateTableQueryOffset(offset: number | undefined): void {\n if (offset !== undefined && (!Number.isSafeInteger(offset) || offset < 0)) {\n throw new Error('Table query offset must be a non-negative safe integer.');\n }\n}\n\n/** Static format hints only; omission means unknown and never authorizes execution. */\nexport type QueryPushdownCapabilityHints = Readonly<{\n /** The format may support reading only selected columns. */\n projection?: boolean;\n /** The format may support predicate evaluation or pruning. */\n predicate?: boolean;\n /** An implementation may evaluate some CAST conversions. */\n cast?: boolean;\n /** An implementation may skip rows at the source. */\n offset?: boolean;\n /** An implementation may stop source work after a row limit. */\n limit?: boolean;\n}>;\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {\n validateColumnarPredicate,\n type ColumnarPredicate,\n type ColumnarPredicateProperty\n} from './columnar-predicate';\nimport {\n planTableQuery,\n validateTableQueryLimit,\n validateTableQueryOffset,\n type TableQuery,\n type TableReference,\n type TableQueryPlanStep\n} from './table-query';\n\n/** Explicit source-to-output mapping for one selected field. */\nexport type NormalizedTableSelection = Readonly<{\n /** Column read from the source. */\n column: string;\n /** Name of the returned field. */\n as: string;\n}>;\n\n/** Logical query with all output selections expanded into explicit mappings. */\nexport type NormalizedTableQuery<PredicateT = ColumnarPredicate> = Readonly<{\n /** Optional source reference preserved separately from physical scan operations. */\n from?: TableReference;\n /** Output mappings in caller-specified order. */\n select: readonly NormalizedTableSelection[];\n /** Predicate resolved against source names before aliases. */\n where?: PredicateT;\n /** Global number of filtered rows skipped before applying the limit. */\n offset?: number;\n /** Global post-filter row limit. */\n limit?: number;\n}>;\n\n/** Logical projection retaining source names separately from output names. */\nexport type LogicalTableQueryProjectStep = Readonly<{\n /** Plan discriminator. */\n kind: 'project';\n /** Output mappings applied after filtering. */\n select: readonly NormalizedTableSelection[];\n}>;\n\n/** Scan, filter, aliased projection, and limit operations in execution order. */\nexport type LogicalTableQueryPlan<PredicateT = ColumnarPredicate> = readonly (\n | Exclude<TableQueryPlanStep<PredicateT>, {kind: 'project'}>\n | Readonly<{kind: 'offset'; offset: number}>\n | LogicalTableQueryProjectStep\n)[];\n\n/** Validates logical query fields and expands selections without modifying caller input. */\nexport function normalizeTableQuery<\n PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate\n>(\n sourceColumnNames: readonly string[],\n query: TableQuery<PredicateT> = {}\n): NormalizedTableQuery<PredicateT> {\n if (!query || typeof query !== 'object' || Array.isArray(query)) {\n throw new Error('Table query must be an object.');\n }\n for (const key of Object.keys(query)) {\n if (!['from', 'select', 'where', 'offset', 'limit'].includes(key)) {\n throw new Error(`Unsupported table query option: ${key}`);\n }\n }\n if (query.select !== undefined && (!Array.isArray(query.select) || query.select.length === 0)) {\n throw new Error('Table query select must be a non-empty array.');\n }\n validateTableReference(query.from);\n validateTableQueryOffset(query.offset);\n validateTableQueryLimit(query.limit);\n if (query.where !== undefined) {\n validateColumnarPredicate(query.where, new Set(sourceColumnNames));\n }\n const outputNames = new Set<string>();\n const select = (query.select ?? sourceColumnNames).map(selection => {\n if (\n typeof selection !== 'string' &&\n (!selection || typeof selection !== 'object' || Array.isArray(selection))\n ) {\n throw new Error('Table query selection must be a column name or {column, as}.');\n }\n if (\n typeof selection !== 'string' &&\n Object.keys(selection).some(key => key !== 'column' && key !== 'as')\n ) {\n throw new Error('Unsupported table query selection field.');\n }\n const column = typeof selection === 'string' ? selection : selection.column;\n const outputName =\n typeof selection === 'string'\n ? selection\n : selection.as === undefined\n ? column\n : selection.as;\n if (typeof column !== 'string' || !sourceColumnNames.includes(column)) {\n throw new Error(`Table query column not found: ${column}`);\n }\n if (typeof outputName !== 'string' || outputName.length === 0) {\n throw new Error('Table query output name must be a non-empty string.');\n }\n if (outputNames.has(outputName)) {\n throw new Error(`Duplicate table query output name: ${outputName}`);\n }\n outputNames.add(outputName);\n return Object.freeze({column, as: outputName});\n });\n // Reuse source-column and predicate validation; aliases never participate in WHERE resolution.\n planTableQuery(sourceColumnNames, {\n columns: [...new Set(select.map(selection => selection.column))],\n predicate: query.where,\n limit: query.limit\n });\n return Object.freeze({\n select: Object.freeze(select),\n ...(query.from === undefined\n ? {}\n : {from: typeof query.from === 'string' ? query.from : Object.freeze({...query.from})}),\n ...(query.where === undefined ? {} : {where: query.where}),\n ...(query.offset === undefined ? {} : {offset: query.offset}),\n ...(query.limit === undefined ? {} : {limit: query.limit})\n });\n}\n\n/** Builds a logical plan using the shared scan planner and an explicit aliased projection. */\nexport function planLogicalTableQuery<\n PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate\n>(\n sourceColumnNames: readonly string[],\n query: TableQuery<PredicateT> = {}\n): LogicalTableQueryPlan<PredicateT> {\n const normalized = normalizeTableQuery(sourceColumnNames, query);\n const plan = planTableQuery(sourceColumnNames, {\n columns: [...new Set(normalized.select.map(selection => selection.column))],\n predicate: normalized.where,\n limit: normalized.limit\n });\n const steps: LogicalTableQueryPlan<PredicateT>[number][] = [];\n for (const step of plan) {\n if (step.kind === 'limit' && normalized.offset !== undefined)\n steps.push(Object.freeze({kind: 'offset', offset: normalized.offset}));\n steps.push(\n step.kind === 'project' ? Object.freeze({kind: 'project', select: normalized.select}) : step\n );\n }\n if (normalized.limit === undefined && normalized.offset !== undefined)\n steps.push(Object.freeze({kind: 'offset', offset: normalized.offset}));\n return Object.freeze(steps);\n}\n\n/** Validates identifiers without interpreting dots or rewriting quoted names. */\nexport function validateTableReference(\n reference: unknown\n): asserts reference is TableReference | undefined {\n if (reference === undefined) return;\n if (typeof reference === 'string' && reference.trim()) return;\n if (reference && typeof reference === 'object' && !Array.isArray(reference)) {\n const value = reference as Record<string, unknown>;\n if (\n Object.keys(value).every(key => key === 'source' || key === 'table') &&\n typeof value.source === 'string' &&\n value.source.trim() &&\n typeof value.table === 'string' &&\n value.table.trim()\n )\n return;\n }\n throw new Error('FROM must be a source name or {source, table} with non-empty names.');\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,yBAAoD;AAGpD,0BAMO;AAYP,iCAAgC;AAgBhC,IAAAA,uBAKO;AAiCP,yCAIO;AAWP,sCAIO;AAOP,gCAA+B;AAC/B,kCAIO;AACP,iCAAsC;AAetC,IAAAC,sBAA4E;;;AC1H5E,gCAIO;AAGP,IAAAC,6BAsBO;;;ACmHA,SAAS,eAKd,mBACA,UAAyC,CAAC,GACd;AAC5B,4BAA0B,mBAAmB,OAAO;AAEpD,QAAM,oBAAoB,QAAQ,UAAU,CAAC,GAAG,QAAQ,OAAO,IAAI,CA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ader_utils", "import_table_query", "import_columnar_predicate", "query", "import_loader_utils"]
|
|
7
7
|
}
|
package/dist/scan/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { executeTableScanBatches, filterTableBatch, projectTableBatch, projectTa
|
|
|
3
3
|
export type { TableScanBatchReader, TableScanBatchOperators } from '@loaders.gl/core/loader-utils';
|
|
4
4
|
export type { ScanBackend, ScanBackendLoader, ScanBackendName, ScanEngine, ScanEngineOptions } from "./scan-engine.js";
|
|
5
5
|
export { parseSQLPredicate } from "./parse-sql-predicate.js";
|
|
6
|
+
export type { ArrowFilterOptions } from "./arrow-execution.js";
|
|
6
7
|
export type { ArrowQueryOptions } from "./query-arrow-table.js";
|
|
7
8
|
export type { SQLPredicate } from "./sql-predicate-types.js";
|
|
8
9
|
export type { RelationalAggregate, RelationalExpression, RelationalOrderKey, TableQuery, TableReference, TableSourceCollection, TableSelection, TableQueryExecutionOptions, TableQueryOptions } from '@loaders.gl/core/loader-utils';
|
|
@@ -13,20 +14,19 @@ export { FEDERATED_TABLE_QUERY_CAPABILITIES, FederatedTableScanSource, getFedera
|
|
|
13
14
|
export type { FederatedTableBatch, FederatedTableBatchProvenance, FederatedTableScanExplain, FederatedTableScanSourceOptions, FederatedTableSchemaPolicy, FederatedTableSourceEntry, FederatedTableSourceExplain } from "./federated-table-scan-source.js";
|
|
14
15
|
export { AddressedVectorTableScanSource, VectorFeatureTableScanSource, VectorTileTableScanSource } from "./vector-table-scan-source.js";
|
|
15
16
|
export type { VectorFeatureTableScanSourceOptions, VectorTableScanSourceOptions, VectorTileTableScanSourceOptions } from "./vector-table-scan-source.js";
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export
|
|
17
|
+
export { bindSQLPredicate } from "./bind-sql-predicate.js";
|
|
18
|
+
export { isSQLPredicate, SQL_PREDICATE_JSON_SCHEMA, validateSQLPredicate } from "./sql-predicate-schema.js";
|
|
19
|
+
export { isSQLPredicateParameter } from "./sql-predicate-types.js";
|
|
20
|
+
export type { BoundSQLPredicate, SQLComparisonPredicate, SQLInPredicate, SQLLogicalPredicate, SQLNotPredicate, SQLNullPredicate, SQLPredicateParameter, SQLPredicateParameterValues, SQLPredicateParserOptions, SQLPredicateProperty, SQLPredicateScalar, SQLPredicateValue } from "./sql-predicate-types.js";
|
|
19
21
|
export { explainTableQuery, getSQLPredicateColumnNames, planTableQuery } from "./table-query.js";
|
|
20
22
|
export type { TableQueryPlan, TableQueryPlanStep, TableQueryFilterStep, TableQueryLimitStep, TableQueryProjectStep, TableQueryScanStep } from "./table-query.js";
|
|
21
23
|
export { normalizeTableQuery, planLogicalTableQuery } from "../loader-utils/lib/scan-utils/logical-table-query.js";
|
|
22
24
|
export type { NormalizedTableSelection, NormalizedTableQuery, LogicalTableQueryProjectStep, LogicalTableQueryPlan } from "../loader-utils/lib/scan-utils/logical-table-query.js";
|
|
23
|
-
export { projectArrowTable, filterArrowTable } from "./arrow-execution.js";
|
|
24
|
-
export type { ArrowFilterOptions } from "./arrow-execution.js";
|
|
25
25
|
export { queryGroupedSQL } from "./query-grouped-sql.js";
|
|
26
|
-
export { query, queryInBatches, queryProgressive } from "./query.js";
|
|
26
|
+
export { preloadQuery, query, queryInBatches, queryProgressive } from "./query.js";
|
|
27
27
|
export type { ProgressiveAggregate, ProgressiveAggregateQuery, ProgressiveQueryOptions, ProgressiveQuerySnapshot } from "./query-progressive.js";
|
|
28
28
|
export type { Query, QueryOptions, SQLQueryParser, TypedTableQuery, TypedColumnSelection, TypedColumnType } from "./query.js";
|
|
29
29
|
export { createQueryMetadata } from '@loaders.gl/core/loader-utils';
|
|
30
30
|
export type { CreateQueryMetadataOptions, QueryMetadata, QueryMetadataOptions, QueryCapabilities, TableQuerySource, TableQueryReadOptions, TableQueryPushdownRequest, TableQueryPushdownPlan, TableQueryCapabilities, QueryPushdownCapabilityHints } from '@loaders.gl/core/loader-utils';
|
|
31
|
-
export {
|
|
31
|
+
export type { ArrowQueryWorkerOptions, ArrowQueryWorkerSession } from "./arrow-query-worker.js";
|
|
32
32
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/scan/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scan/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,gBAAgB,EAAE,mBAAmB,EAAC,yBAAsB;AAGpE,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAC,oBAAoB,EAAE,uBAAuB,EAAC,MAAM,+BAA+B,CAAC;AACjG,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,iBAAiB,EAClB,yBAAsB;AAIvB,OAAO,EAAC,iBAAiB,EAAC,iCAA8B;AACxD,YAAY,EAAC,iBAAiB,EAAC,+BAA4B;AAC3D,YAAY,EAAC,YAAY,EAAC,iCAA8B;AACxD,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,8BAA8B,EAC/B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,8BAA8B,EAC9B,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,4BAA4B,EAC5B,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,gCAAgC,EAChC,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EAC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OAAO,EAAC,iBAAiB,EAAE,0BAA0B,EAAE,cAAc,EAAC,yBAAsB;AAC5F,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EACnB,yBAAsB;AAEvB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACtB,8DAA2D;AAC5D,YAAY,EACV,wBAAwB,EACxB,oBAAoB,EACpB,4BAA4B,EAC5B,qBAAqB,EACtB,8DAA2D;AAE5D,OAAO,EAAC,eAAe,EAAC,+BAA4B;AACpD,OAAO,EAAC,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAC,mBAAgB;AAC9E,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACzB,+BAA4B;AAC7B,YAAY,EACV,KAAK,EACL,YAAY,EACZ,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,eAAe,EAChB,mBAAgB;AAEjB,OAAO,EAAC,mBAAmB,EAAC,MAAM,+BAA+B,CAAC;AAClE,YAAY,EACV,0BAA0B,EAC1B,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,+BAA+B,CAAC;AAEvC,YAAY,EAAC,uBAAuB,EAAE,uBAAuB,EAAC,gCAA6B"}
|
package/dist/scan/index.js
CHANGED
|
@@ -11,14 +11,12 @@ export { parseSQLPredicate } from "./parse-sql-predicate.js";
|
|
|
11
11
|
export { createScanQueryMetadata, intersectPointCloudBounds, selectPointCloudScanTiles, validatePointCloudQueryOptions } from '@loaders.gl/core/loader-utils';
|
|
12
12
|
export { FEDERATED_TABLE_QUERY_CAPABILITIES, FederatedTableScanSource, getFederatedTableBatchProvenance } from "./federated-table-scan-source.js";
|
|
13
13
|
export { AddressedVectorTableScanSource, VectorFeatureTableScanSource, VectorTileTableScanSource } from "./vector-table-scan-source.js";
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export
|
|
14
|
+
export { bindSQLPredicate } from "./bind-sql-predicate.js";
|
|
15
|
+
export { isSQLPredicate, SQL_PREDICATE_JSON_SCHEMA, validateSQLPredicate } from "./sql-predicate-schema.js";
|
|
16
|
+
export { isSQLPredicateParameter } from "./sql-predicate-types.js";
|
|
17
17
|
export { explainTableQuery, getSQLPredicateColumnNames, planTableQuery } from "./table-query.js";
|
|
18
18
|
export { normalizeTableQuery, planLogicalTableQuery } from "../loader-utils/lib/scan-utils/logical-table-query.js";
|
|
19
|
-
export { projectArrowTable, filterArrowTable } from "./arrow-execution.js";
|
|
20
19
|
export { queryGroupedSQL } from "./query-grouped-sql.js";
|
|
21
|
-
export { query, queryInBatches, queryProgressive } from "./query.js";
|
|
20
|
+
export { preloadQuery, query, queryInBatches, queryProgressive } from "./query.js";
|
|
22
21
|
export { createQueryMetadata } from '@loaders.gl/core/loader-utils';
|
|
23
|
-
export { createArrowQueryWorker, queryArrowTableInWorker } from "./arrow-query-worker.js";
|
|
24
22
|
//# sourceMappingURL=index.js.map
|
package/dist/scan/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scan/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,gBAAgB,EAAE,mBAAmB,EAAC,yBAAsB;AACpE,iGAAiG;AACjG,2FAA2F;AAC3F,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AAUvC,iGAAiG;AACjG,0FAA0F;AAC1F,OAAO,EAAC,iBAAiB,EAAC,iCAA8B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scan/index.ts"],"names":[],"mappings":"AAAA,aAAa;AAC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