@loaders.gl/scan 5.0.0-alpha.3
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 +52 -0
- package/README.md +219 -0
- package/dist/delta.cjs +24246 -0
- package/dist/delta.cjs.map +6 -0
- package/dist/delta.d.ts +11 -0
- package/dist/delta.d.ts.map +1 -0
- package/dist/delta.js +12 -0
- package/dist/delta.js.map +1 -0
- package/dist/dist.min.js +18475 -0
- package/dist/federated-table-scan-source.d.ts +116 -0
- package/dist/federated-table-scan-source.d.ts.map +1 -0
- package/dist/federated-table-scan-source.js +691 -0
- package/dist/federated-table-scan-source.js.map +1 -0
- package/dist/hudi.cjs +24065 -0
- package/dist/hudi.cjs.map +6 -0
- package/dist/hudi.d.ts +54 -0
- package/dist/hudi.d.ts.map +1 -0
- package/dist/hudi.js +124 -0
- package/dist/hudi.js.map +1 -0
- package/dist/iceberg.cjs +25862 -0
- package/dist/iceberg.cjs.map +6 -0
- package/dist/iceberg.d.ts +12 -0
- package/dist/iceberg.d.ts.map +1 -0
- package/dist/iceberg.js +12 -0
- package/dist/iceberg.js.map +1 -0
- package/dist/index.cjs +3485 -0
- package/dist/index.cjs.map +6 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/scan-engine.d.ts +44 -0
- package/dist/scan-engine.d.ts.map +1 -0
- package/dist/scan-engine.js +49 -0
- package/dist/scan-engine.js.map +1 -0
- package/dist/scan-query.d.ts +24 -0
- package/dist/scan-query.d.ts.map +1 -0
- package/dist/scan-query.js +5 -0
- package/dist/scan-query.js.map +1 -0
- package/dist/vector-table-scan-source.d.ts +90 -0
- package/dist/vector-table-scan-source.d.ts.map +1 -0
- package/dist/vector-table-scan-source.js +215 -0
- package/dist/vector-table-scan-source.js.map +1 -0
- package/package.json +66 -0
- package/src/delta.ts +18 -0
- package/src/federated-table-scan-source.ts +991 -0
- package/src/hudi.ts +200 -0
- package/src/iceberg.ts +36 -0
- package/src/index.ts +97 -0
- package/src/scan-engine.ts +96 -0
- package/src/scan-query.ts +27 -0
- package/src/vector-table-scan-source.ts +294 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { convertArrowToSchema } from '@loaders.gl/schema-utils';
|
|
5
|
+
import { createScanQueryMetadata, makeTableScanBatch } from '@loaders.gl/loader-utils';
|
|
6
|
+
import { ARROW_TABLE_QUERY_CAPABILITIES, explainArrowTableQuery, queryArrowTable } from '@loaders.gl/sql';
|
|
7
|
+
/**
|
|
8
|
+
* Base source for a physical vector selection that resolves to one Arrow feature table.
|
|
9
|
+
*
|
|
10
|
+
* The physical address is immutable and owned by a specialized adapter. Portable predicates,
|
|
11
|
+
* projection, ordering, aggregates, and limits are applied only after that selection resolves.
|
|
12
|
+
*/
|
|
13
|
+
export class AddressedVectorTableScanSource {
|
|
14
|
+
/** Stable adapter type reported by `getQueryMetadata()`. */
|
|
15
|
+
sourceType;
|
|
16
|
+
/** Optional display name shown by query controls. */
|
|
17
|
+
name;
|
|
18
|
+
/** Human-readable description of the bound physical selection. */
|
|
19
|
+
description;
|
|
20
|
+
/** Spatial extent of the bound physical selection. */
|
|
21
|
+
spatial;
|
|
22
|
+
tablePromise = null;
|
|
23
|
+
/** Creates a table-scan view over one immutable physical selection. */
|
|
24
|
+
constructor(options, defaults) {
|
|
25
|
+
this.sourceType = options.sourceType || defaults.sourceType;
|
|
26
|
+
this.name = options.name;
|
|
27
|
+
this.description = options.description || defaults.description;
|
|
28
|
+
this.spatial = defaults.spatial;
|
|
29
|
+
}
|
|
30
|
+
/** Discovers the addressed result schema and portable residual-query capabilities. */
|
|
31
|
+
async getQueryMetadata(options = {}) {
|
|
32
|
+
const table = await this.getTable(options.signal);
|
|
33
|
+
const schema = table.schema || convertArrowToSchema(table.data.schema);
|
|
34
|
+
return createScanQueryMetadata({
|
|
35
|
+
sourceType: this.sourceType,
|
|
36
|
+
queryType: 'table',
|
|
37
|
+
execution: { status: 'supported', method: 'read' },
|
|
38
|
+
name: this.name,
|
|
39
|
+
description: this.description,
|
|
40
|
+
schema,
|
|
41
|
+
capabilities: {
|
|
42
|
+
table: ARROW_TABLE_QUERY_CAPABILITIES,
|
|
43
|
+
bounds: 'unsupported',
|
|
44
|
+
levelOfDetail: 'unsupported'
|
|
45
|
+
},
|
|
46
|
+
columnRoles: inferVectorColumnRoles(schema.fields.map(field => field.name)),
|
|
47
|
+
spatial: this.spatial,
|
|
48
|
+
statistics: { rowCount: table.data.numRows }
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/** Applies the portable Arrow query to the addressed feature table. */
|
|
52
|
+
async query(options = {}) {
|
|
53
|
+
const table = await this.getTable(options.signal);
|
|
54
|
+
return queryArrowTable(table, options);
|
|
55
|
+
}
|
|
56
|
+
/** Explains the residual Arrow plan after resolving the addressed feature table. */
|
|
57
|
+
async explain(options = {}) {
|
|
58
|
+
const table = await this.getTable(options.signal);
|
|
59
|
+
return explainArrowTableQuery(table, options);
|
|
60
|
+
}
|
|
61
|
+
/** Emits the portable query result as one bounded Arrow batch. */
|
|
62
|
+
async *read(options = {}) {
|
|
63
|
+
const result = await this.query(options);
|
|
64
|
+
yield makeTableScanBatch(result);
|
|
65
|
+
}
|
|
66
|
+
/** Resolves and caches the addressed table while allowing failed loads to be retried. */
|
|
67
|
+
async getTable(signal) {
|
|
68
|
+
throwIfAborted(signal);
|
|
69
|
+
if (!this.tablePromise) {
|
|
70
|
+
this.tablePromise = this.loadTable()
|
|
71
|
+
.then(table => {
|
|
72
|
+
if (!table) {
|
|
73
|
+
throw new Error('The addressed vector selection did not return a feature table.');
|
|
74
|
+
}
|
|
75
|
+
if (table.shape !== 'arrow-table') {
|
|
76
|
+
throw new Error('The addressed vector selection must return an Arrow table. Configure the source with shape "arrow-table".');
|
|
77
|
+
}
|
|
78
|
+
return table;
|
|
79
|
+
})
|
|
80
|
+
.catch(error => {
|
|
81
|
+
this.tablePromise = null;
|
|
82
|
+
throw error;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return await waitForPromise(this.tablePromise, signal);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Portable table-query view over one explicitly addressed vector tile.
|
|
90
|
+
*
|
|
91
|
+
* MVT and vector PMTiles sources participate when configured to return `shape: 'arrow-table'`.
|
|
92
|
+
* Tile coordinates and layer selection remain source parameters rather than relational operators.
|
|
93
|
+
*/
|
|
94
|
+
export class VectorTileTableScanSource extends AddressedVectorTableScanSource {
|
|
95
|
+
/** Specialized tile source that owns tile addressing and decoding. */
|
|
96
|
+
source;
|
|
97
|
+
/** Immutable tile address bound to this table view. */
|
|
98
|
+
tile;
|
|
99
|
+
/** Creates a portable table view over one vector tile. */
|
|
100
|
+
constructor(source, options) {
|
|
101
|
+
const tile = Object.freeze({
|
|
102
|
+
...options.tile,
|
|
103
|
+
layers: cloneAndFreezeLayers(options.tile.layers)
|
|
104
|
+
});
|
|
105
|
+
super(options, {
|
|
106
|
+
sourceType: 'vector-tile-table',
|
|
107
|
+
description: `Vector tile ${tile.z}/${tile.x}/${tile.y}`,
|
|
108
|
+
spatial: {
|
|
109
|
+
bounds: getWGS84TileBounds(tile),
|
|
110
|
+
coordinateReferenceSystems: ['EPSG:4326']
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
this.source = source;
|
|
114
|
+
this.tile = tile;
|
|
115
|
+
}
|
|
116
|
+
/** Loads the bound vector tile using the source's requested Arrow output shape. */
|
|
117
|
+
loadTable(signal) {
|
|
118
|
+
return this.source.getVectorTile({ ...this.tile, signal });
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Portable table-query view over one explicitly bounded vector-service request.
|
|
123
|
+
*
|
|
124
|
+
* WFS and ArcGIS feature sources participate through their existing Arrow feature output. Layers,
|
|
125
|
+
* service bounds, and output CRS remain source parameters rather than relational operators.
|
|
126
|
+
*/
|
|
127
|
+
export class VectorFeatureTableScanSource extends AddressedVectorTableScanSource {
|
|
128
|
+
/** Specialized vector source that owns service request construction and parsing. */
|
|
129
|
+
source;
|
|
130
|
+
/** Immutable bounded feature request bound to this table view. */
|
|
131
|
+
request;
|
|
132
|
+
/** Creates a portable table view over one bounded vector-service request. */
|
|
133
|
+
constructor(source, options) {
|
|
134
|
+
const request = Object.freeze({
|
|
135
|
+
...options.request,
|
|
136
|
+
layers: cloneAndFreezeLayers(options.request.layers),
|
|
137
|
+
boundingBox: Object.freeze([
|
|
138
|
+
Object.freeze([...options.request.boundingBox[0]]),
|
|
139
|
+
Object.freeze([...options.request.boundingBox[1]])
|
|
140
|
+
])
|
|
141
|
+
});
|
|
142
|
+
const coordinateReferenceSystems = typeof request.crs === 'string' ? [request.crs] : undefined;
|
|
143
|
+
super(options, {
|
|
144
|
+
sourceType: 'vector-feature-table',
|
|
145
|
+
description: `Vector feature request for ${normalizeLayers(request.layers).join(', ')}`,
|
|
146
|
+
spatial: {
|
|
147
|
+
bounds: {
|
|
148
|
+
minimum: Object.freeze([...request.boundingBox[0]]),
|
|
149
|
+
maximum: Object.freeze([...request.boundingBox[1]])
|
|
150
|
+
},
|
|
151
|
+
coordinateReferenceSystems
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
this.source = source;
|
|
155
|
+
this.request = request;
|
|
156
|
+
}
|
|
157
|
+
/** Loads the bound service request through the source's Arrow feature output. */
|
|
158
|
+
loadTable(signal) {
|
|
159
|
+
return this.source.getFeatures({
|
|
160
|
+
...this.request,
|
|
161
|
+
format: 'arrow',
|
|
162
|
+
signal
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/** Returns the WGS84 extent of one XYZ tile address. */
|
|
167
|
+
function getWGS84TileBounds(tile) {
|
|
168
|
+
const scale = 2 ** tile.z;
|
|
169
|
+
return {
|
|
170
|
+
minimum: [(tile.x / scale) * 360 - 180, tileYToLatitude(tile.y + 1, scale)],
|
|
171
|
+
maximum: [((tile.x + 1) / scale) * 360 - 180, tileYToLatitude(tile.y, scale)]
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/** Converts one XYZ tile row to its WGS84 latitude edge. */
|
|
175
|
+
function tileYToLatitude(tileY, scale) {
|
|
176
|
+
return (Math.atan(Math.sinh(Math.PI * (1 - (2 * tileY) / scale))) * 180) / Math.PI;
|
|
177
|
+
}
|
|
178
|
+
/** Infers the small semantic-role set useful for vector feature query controls. */
|
|
179
|
+
function inferVectorColumnRoles(columnNames) {
|
|
180
|
+
return Object.fromEntries(columnNames.map(columnName => [
|
|
181
|
+
columnName,
|
|
182
|
+
columnName.toLowerCase() === 'geometry' ? 'geometry' : 'attribute'
|
|
183
|
+
]));
|
|
184
|
+
}
|
|
185
|
+
/** Normalizes a single layer name to the service API's list shape. */
|
|
186
|
+
function normalizeLayers(layers) {
|
|
187
|
+
return Array.isArray(layers) ? layers : [layers];
|
|
188
|
+
}
|
|
189
|
+
/** Clones and freezes a possibly plural layer selection for an immutable physical address. */
|
|
190
|
+
function cloneAndFreezeLayers(layers) {
|
|
191
|
+
return (Array.isArray(layers) ? Object.freeze([...layers]) : layers);
|
|
192
|
+
}
|
|
193
|
+
/** Waits for a shared cached load while preserving one caller's independent cancellation. */
|
|
194
|
+
async function waitForPromise(promise, signal) {
|
|
195
|
+
if (!signal) {
|
|
196
|
+
return await promise;
|
|
197
|
+
}
|
|
198
|
+
throwIfAborted(signal);
|
|
199
|
+
return await new Promise((resolve, reject) => {
|
|
200
|
+
const abort = () => reject(getAbortReason(signal));
|
|
201
|
+
signal.addEventListener('abort', abort, { once: true });
|
|
202
|
+
void promise.then(resolve, reject).finally(() => signal.removeEventListener('abort', abort));
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/** Throws before physical or residual work begins when cancellation was requested. */
|
|
206
|
+
function throwIfAborted(signal) {
|
|
207
|
+
if (signal?.aborted) {
|
|
208
|
+
throw getAbortReason(signal);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/** Returns the caller's cancellation reason or a portable AbortError fallback. */
|
|
212
|
+
function getAbortReason(signal) {
|
|
213
|
+
return signal.reason || new DOMException('Request aborted', 'AbortError');
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=vector-table-scan-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vector-table-scan-source.js","sourceRoot":"","sources":["../src/vector-table-scan-source.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,oBAAoB,EAAC,MAAM,0BAA0B,CAAC;AAW9D,OAAO,EAAC,uBAAuB,EAAE,kBAAkB,EAAC,MAAM,0BAA0B,CAAC;AACrF,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EACtB,eAAe,EAGhB,MAAM,iBAAiB,CAAC;AA0BzB;;;;;GAKG;AACH,MAAM,OAAgB,8BAA8B;IAClD,4DAA4D;IACnD,UAAU,CAAS;IAC5B,qDAAqD;IAC5C,IAAI,CAAU;IACvB,kEAAkE;IACzD,WAAW,CAAS;IAC7B,sDAAsD;IAC7C,OAAO,CAAuB;IAE/B,YAAY,GAA+B,IAAI,CAAC;IAExD,uEAAuE;IACvE,YACE,OAAqC,EACrC,QAIE;QAEF,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC;QAC5D,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC;QAC/D,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IAClC,CAAC;IAKD,sFAAsF;IACtF,KAAK,CAAC,gBAAgB,CAAC,UAAoC,EA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AE;QAC9C,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;QACnD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;QACtD,KAAK,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;IAC/F,CAAC,CAAC,CAAC;AACL,CAAC;AAED,sFAAsF;AACtF,SAAS,cAAc,CAAC,MAAoB;IAC1C,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;QACpB,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC;AAED,kFAAkF;AAClF,SAAS,cAAc,CAAC,MAAmB;IACzC,OAAO,MAAM,CAAC,MAAM,IAAI,IAAI,YAAY,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;AAC5E,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@loaders.gl/scan",
|
|
3
|
+
"description": "Optional scan planning and execution for loaders.gl",
|
|
4
|
+
"version": "5.0.0-alpha.3",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/visgl/loaders.gl"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"scan",
|
|
16
|
+
"arrow",
|
|
17
|
+
"query",
|
|
18
|
+
"columnar",
|
|
19
|
+
"geospatial"
|
|
20
|
+
],
|
|
21
|
+
"types": "dist/index.d.ts",
|
|
22
|
+
"main": "dist/index.cjs",
|
|
23
|
+
"module": "dist/index.js",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"require": "./dist/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./iceberg": {
|
|
31
|
+
"types": "./dist/iceberg.d.ts",
|
|
32
|
+
"import": "./dist/iceberg.js",
|
|
33
|
+
"require": "./dist/iceberg.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./delta": {
|
|
36
|
+
"types": "./dist/delta.d.ts",
|
|
37
|
+
"import": "./dist/delta.js",
|
|
38
|
+
"require": "./dist/delta.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./hudi": {
|
|
41
|
+
"types": "./dist/hudi.d.ts",
|
|
42
|
+
"import": "./dist/hudi.js",
|
|
43
|
+
"require": "./dist/hudi.cjs"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"sideEffects": false,
|
|
47
|
+
"files": [
|
|
48
|
+
"src",
|
|
49
|
+
"dist",
|
|
50
|
+
"README.md"
|
|
51
|
+
],
|
|
52
|
+
"scripts": {
|
|
53
|
+
"pre-build": "npm run build-bundle && npm run build-bundle -- --env=dev",
|
|
54
|
+
"build-bundle": "ocular-bundle ./bundle.ts --output=dist/dist.min.js"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@loaders.gl/geoarrow": "5.0.0-alpha.3",
|
|
58
|
+
"@loaders.gl/loader-utils": "5.0.0-alpha.3",
|
|
59
|
+
"@loaders.gl/parquet": "5.0.0-alpha.3",
|
|
60
|
+
"@loaders.gl/schema": "5.0.0-alpha.3",
|
|
61
|
+
"@loaders.gl/schema-utils": "5.0.0-alpha.3",
|
|
62
|
+
"@loaders.gl/sql": "5.0.0-alpha.3",
|
|
63
|
+
"apache-arrow": ">= 17.0.0"
|
|
64
|
+
},
|
|
65
|
+
"gitHead": "6e6f532b04a2798191ee2d9a932ca73b7c7f3c8d"
|
|
66
|
+
}
|
package/src/delta.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Incubating Delta Lake table-format adapters.
|
|
7
|
+
*
|
|
8
|
+
* This entry point is intentionally separate from the scan package root. The adapter remains
|
|
9
|
+
* backed by the Parquet implementation while its transaction-log and snapshot APIs mature.
|
|
10
|
+
*/
|
|
11
|
+
export {DeltaTableSource, DeltaSourceLoaderWithParser} from '@loaders.gl/parquet/delta-source';
|
|
12
|
+
export {DeltaSourceLoader} from '@loaders.gl/parquet/delta-source-loader-types';
|
|
13
|
+
export type {DeltaSourceLoaderOptions} from '@loaders.gl/parquet/delta-source-loader-types';
|
|
14
|
+
export type {
|
|
15
|
+
DeltaAction,
|
|
16
|
+
DeltaScanOptions,
|
|
17
|
+
DeltaSourceOptions
|
|
18
|
+
} from '@loaders.gl/parquet/delta-types';
|