@loaders.gl/core 5.0.0-beta.1 → 5.0.0-beta.10
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/GEOARROW-README.md +1 -1
- package/README.md +4 -2
- package/SCAN-README.md +1 -1
- package/SCHEMA-UTILS-README.md +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs.map +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.js +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.js.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs +5 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs.map +2 -2
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js +5 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js.map +1 -1
- package/dist/arrow-geometry/feature-table.cjs +6 -2
- package/dist/arrow-geometry/feature-table.cjs.map +2 -2
- package/dist/arrow-geometry/feature-table.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-table.js +6 -2
- package/dist/arrow-geometry/feature-table.js.map +1 -1
- package/dist/arrow-geometry/geojson-table.cjs +295 -18
- package/dist/arrow-geometry/geojson-table.cjs.map +3 -3
- package/dist/arrow-geometry/geojson-table.d.ts +10 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +23 -13
- package/dist/arrow-geometry/geojson-table.js.map +1 -1
- package/dist/arrow-geometry/geometry-codecs.cjs +6 -6
- package/dist/arrow-geometry/geometry-codecs.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-codecs.js +1 -1
- package/dist/arrow-geometry/geometry-codecs.js.map +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.cjs +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.js +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.js.map +1 -1
- package/dist/arrow-geometry/index.cjs +0 -11
- package/dist/arrow-geometry/index.cjs.map +2 -2
- package/dist/arrow-geometry/index.d.ts +0 -1
- package/dist/arrow-geometry/index.d.ts.map +1 -1
- package/dist/arrow-geometry/index.js +0 -1
- package/dist/arrow-geometry/index.js.map +1 -1
- package/dist/arrow-geometry/wkb-builder.cjs +3 -3
- package/dist/arrow-geometry/wkb-builder.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-builder.d.ts +1 -1
- package/dist/arrow-geometry/wkb-builder.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-builder.js +1 -1
- package/dist/arrow-geometry/wkb-builder.js.map +1 -1
- package/dist/arrow-geometry/wkb-statistics.cjs +2 -2
- package/dist/arrow-geometry/wkb-statistics.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-statistics.js +1 -1
- package/dist/arrow-geometry/wkb-statistics.js.map +1 -1
- package/dist/arrow-worker-transport.cjs +173 -0
- package/dist/arrow-worker-transport.cjs.map +6 -0
- package/dist/arrow-worker-transport.d.ts +15 -0
- package/dist/arrow-worker-transport.d.ts.map +1 -0
- package/dist/arrow-worker-transport.js +151 -0
- package/dist/arrow-worker-transport.js.map +1 -0
- package/dist/cluster-source.cjs +6874 -0
- package/dist/cluster-source.cjs.map +6 -0
- package/dist/cluster-source.d.ts +2 -0
- package/dist/cluster-source.d.ts.map +1 -0
- package/dist/cluster-source.js +2 -0
- package/dist/cluster-source.js.map +1 -0
- package/dist/dist.dev.js +3035 -823
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +2447 -0
- package/dist/federated-table-scan-source.cjs.map +6 -0
- package/dist/federated-table-scan-source.d.ts +2 -0
- package/dist/federated-table-scan-source.d.ts.map +1 -0
- package/dist/federated-table-scan-source.js +2 -0
- package/dist/federated-table-scan-source.js.map +1 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.cjs +4 -7
- package/dist/geoarrow/clustering/cluster-source.cjs.map +2 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.js +1 -4
- package/dist/geoarrow/clustering/cluster-source.js.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.cjs +1 -0
- package/dist/geoarrow/convert-table-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.js +2 -0
- package/dist/geoarrow/convert-table-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/geoarrow-bounds.cjs +7 -7
- package/dist/geoarrow/geoarrow-bounds.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-bounds.js +3 -3
- package/dist/geoarrow/geoarrow-bounds.js.map +1 -1
- package/dist/geoarrow/geoarrow-capabilities.cjs +2 -2
- package/dist/geoarrow/geoarrow-capabilities.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-capabilities.js +1 -1
- package/dist/geoarrow/geoarrow-capabilities.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs +8 -8
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs +6 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js +9 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs +6 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js +6 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js.map +1 -1
- package/dist/geoarrow/geoarrow-inspection.cjs +2 -2
- package/dist/geoarrow/geoarrow-inspection.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-inspection.js +1 -1
- package/dist/geoarrow/geoarrow-inspection.js.map +1 -1
- package/dist/geoarrow/geoarrow-stream.cjs +1 -1
- package/dist/geoarrow/geoarrow-stream.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-stream.js +1 -1
- package/dist/geoarrow/geoarrow-stream.js.map +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs.map +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.js +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +4 -8
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +4 -8
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs +4 -4
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs +3 -3
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js.map +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs +3 -3
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs.map +2 -2
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts +2 -3
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +2 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs +44 -2
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +4 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.js +3 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.js.map +1 -1
- package/dist/index.cjs +738 -1372
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +20 -9
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +55 -45
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode.d.ts +1 -1
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +11 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +3 -2
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +3 -3
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +15 -19
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +7 -3
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +17 -67
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts +5 -3
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +12 -7
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +5 -3
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +61 -6
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +5 -3
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +8 -6
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +5 -3
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +26 -15
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts +4 -2
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +47 -53
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/api/select-source.js +1 -1
- package/dist/lib/api/select-source.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +2 -2
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/loggers.d.ts +2 -37
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +2 -63
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +16 -0
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -0
- package/dist/lib/loader-utils/native-arrow.js +84 -0
- package/dist/lib/loader-utils/native-arrow.js.map +1 -0
- package/dist/lib/loader-utils/option-defaults.d.ts +3 -2
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +9 -10
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +0 -6
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +31 -114
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +3 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -1
- package/dist/loader-utils/index.cjs +838 -1284
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +16 -7
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +8 -4
- package/dist/loader-utils/index.js.map +1 -1
- package/dist/loader-utils/json-loader.js +1 -1
- package/dist/loader-utils/json-loader.js.map +1 -1
- package/dist/loader-utils/lib/files/http-file-transport.d.ts +4 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts.map +1 -1
- package/dist/loader-utils/lib/files/http-file-transport.js +45 -1
- package/dist/loader-utils/lib/files/http-file-transport.js.map +1 -1
- package/dist/loader-utils/lib/files/http-file-types.d.ts +2 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts.map +1 -1
- package/dist/loader-utils/lib/files/read-range-response.d.ts +3 -0
- package/dist/loader-utils/lib/files/read-range-response.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/read-range-response.js +62 -0
- package/dist/loader-utils/lib/files/read-range-response.js.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts +23 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +32 -1
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -1
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts +14 -0
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts.map +1 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js +51 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +1 -1
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts +43 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js +104 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/{experimental-scan-options.d.ts → query-options.d.ts} +5 -8
- package/dist/loader-utils/lib/scan-utils/query-options.d.ts.map +1 -0
- package/dist/{schema-utils/lib/table/batch-builder/table-batch-aggregator.js → loader-utils/lib/scan-utils/query-options.js} +1 -1
- package/dist/loader-utils/lib/scan-utils/query-options.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +54 -18
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +16 -6
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +54 -3
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.js +6 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +6 -3
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +33 -18
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts +4 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +53 -14
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -1
- package/dist/loader-utils/lib/sources/image-source.d.ts +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts +30 -0
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -0
- package/dist/loader-utils/lib/{scan-utils/experimental-scan-options.js → sources/table-source-collection.js} +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.js +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -1
- package/dist/loader-utils/lib/sources/vector-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +3 -2
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js +2 -5
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +40 -21
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +120 -91
- package/dist/loader-utils/loader-types.d.ts.map +1 -1
- package/dist/loader-utils/loader-types.js.map +1 -1
- package/dist/loader-utils/source-types.d.ts +7 -5
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +9 -1
- package/dist/loader-utils/source-types.js.map +1 -1
- package/dist/null-loader.d.ts +0 -18
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +1 -19
- package/dist/null-loader.js.map +1 -1
- package/dist/null-worker-node.js +771 -82
- package/dist/null-worker.js +742 -81
- package/dist/polyfills/images/encode-image-node.d.ts +18 -15
- package/dist/polyfills/images/encode-image-node.d.ts.map +1 -1
- package/dist/polyfills/images/encode-image-node.js +19 -33
- package/dist/polyfills/images/encode-image-node.js.map +1 -1
- package/dist/polyfills/images/image-codecs-node.d.ts +2 -6
- package/dist/polyfills/images/image-codecs-node.d.ts.map +1 -1
- package/dist/polyfills/images/image-codecs-node.js +2 -24
- package/dist/polyfills/images/image-codecs-node.js.map +1 -1
- package/dist/polyfills/images/load-sharp.d.ts +3 -0
- package/dist/polyfills/images/load-sharp.d.ts.map +1 -0
- package/dist/polyfills/images/load-sharp.js +11 -0
- package/dist/polyfills/images/load-sharp.js.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts +1 -1
- package/dist/polyfills/images/node-image-bitmap.js +1 -1
- package/dist/polyfills/images/node-image-formats.d.ts +1 -1
- package/dist/polyfills/images/node-image-formats.d.ts.map +1 -1
- package/dist/polyfills/images/node-image-formats.js +10 -4
- package/dist/polyfills/images/node-image-formats.js.map +1 -1
- package/dist/polyfills/images/parse-image-node.d.ts +10 -2
- package/dist/polyfills/images/parse-image-node.d.ts.map +1 -1
- package/dist/polyfills/images/parse-image-node.js +20 -32
- package/dist/polyfills/images/parse-image-node.js.map +1 -1
- package/dist/polyfills/index.cjs +76 -151
- package/dist/polyfills/index.d.ts.map +1 -1
- package/dist/polyfills/index.js +2 -2
- package/dist/polyfills/index.js.map +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +134 -0
- package/dist/scan/arrow-execution/expressions.cjs.map +7 -0
- package/dist/scan/arrow-execution/expressions.d.ts +11 -0
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -0
- package/dist/scan/arrow-execution/expressions.js +86 -0
- package/dist/scan/arrow-execution/expressions.js.map +1 -0
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +255 -0
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +7 -0
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts +18 -0
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -0
- package/dist/scan/arrow-execution/filter-arrow-table.js +224 -0
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -0
- package/dist/scan/arrow-execution/project-arrow-table.cjs +70 -0
- package/dist/scan/arrow-execution/project-arrow-table.cjs.map +7 -0
- package/dist/scan/arrow-execution/project-arrow-table.d.ts +8 -0
- package/dist/scan/arrow-execution/project-arrow-table.d.ts.map +1 -0
- package/dist/scan/arrow-execution/project-arrow-table.js +39 -0
- package/dist/scan/arrow-execution/project-arrow-table.js.map +1 -0
- package/dist/scan/arrow-execution.cjs +34 -0
- package/dist/scan/arrow-execution.cjs.map +7 -0
- package/dist/scan/arrow-execution.d.ts +4 -0
- package/dist/scan/arrow-execution.d.ts.map +1 -0
- package/dist/scan/arrow-execution.js +6 -0
- package/dist/scan/arrow-execution.js.map +1 -0
- package/dist/scan/arrow-query.cjs.map +1 -1
- package/dist/scan/arrow-query.d.ts +1 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/catalog-query-source.cjs +122 -0
- package/dist/scan/catalog-query-source.cjs.map +7 -0
- package/dist/scan/catalog-query-source.d.ts +6 -0
- package/dist/scan/catalog-query-source.d.ts.map +1 -0
- package/dist/scan/catalog-query-source.js +115 -0
- package/dist/scan/catalog-query-source.js.map +1 -0
- package/dist/scan/federated-table-scan-source.cjs +38 -38
- package/dist/scan/federated-table-scan-source.cjs.map +2 -2
- package/dist/scan/federated-table-scan-source.d.ts +6 -10
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -1
- package/dist/scan/federated-table-scan-source.js +35 -35
- package/dist/scan/federated-table-scan-source.js.map +1 -1
- package/dist/scan/index.cjs +208 -4
- package/dist/scan/index.cjs.map +4 -4
- package/dist/scan/index.d.ts +13 -3
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +6 -1
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +3 -294
- package/dist/scan/parse-sql-predicate.cjs.map +3 -3
- package/dist/scan/parse-sql-predicate.d.ts +6 -9
- package/dist/scan/parse-sql-predicate.d.ts.map +1 -1
- package/dist/scan/parse-sql-predicate.js +5 -314
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +75 -0
- package/dist/scan/query-arrow-table-in-batches.cjs.map +7 -0
- package/dist/scan/query-arrow-table-in-batches.d.ts +8 -0
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-in-batches.js +54 -0
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +65 -202
- package/dist/scan/query-arrow-table.cjs.map +3 -3
- package/dist/scan/query-arrow-table.d.ts +7 -40
- package/dist/scan/query-arrow-table.d.ts.map +1 -1
- package/dist/scan/query-arrow-table.js +51 -211
- package/dist/scan/query-arrow-table.js.map +1 -1
- package/dist/scan/query-open-source.cjs +52 -0
- package/dist/scan/query-open-source.cjs.map +7 -0
- package/dist/scan/query-open-source.d.ts +4 -0
- package/dist/scan/query-open-source.d.ts.map +1 -0
- package/dist/scan/query-open-source.js +26 -0
- package/dist/scan/query-open-source.js.map +1 -0
- package/dist/scan/query-progressive.cjs +190 -0
- package/dist/scan/query-progressive.cjs.map +7 -0
- package/dist/scan/query-progressive.d.ts +39 -0
- package/dist/scan/query-progressive.d.ts.map +1 -0
- package/dist/scan/query-progressive.js +173 -0
- package/dist/scan/query-progressive.js.map +1 -0
- package/dist/scan/query-pushdown.cjs +140 -0
- package/dist/scan/query-pushdown.cjs.map +7 -0
- package/dist/scan/query-pushdown.d.ts +14 -0
- package/dist/scan/query-pushdown.d.ts.map +1 -0
- package/dist/scan/query-pushdown.js +136 -0
- package/dist/scan/query-pushdown.js.map +1 -0
- package/dist/scan/query.cjs +381 -0
- package/dist/scan/query.cjs.map +7 -0
- package/dist/scan/query.d.ts +64 -0
- package/dist/scan/query.d.ts.map +1 -0
- package/dist/scan/query.js +419 -0
- package/dist/scan/query.js.map +1 -0
- package/dist/scan/resolve-query-source.cjs +59 -0
- package/dist/scan/resolve-query-source.cjs.map +7 -0
- package/dist/scan/resolve-query-source.d.ts +6 -0
- package/dist/scan/resolve-query-source.d.ts.map +1 -0
- package/dist/scan/resolve-query-source.js +37 -0
- package/dist/scan/resolve-query-source.js.map +1 -0
- package/dist/scan/rows-to-arrow.cjs +1 -28
- package/dist/scan/rows-to-arrow.cjs.map +2 -2
- package/dist/scan/rows-to-arrow.d.ts +3 -3
- package/dist/scan/rows-to-arrow.d.ts.map +1 -1
- package/dist/scan/rows-to-arrow.js +2 -32
- package/dist/scan/rows-to-arrow.js.map +1 -1
- package/dist/scan/scan-engine.cjs.map +2 -2
- package/dist/scan/scan-engine.d.ts +5 -5
- package/dist/scan/scan-engine.d.ts.map +1 -1
- package/dist/scan/scan-engine.js.map +1 -1
- package/dist/scan/sql-catalog.cjs +110 -0
- package/dist/scan/sql-catalog.cjs.map +7 -0
- package/dist/scan/sql-catalog.d.ts +47 -0
- package/dist/scan/sql-catalog.d.ts.map +1 -0
- package/dist/scan/sql-catalog.js +97 -0
- package/dist/scan/sql-catalog.js.map +1 -0
- package/dist/scan/table-query.cjs.map +2 -2
- package/dist/scan/table-query.d.ts +4 -1
- package/dist/scan/table-query.d.ts.map +1 -1
- package/dist/scan/table-query.js.map +1 -1
- package/dist/scan/vector-table-scan-source.cjs +14 -13
- package/dist/scan/vector-table-scan-source.cjs.map +3 -3
- package/dist/scan/vector-table-scan-source.d.ts +6 -5
- package/dist/scan/vector-table-scan-source.d.ts.map +1 -1
- package/dist/scan/vector-table-scan-source.js +17 -14
- package/dist/scan/vector-table-scan-source.js.map +1 -1
- package/dist/schema/geometry/geoarrow.d.ts +3 -6
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -1
- package/dist/schema/index.cjs +11 -7
- package/dist/schema/index.cjs.map +2 -2
- package/dist/schema/index.d.ts +2 -2
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/schema/index.js.map +1 -1
- package/dist/schema-utils/index.cjs +690 -823
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -5
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -4
- package/dist/schema-utils/index.js.map +1 -1
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts +17 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js +106 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js.map +1 -0
- package/dist/schema-utils/lib/converters/convert.js +9 -2
- package/dist/schema-utils/lib/converters/convert.js.map +1 -1
- package/dist/schema-utils/lib/converters/types.d.ts +2 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +4 -3
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +4 -4
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +4 -3
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +9 -2
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -1
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts +14 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js +39 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts +2 -14
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/mesh-utils.js +1 -35
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts +2 -2
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +6 -5
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +4 -2
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +9 -9
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +13 -46
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +9 -20
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +61 -73
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +4 -3
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.js +30 -9
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +6 -9
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +26 -15
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +4 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +33 -9
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +3 -3
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.js +9 -23
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts +27 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js +23 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +12 -10
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +15 -26
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +6 -36
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.js +5 -42
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +3 -55
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.js +3 -59
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/row-utils.js +2 -2
- package/dist/schema-utils/lib/table/tables/row-utils.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +18 -16
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.js +42 -31
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +6 -5
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +2 -2
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +3 -3
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +7 -4
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -1
- package/dist/vector-table-scan-source.cjs +1760 -0
- package/dist/vector-table-scan-source.cjs.map +6 -0
- package/dist/vector-table-scan-source.d.ts +2 -0
- package/dist/vector-table-scan-source.d.ts.map +1 -0
- package/dist/vector-table-scan-source.js +2 -0
- package/dist/vector-table-scan-source.js.map +1 -0
- package/dist/worker-utils/index.cjs +407 -1184
- package/dist/worker-utils/index.cjs.map +3 -3
- package/dist/worker-utils/index.d.ts +2 -8
- package/dist/worker-utils/index.d.ts.map +1 -1
- package/dist/worker-utils/index.js +1 -10
- package/dist/worker-utils/index.js.map +1 -1
- package/dist/worker-utils/lib/env-utils/version.js +1 -1
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js +3 -2
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +8 -7
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts +5 -7
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/create-worker.js +76 -146
- package/dist/worker-utils/lib/worker-api/create-worker.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +5 -2
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +17 -45
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +214 -312
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/task-runtime.d.ts +36 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.js +23 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +1 -6
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js +3 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js +836 -147
- package/dist/worker-utils/null-worker-node.js.map +4 -4
- package/dist/worker-utils/null-worker.js +804 -143
- package/dist/worker-utils/null-worker.js.map +4 -4
- package/dist/worker-utils/types.d.ts +55 -72
- package/dist/worker-utils/types.d.ts.map +1 -1
- package/package.json +126 -35
- package/src/arrow-geometry/binary-geometry-to-wkb.ts +1 -1
- package/src/arrow-geometry/feature-collection-to-arrow.ts +5 -1
- package/src/arrow-geometry/feature-table.ts +6 -2
- package/src/arrow-geometry/geojson-table.ts +32 -21
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/index.ts +0 -9
- package/src/arrow-geometry/wkb-builder.ts +2 -2
- package/src/arrow-geometry/wkb-statistics.ts +2 -2
- package/src/arrow-worker-transport.ts +225 -0
- package/src/cluster-source.ts +1 -0
- package/src/federated-table-scan-source.ts +1 -0
- package/src/geoarrow/binary-polygon-to-geoarrow.ts +2 -2
- package/src/geoarrow/clustering/cluster-source.ts +4 -7
- package/src/geoarrow/convert-table-to-geoarrow.ts +3 -1
- package/src/geoarrow/geoarrow-bounds.ts +3 -3
- package/src/geoarrow/geoarrow-capabilities.ts +1 -1
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +3 -3
- package/src/geoarrow/geoarrow-converter/convert-geoarrow.ts +14 -9
- package/src/geoarrow/geoarrow-converter/geoarrow-converter.ts +9 -6
- package/src/geoarrow/geoarrow-inspection.ts +2 -2
- package/src/geoarrow/geoarrow-stream.ts +1 -1
- package/src/geoarrow/get-geoarrow-vertex-count.ts +1 -1
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +4 -11
- package/src/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.ts +2 -2
- package/src/geoarrow/lib/kernels/encode-geoarrow-box.ts +1 -1
- package/src/geoarrow/lib/table-converters/convert-geoarrow-table.ts +8 -10
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +3 -2
- package/src/geoarrow/metadata/geoarrow-metadata.ts +3 -4
- package/src/index.ts +1 -5
- package/src/lib/api/create-data-source.ts +148 -58
- package/src/lib/api/encode.ts +14 -3
- package/src/lib/api/load-in-batches.ts +15 -7
- package/src/lib/api/load-loader.ts +22 -21
- package/src/lib/api/load.ts +61 -127
- package/src/lib/api/parse-file.ts +42 -23
- package/src/lib/api/parse-in-batches.ts +122 -17
- package/src/lib/api/parse-sync.ts +37 -19
- package/src/lib/api/parse.ts +51 -30
- package/src/lib/api/select-loader.ts +54 -69
- package/src/lib/api/select-source.ts +7 -1
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/loggers.ts +2 -70
- package/src/lib/loader-utils/native-arrow.ts +109 -0
- package/src/lib/loader-utils/option-defaults.ts +9 -10
- package/src/lib/loader-utils/option-utils.ts +33 -122
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +50 -9
- package/src/loader-utils/lib/files/http-file-transport.ts +65 -1
- package/src/loader-utils/lib/files/http-file-types.ts +2 -0
- package/src/loader-utils/lib/files/read-range-response.ts +66 -0
- package/src/loader-utils/lib/log-utils/log.ts +36 -1
- package/src/loader-utils/lib/pace-batch-iterator.ts +66 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +1 -1
- package/src/loader-utils/lib/scan-utils/logical-table-query.ts +174 -0
- package/src/loader-utils/lib/scan-utils/query-options.ts +44 -0
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +80 -28
- package/src/loader-utils/lib/scan-utils/table-query.ts +76 -8
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +54 -29
- package/src/loader-utils/lib/sources/data-source.ts +57 -16
- package/src/loader-utils/lib/sources/image-source.ts +1 -1
- package/src/loader-utils/lib/sources/table-source-collection.ts +38 -0
- package/src/loader-utils/lib/sources/utils/utils.ts +1 -1
- package/src/loader-utils/lib/sources/vector-source.ts +3 -3
- package/src/loader-utils/lib/sources/vector-tile-source.ts +3 -2
- package/src/loader-utils/lib/worker-loader-utils/encode-with-worker.ts +5 -6
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +41 -24
- package/src/loader-utils/loader-types.ts +190 -111
- package/src/loader-utils/source-types.ts +17 -6
- package/src/null-loader.ts +1 -20
- package/src/polyfills/README.md +2 -2
- package/src/polyfills/images/encode-image-node.ts +44 -37
- package/src/polyfills/images/image-codecs-node.ts +2 -37
- package/src/polyfills/images/load-sharp.ts +13 -0
- package/src/polyfills/images/node-image-bitmap.ts +1 -1
- package/src/polyfills/images/node-image-formats.ts +10 -4
- package/src/polyfills/images/parse-image-node.ts +31 -40
- package/src/polyfills/index.ts +3 -3
- package/src/scan/arrow-execution/expressions.ts +116 -0
- package/src/scan/arrow-execution/filter-arrow-table.ts +298 -0
- package/src/scan/arrow-execution/project-arrow-table.ts +53 -0
- package/src/scan/arrow-execution.ts +7 -0
- package/src/scan/arrow-query.ts +3 -0
- package/src/scan/catalog-query-source.ts +132 -0
- package/src/scan/federated-table-scan-source.ts +64 -72
- package/src/scan/index.ts +57 -5
- package/src/scan/parse-sql-predicate.ts +14 -367
- package/src/scan/query-arrow-table-in-batches.ts +55 -0
- package/src/scan/query-arrow-table.ts +81 -271
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +229 -0
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query.ts +597 -0
- package/src/scan/resolve-query-source.ts +47 -0
- package/src/scan/rows-to-arrow.ts +3 -39
- package/src/scan/scan-engine.ts +6 -6
- package/src/scan/sql-catalog.ts +167 -0
- package/src/scan/table-query.ts +6 -1
- package/src/scan/vector-table-scan-source.ts +22 -18
- package/src/schema/geometry/geoarrow.ts +8 -19
- package/src/schema/index.ts +3 -2
- package/src/schema-utils/index.ts +23 -8
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +136 -0
- package/src/schema-utils/lib/converters/convert.ts +7 -2
- package/src/schema-utils/lib/converters/types.ts +2 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +7 -9
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +10 -4
- package/src/schema-utils/lib/mesh/get-mesh-bounding-box.ts +52 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +3 -49
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +18 -8
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +4 -2
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +21 -51
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +68 -83
- package/src/schema-utils/lib/table/batches/convert-batches.ts +41 -21
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +33 -19
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +48 -7
- package/src/schema-utils/lib/table/query-arrow-table.ts +14 -32
- package/src/schema-utils/lib/table/tables/convert-arrow-table-wrapper.ts +54 -0
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +30 -35
- package/src/schema-utils/lib/table/tables/convert-table.ts +11 -57
- package/src/schema-utils/lib/table/tables/make-table.ts +6 -70
- package/src/schema-utils/lib/table/tables/row-utils.ts +2 -2
- package/src/schema-utils/lib/table/tables/table-accessors.ts +66 -49
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +12 -14
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +13 -10
- package/src/vector-table-scan-source.ts +1 -0
- package/src/worker-utils/index.ts +2 -18
- package/src/worker-utils/lib/library-utils/library-utils.ts +3 -2
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +8 -7
- package/src/worker-utils/lib/worker-api/create-worker.ts +89 -188
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +4 -3
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +246 -402
- package/src/worker-utils/lib/worker-api/task-runtime.ts +66 -0
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +1 -6
- package/src/worker-utils/lib/worker-utils/get-transfer-list.ts +2 -0
- package/src/worker-utils/types.ts +74 -109
- package/dist/arrow-geometry/arrow-geoarrow-adapter.cjs +0 -477
- package/dist/arrow-geometry/arrow-geoarrow-adapter.cjs.map +0 -7
- package/dist/arrow-geometry/arrow-geoarrow-adapter.d.ts +0 -29
- package/dist/arrow-geometry/arrow-geoarrow-adapter.d.ts.map +0 -1
- package/dist/arrow-geometry/arrow-geoarrow-adapter.js +0 -434
- package/dist/arrow-geometry/arrow-geoarrow-adapter.js.map +0 -1
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.cjs +0 -39
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.cjs.map +0 -7
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.d.ts +0 -2
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.d.ts.map +0 -1
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.js +0 -5
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts +0 -40
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.js +0 -68
- package/dist/loader-utils/lib/file-provider/data-view-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts +0 -54
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.js +0 -102
- package/dist/loader-utils/lib/file-provider/file-handle-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts +0 -45
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js +0 -13
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts +0 -57
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.js +0 -114
- package/dist/loader-utils/lib/file-provider/file-provider.js.map +0 -1
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.d.ts.map +0 -1
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.js.map +0 -1
- package/dist/schema/deprecated/mesh-utils.d.ts +0 -12
- package/dist/schema/deprecated/mesh-utils.d.ts.map +0 -1
- package/dist/schema/deprecated/mesh-utils.js +0 -37
- package/dist/schema/deprecated/mesh-utils.js.map +0 -1
- package/dist/schema-utils/arrow-transport.cjs +0 -691
- package/dist/schema-utils/arrow-transport.cjs.map +0 -6
- package/dist/schema-utils/arrow-transport.d.ts +0 -4
- package/dist/schema-utils/arrow-transport.d.ts.map +0 -1
- package/dist/schema-utils/arrow-transport.js +0 -7
- package/dist/schema-utils/arrow-transport.js.map +0 -1
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts +0 -76
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts.map +0 -1
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js +0 -182
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js.map +0 -1
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts +0 -33
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts.map +0 -1
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js +0 -134
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts +0 -10
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js +0 -71
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts +0 -19
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js +0 -64
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts +0 -20
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js +0 -83
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts +0 -21
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js +0 -86
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts +0 -24
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +0 -1
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts +0 -32
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts.map +0 -1
- package/dist/worker-utils/lib/async-queue/async-queue.js +0 -91
- package/dist/worker-utils/lib/async-queue/async-queue.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts +0 -20
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-body.js +0 -131
- package/dist/worker-utils/lib/worker-farm/worker-body.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts +0 -58
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-farm.js +0 -116
- package/dist/worker-utils/lib/worker-farm/worker-farm.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts +0 -34
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-job.js +0 -74
- package/dist/worker-utils/lib/worker-farm/worker-job.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts +0 -94
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-pool.js +0 -246
- package/dist/worker-utils/lib/worker-farm/worker-pool.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts +0 -67
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-thread.js +0 -175
- package/dist/worker-utils/lib/worker-farm/worker-thread.js.map +0 -1
- package/src/arrow-geometry/arrow-geoarrow-adapter.ts +0 -568
- package/src/geoarrow/lib/arrow-geoarrow-adapter.ts +0 -12
- package/src/loader-utils/lib/file-provider/data-view-file.ts +0 -83
- package/src/loader-utils/lib/file-provider/file-handle-file.ts +0 -114
- package/src/loader-utils/lib/file-provider/file-provider-interface.ts +0 -60
- package/src/loader-utils/lib/file-provider/file-provider.ts +0 -130
- package/src/loader-utils/lib/scan-utils/experimental-scan-options.ts +0 -46
- package/src/polyfills/images/encode-image.node.ts.disabled +0 -41
- package/src/polyfills/images/parse-image.node.ts.disabled +0 -55
- package/src/schema/deprecated/mesh-utils.ts +0 -46
- package/src/schema-utils/arrow-transport.ts +0 -7
- package/src/schema-utils/lib/arrow/arrow-table-transport.ts +0 -282
- package/src/schema-utils/lib/arrow/split-arrow-buffers.ts +0 -247
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator-builders.ts.disabled +0 -190
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts +0 -85
- package/src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts +0 -82
- package/src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts +0 -103
- package/src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts +0 -108
- package/src/schema-utils/lib/table/batch-builder/table-batch-aggregator.ts +0 -28
- package/src/worker-utils/lib/async-queue/async-queue.ts +0 -100
- package/src/worker-utils/lib/worker-farm/worker-body.ts +0 -145
- package/src/worker-utils/lib/worker-farm/worker-farm.ts +0 -144
- package/src/worker-utils/lib/worker-farm/worker-job.ts +0 -85
- package/src/worker-utils/lib/worker-farm/worker-pool.ts +0 -316
- package/src/worker-utils/lib/worker-farm/worker-thread.ts +0 -206
|
@@ -1,14 +1,46 @@
|
|
|
1
1
|
import { type ColumnarPredicate, type ColumnarPredicateProperty } from "./columnar-predicate.js";
|
|
2
|
+
/** One source column selected for logical output, optionally under a new name. */
|
|
3
|
+
export type TableSelection = string | Readonly<{
|
|
4
|
+
/** Source column name, resolved before aliases are applied. */
|
|
5
|
+
column: string;
|
|
6
|
+
/** Output field name. Defaults to the source column name. */
|
|
7
|
+
as?: string;
|
|
8
|
+
}>;
|
|
9
|
+
/** Named source, or a named table exposed by a source. Strings are literal names, not dotted paths. */
|
|
10
|
+
export type TableReference = string | Readonly<{
|
|
11
|
+
/** Name of a registered data source. */
|
|
12
|
+
source: string;
|
|
13
|
+
/** Name of a table exposed by that source. */
|
|
14
|
+
table: string;
|
|
15
|
+
}>;
|
|
16
|
+
/** Logical query description, independent of cancellation and execution observers. */
|
|
17
|
+
export type TableQuery<PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate> = Readonly<{
|
|
18
|
+
/** Optional named source or qualified table selected before planning. */
|
|
19
|
+
from?: TableReference;
|
|
20
|
+
/** Output columns in selection order. Omission selects all source columns. */
|
|
21
|
+
select?: readonly TableSelection[];
|
|
22
|
+
/** Predicate evaluated against source columns before output aliases are applied. */
|
|
23
|
+
where?: PredicateT;
|
|
24
|
+
/** Number of filtered rows skipped before applying the limit. */
|
|
25
|
+
offset?: number;
|
|
26
|
+
/** Maximum number of rows retained after filtering and offset. */
|
|
27
|
+
limit?: number;
|
|
28
|
+
}>;
|
|
29
|
+
/** Controls one execution without becoming part of the logical query. */
|
|
30
|
+
export type TableQueryExecutionOptions = Readonly<{
|
|
31
|
+
/** Cooperatively cancels source discovery and execution. */
|
|
32
|
+
signal?: AbortSignal;
|
|
33
|
+
/** Receives one terminal summary, including cancellation, failure, and early termination. */
|
|
34
|
+
onQueryComplete?: import('./scan-query-metadata').TableQueryCompleteCallback;
|
|
35
|
+
}>;
|
|
2
36
|
/** Immutable, backend-neutral request for a scan, filter, projection, and limit. */
|
|
3
|
-
export type TableQueryOptions<PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate> = Readonly<{
|
|
37
|
+
export type TableQueryOptions<PredicateT extends ColumnarPredicate<unknown, ColumnarPredicateProperty> = ColumnarPredicate> = Pick<TableQueryExecutionOptions, 'signal'> & Readonly<{
|
|
4
38
|
/** Portable predicate applied before projection. */
|
|
5
39
|
predicate?: PredicateT;
|
|
6
40
|
/** Output columns in caller-specified order. Defaults to every source column. */
|
|
7
41
|
columns?: readonly string[];
|
|
8
42
|
/** Maximum number of rows retained after filtering and projection. */
|
|
9
43
|
limit?: number;
|
|
10
|
-
/** Cancels discovery and batch production. */
|
|
11
|
-
signal?: AbortSignal;
|
|
12
44
|
}>;
|
|
13
45
|
/** Reads the minimum source columns required by the remaining table-query plan. */
|
|
14
46
|
export type TableQueryScanStep = Readonly<{
|
|
@@ -52,6 +84,10 @@ export type TableQueryCapabilities = Readonly<{
|
|
|
52
84
|
predicate: TableQueryOperatorSupport;
|
|
53
85
|
/** Whether limits are unsupported, applied after execution, or stop physical work early. */
|
|
54
86
|
limit: TableQueryOperatorSupport;
|
|
87
|
+
/** Whether exact CAST semantics can execute at the source; conversions require negotiation. */
|
|
88
|
+
cast?: TableQueryOperatorSupport;
|
|
89
|
+
/** Whether the source can skip filtered rows before its limit. */
|
|
90
|
+
offset?: TableQueryOperatorSupport;
|
|
55
91
|
/** Whether the backend can stream bounded result batches. */
|
|
56
92
|
streaming: boolean;
|
|
57
93
|
/** Whether active and queued physical work observes cancellation. */
|
|
@@ -74,4 +110,19 @@ export declare function planTableQuery<ValueT, PropertyT extends ColumnarPredica
|
|
|
74
110
|
export declare function validateTableQueryOptions<ValueT, PropertyT extends ColumnarPredicateProperty, PredicateT extends ColumnarPredicate<ValueT, PropertyT>>(sourceColumnNames: readonly string[], options: TableQueryOptions<PredicateT>): void;
|
|
75
111
|
/** Validates a portable table-query limit independently of source-schema validation. */
|
|
76
112
|
export declare function validateTableQueryLimit(limit: number | undefined): void;
|
|
113
|
+
/** Validates a logical row offset before any batches are read. */
|
|
114
|
+
export declare function validateTableQueryOffset(offset: number | undefined): void;
|
|
115
|
+
/** Static format hints only; omission means unknown and never authorizes execution. */
|
|
116
|
+
export type QueryPushdownCapabilityHints = Readonly<{
|
|
117
|
+
/** The format may support reading only selected columns. */
|
|
118
|
+
projection?: boolean;
|
|
119
|
+
/** The format may support predicate evaluation or pruning. */
|
|
120
|
+
predicate?: boolean;
|
|
121
|
+
/** An implementation may evaluate some CAST conversions. */
|
|
122
|
+
cast?: boolean;
|
|
123
|
+
/** An implementation may skip rows at the source. */
|
|
124
|
+
offset?: boolean;
|
|
125
|
+
/** An implementation may stop source work after a row limit. */
|
|
126
|
+
limit?: boolean;
|
|
127
|
+
}>;
|
|
77
128
|
//# sourceMappingURL=table-query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-query.d.ts","sourceRoot":"","sources":["../../../../src/loader-utils/lib/scan-utils/table-query.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC/B,gCAA6B;AAE9B,oFAAoF;AACpF,MAAM,MAAM,iBAAiB,CAC3B,UAAU,SAAS,iBAAiB,CAAC,OAAO,EAAE,yBAAyB,CAAC,GAAG,iBAAiB,IAC1F,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"table-query.d.ts","sourceRoot":"","sources":["../../../../src/loader-utils/lib/scan-utils/table-query.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC/B,gCAA6B;AAE9B,kFAAkF;AAClF,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,QAAQ,CAAC;IACP,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC,CAAC;AAEP,uGAAuG;AACvG,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,QAAQ,CAAC;IACP,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEP,sFAAsF;AACtF,MAAM,MAAM,UAAU,CACpB,UAAU,SAAS,iBAAiB,CAAC,OAAO,EAAE,yBAAyB,CAAC,GAAG,iBAAiB,IAC1F,QAAQ,CAAC;IACX,yEAAyE;IACzE,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC,oFAAoF;IACpF,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH,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,UAAU,CAAC,CAuB5B;AAED,kFAAkF;AAClF,wBAAgB,yBAAyB,CACvC,MAAM,EACN,SAAS,SAAS,yBAAyB,EAC3C,UAAU,SAAS,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,EACvD,iBAAiB,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,iBAAiB,CAAC,UAAU,CAAC,GAAG,IAAI,CAiBpF;AAED,wFAAwF;AACxF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAIvE;AAED,kEAAkE;AAClE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAIzE;AAED,uFAAuF;AACvF,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;IAClD,4DAA4D;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qDAAqD;IACrD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC,CAAC"}
|
|
@@ -53,4 +53,10 @@ export function validateTableQueryLimit(limit) {
|
|
|
53
53
|
throw new Error('Table query limit must be a non-negative safe integer.');
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
/** Validates a logical row offset before any batches are read. */
|
|
57
|
+
export function validateTableQueryOffset(offset) {
|
|
58
|
+
if (offset !== undefined && (!Number.isSafeInteger(offset) || offset < 0)) {
|
|
59
|
+
throw new Error('Table query offset must be a non-negative safe integer.');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
56
62
|
//# sourceMappingURL=table-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-query.js","sourceRoot":"","sources":["../../../../src/loader-utils/lib/scan-utils/table-query.ts"],"names":[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,yBAAyB,CAAC,OAAO,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,uBAAuB,CAAC,KAAyB;IAC/D,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;QACvE,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,wBAAwB,CAAC,MAA0B;IACjE,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC"}
|
|
@@ -4,8 +4,8 @@ import type { TableScanReadOptions } from "./scan-query-metadata.js";
|
|
|
4
4
|
export type TableScanBatchReader = (signal?: AbortSignal, onByteLength?: (byteLength: number) => void) => AsyncIterable<TableBatch>;
|
|
5
5
|
/** Optional batch kernels for formats with a native vectorized predicate implementation. */
|
|
6
6
|
export type TableScanBatchOperators = Readonly<{
|
|
7
|
-
/** Applies a residual predicate
|
|
8
|
-
filter?: (batch: TableBatch, predicate: TableScanReadOptions['predicate']) => TableBatch
|
|
7
|
+
/** Applies a residual predicate locally or on a worker; async kernels must observe the signal. */
|
|
8
|
+
filter?: (batch: TableBatch, predicate: TableScanReadOptions['predicate'], signal?: AbortSignal) => TableBatch | Promise<TableBatch>;
|
|
9
9
|
/** Applies a projection while preserving the source batch shape. */
|
|
10
10
|
project?: (batch: TableBatch, columns?: readonly string[]) => TableBatch;
|
|
11
11
|
}>;
|
|
@@ -18,7 +18,10 @@ export declare function makeTableScanBatch(table: ArrowTable): ArrowTableBatch;
|
|
|
18
18
|
* limits, cancellation, and telemetry here avoids copying the same executor into every format
|
|
19
19
|
* package while preserving each format's native batch shape.
|
|
20
20
|
*/
|
|
21
|
-
export declare function executeTableScanBatches(readBatches: TableScanBatchReader, options?: TableScanReadOptions
|
|
21
|
+
export declare function executeTableScanBatches(readBatches: TableScanBatchReader, options?: TableScanReadOptions & Readonly<{
|
|
22
|
+
/** Omits empty batches from the output stream. */
|
|
23
|
+
skipEmptyBatches?: boolean;
|
|
24
|
+
}>, operators?: TableScanBatchOperators): AsyncIterable<TableBatch>;
|
|
22
25
|
/** Truncates a batch without changing its native representation. */
|
|
23
26
|
export declare function truncateTableBatch(batch: TableBatch, length: number): TableBatch;
|
|
24
27
|
/** Projects a batch in the caller-requested order while preserving its shape. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-scan-batch.d.ts","sourceRoot":"","sources":["../../../../src/loader-utils/lib/scan-utils/table-scan-batch.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAE,eAAe,EAAE,UAAU,EAAC,MAAM,yBAAyB,CAAC;AACrF,OAAO,KAAK,EAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"table-scan-batch.d.ts","sourceRoot":"","sources":["../../../../src/loader-utils/lib/scan-utils/table-scan-batch.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAE,eAAe,EAAE,UAAU,EAAC,MAAM,yBAAyB,CAAC;AACrF,OAAO,KAAK,EAAC,oBAAoB,EAA6B,iCAA8B;AAK5F,wFAAwF;AACxF,MAAM,MAAM,oBAAoB,GAAG,CACjC,MAAM,CAAC,EAAE,WAAW,EACpB,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,KACxC,aAAa,CAAC,UAAU,CAAC,CAAC;AAE/B,4FAA4F;AAC5F,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,kGAAkG;IAClG,MAAM,CAAC,EAAE,CACP,KAAK,EAA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{ emitQueryComplete } from "./scan-query-metadata.js";
|
|
5
5
|
import { filterColumnarRowIndices, validateColumnarPredicate } from "./columnar-predicate.js";
|
|
6
|
-
import { validateTableQueryLimit } from "./table-query.js";
|
|
6
|
+
import { validateTableQueryLimit, validateTableQueryOffset } from "./table-query.js";
|
|
7
7
|
/** Wraps an Arrow table in the standard single-result scan batch envelope. */
|
|
8
8
|
export function makeTableScanBatch(table) {
|
|
9
9
|
return { ...table, batchType: 'data', length: table.data.numRows };
|
|
@@ -17,6 +17,8 @@ export function makeTableScanBatch(table) {
|
|
|
17
17
|
*/
|
|
18
18
|
export async function* executeTableScanBatches(readBatches, options = {}, operators = {}) {
|
|
19
19
|
validateTableQueryLimit(options.limit);
|
|
20
|
+
validateTableQueryOffset(options.offset);
|
|
21
|
+
let skip = options.offset ?? 0;
|
|
20
22
|
const startedAt = Date.now();
|
|
21
23
|
let sourcesRead = 0;
|
|
22
24
|
let batchesRead = 0;
|
|
@@ -30,6 +32,7 @@ export async function* executeTableScanBatches(readBatches, options = {}, operat
|
|
|
30
32
|
let executionError;
|
|
31
33
|
let remaining = options.limit === undefined ? Number.POSITIVE_INFINITY : Math.max(0, options.limit);
|
|
32
34
|
try {
|
|
35
|
+
options.signal?.throwIfAborted();
|
|
33
36
|
if (remaining <= 0) {
|
|
34
37
|
earlyTerminationReason = 'limit';
|
|
35
38
|
return;
|
|
@@ -40,26 +43,33 @@ export async function* executeTableScanBatches(readBatches, options = {}, operat
|
|
|
40
43
|
earlyTerminationReason = 'limit';
|
|
41
44
|
return;
|
|
42
45
|
}
|
|
46
|
+
options.signal?.throwIfAborted();
|
|
43
47
|
batchesRead++;
|
|
44
48
|
rowsRead += batch.length;
|
|
45
|
-
const filteredBatch = (operators.filter || filterTableBatch)(batch, options.predicate);
|
|
49
|
+
const filteredBatch = await (operators.filter || filterTableBatch)(batch, options.predicate, options.signal);
|
|
50
|
+
options.signal?.throwIfAborted();
|
|
46
51
|
if (options.predicate) {
|
|
47
52
|
rowsTested += batch.length;
|
|
48
53
|
rowsRetained += filteredBatch.length;
|
|
49
54
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
rowsReturned += projectedBatch.length;
|
|
54
|
-
yield projectedBatch;
|
|
55
|
+
if (skip >= filteredBatch.length && (skip > 0 || options.skipEmptyBatches)) {
|
|
56
|
+
skip -= filteredBatch.length;
|
|
57
|
+
continue;
|
|
55
58
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
const end = Math.min(filteredBatch.length, skip + remaining);
|
|
60
|
+
const window = skip || end < filteredBatch.length
|
|
61
|
+
? sliceTableBatch(filteredBatch, skip, end)
|
|
62
|
+
: filteredBatch;
|
|
63
|
+
skip = 0;
|
|
64
|
+
const output = (operators.project || projectTableBatch)(window, options.columns);
|
|
65
|
+
remaining -= window.length;
|
|
66
|
+
rowsReturned += output.length;
|
|
67
|
+
if (remaining === 0)
|
|
59
68
|
earlyTerminationReason = 'limit';
|
|
60
|
-
|
|
69
|
+
yield output;
|
|
70
|
+
if (remaining === 0)
|
|
61
71
|
return;
|
|
62
|
-
|
|
72
|
+
options.signal?.throwIfAborted();
|
|
63
73
|
}
|
|
64
74
|
status = 'completed';
|
|
65
75
|
}
|
|
@@ -72,7 +82,7 @@ export async function* executeTableScanBatches(readBatches, options = {}, operat
|
|
|
72
82
|
if (status === 'early-terminated' && !earlyTerminationReason) {
|
|
73
83
|
earlyTerminationReason = 'consumer-return';
|
|
74
84
|
}
|
|
75
|
-
|
|
85
|
+
emitQueryComplete(options.onQueryComplete, Object.freeze({
|
|
76
86
|
status,
|
|
77
87
|
sourcesPlanned: 1,
|
|
78
88
|
sourcesRead,
|
|
@@ -94,22 +104,27 @@ export async function* executeTableScanBatches(readBatches, options = {}, operat
|
|
|
94
104
|
}
|
|
95
105
|
/** Truncates a batch without changing its native representation. */
|
|
96
106
|
export function truncateTableBatch(batch, length) {
|
|
107
|
+
return sliceTableBatch(batch, 0, length);
|
|
108
|
+
}
|
|
109
|
+
/** Slices rows in a batch, preserving Arrow buffers and the batch shape. */
|
|
110
|
+
function sliceTableBatch(batch, start, end) {
|
|
111
|
+
const length = end - start;
|
|
97
112
|
if (batch.shape === 'object-row-table' || batch.shape === 'array-row-table') {
|
|
98
|
-
return { ...batch, data: batch.data.slice(
|
|
113
|
+
return { ...batch, data: batch.data.slice(start, end), length };
|
|
99
114
|
}
|
|
100
115
|
if (batch.shape === 'columnar-table') {
|
|
101
116
|
return {
|
|
102
117
|
...batch,
|
|
103
118
|
data: Object.fromEntries(Object.entries(batch.data).map(([name, values]) => [
|
|
104
119
|
name,
|
|
105
|
-
Array.from(values).slice(
|
|
120
|
+
Array.from(values).slice(start, end)
|
|
106
121
|
])),
|
|
107
122
|
length
|
|
108
123
|
};
|
|
109
124
|
}
|
|
110
125
|
if (batch.shape === 'arrow-table')
|
|
111
|
-
return { ...batch, data: batch.data.slice(
|
|
112
|
-
return { ...batch, features: batch.features.slice(
|
|
126
|
+
return { ...batch, data: batch.data.slice(start, end), length };
|
|
127
|
+
return { ...batch, features: batch.features.slice(start, end), length };
|
|
113
128
|
}
|
|
114
129
|
/** Projects a batch in the caller-requested order while preserving its shape. */
|
|
115
130
|
export function projectTableBatch(batch, columns) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-scan-batch.js","sourceRoot":"","sources":["../../../../src/loader-utils/lib/scan-utils/table-scan-batch.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"table-scan-batch.js","sourceRoot":"","sources":["../../../../src/loader-utils/lib/scan-utils/table-scan-batch.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,iBAAiB,EAAC,iCAA8B;AACxD,OAAO,EAAC,wBAAwB,EAAE,yBAAyB,EAAC,gCAA6B;AACzF,OAAO,EAAC,uBAAuB,E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UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAC,CAAC;AACjG,CAAC"}
|
|
@@ -8,6 +8,8 @@ export type DataSourceOptions = StrictLoaderOptions & {
|
|
|
8
8
|
core?: StrictLoaderOptions['core'] & {
|
|
9
9
|
/** Allows application to specify which source should be selected. Matches `Source.type`. Defaults to 'auto' */
|
|
10
10
|
type?: string;
|
|
11
|
+
/** Stable query-visible source name. Defaults to an available data or file name. */
|
|
12
|
+
name?: string;
|
|
11
13
|
/** Any dataset attributions (in case underlying metadata does not include attributions) */
|
|
12
14
|
attributions?: string[];
|
|
13
15
|
/** Removed in v5. Move these options to `core` and the root loader namespaces. */
|
|
@@ -42,6 +44,8 @@ export declare abstract class DataSource<DataT, OptionsT extends DataSourceOptio
|
|
|
42
44
|
options: Required<OptionsT & DataSourceOptions>;
|
|
43
45
|
readonly data: DataT;
|
|
44
46
|
readonly url: string;
|
|
47
|
+
/** Stable query-visible name, resolved without fetching source data. */
|
|
48
|
+
readonly name: string;
|
|
45
49
|
/** Shared parser options derived from the source options, excluding source-only core controls. */
|
|
46
50
|
loadOptions: StrictLoaderOptions;
|
|
47
51
|
/** A resolved fetch function extracted from the shared core options. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-source.d.ts","sourceRoot":"","sources":["../../../../src/loader-utils/lib/sources/data-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAC,8BAA2B;AAClG,OAAO,KAAK,EAAC,iBAAiB,EAAE,QAAQ,EAAE,YAAY,EAAC,uBAAoB;AAC3E,OAAO,KAAK,EAAC,YAAY,EAAC,yBAAsB;AAOhD,6CAA6C;AAC7C,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG;IACpD,8EAA8E;IAC9E,WAAW,CAAC,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GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,mBAAmB,CAmBtF"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import { mergeOptions } from "../option-utils/merge-options.js";
|
|
5
5
|
import { resolvePath } from "../path-utils/file-aliases.js";
|
|
6
|
-
import {
|
|
6
|
+
import { getLoaderLog } from "../log-utils/log.js";
|
|
7
7
|
import { getAuthenticatedFetch } from "../request-utils/request-credentials.js";
|
|
8
8
|
import { resolveAuthenticationOptions } from "../request-utils/authentication.js";
|
|
9
9
|
const UNAVAILABLE_CORE_API = {
|
|
@@ -29,6 +29,8 @@ export class DataSource {
|
|
|
29
29
|
options;
|
|
30
30
|
data;
|
|
31
31
|
url;
|
|
32
|
+
/** Stable query-visible name, resolved without fetching source data. */
|
|
33
|
+
name;
|
|
32
34
|
/** Shared parser options derived from the source options, excluding source-only core controls. */
|
|
33
35
|
loadOptions;
|
|
34
36
|
/** A resolved fetch function extracted from the shared core options. */
|
|
@@ -42,6 +44,7 @@ export class DataSource {
|
|
|
42
44
|
this.options = mergeOptions(mergeOptions(DataSource.defaultOptions, defaultOptions || {}), options);
|
|
43
45
|
this.data = data;
|
|
44
46
|
this.url = typeof data === 'string' ? resolvePath(data) : '';
|
|
47
|
+
this.name = getDataSourceName(data, this.options);
|
|
45
48
|
const loadOptions = resolveAuthenticationOptions(getSourceLoaderOptions(this.options));
|
|
46
49
|
this.loadOptions = loadOptions;
|
|
47
50
|
const fetch = getFetchFunction(loadOptions);
|
|
@@ -50,6 +53,8 @@ export class DataSource {
|
|
|
50
53
|
this.fetch = fetch;
|
|
51
54
|
}
|
|
52
55
|
setProps(options) {
|
|
56
|
+
if (options.core?.name !== undefined && options.core.name !== this.name)
|
|
57
|
+
throw new Error('Data source names are fixed at creation.');
|
|
53
58
|
const mergedOptions = mergeOptions(this.options, options);
|
|
54
59
|
const loadOptions = resolveAuthenticationOptions(getSourceLoaderOptions(mergedOptions));
|
|
55
60
|
this.options = mergedOptions;
|
|
@@ -81,7 +86,7 @@ export class DataSource {
|
|
|
81
86
|
callback(normalizedError, this);
|
|
82
87
|
}
|
|
83
88
|
else {
|
|
84
|
-
|
|
89
|
+
getLoaderLog(this.options).warn(`${this.constructor.name}: ${normalizedError.message}`)();
|
|
85
90
|
}
|
|
86
91
|
return normalizedError;
|
|
87
92
|
}
|
|
@@ -108,23 +113,13 @@ export function getSourceLoaderOptions(options) {
|
|
|
108
113
|
if (options?.core) {
|
|
109
114
|
loadOptions.core = { ...options.core };
|
|
110
115
|
const parserCore = loadOptions.core;
|
|
111
|
-
for (const key of ['type', 'attributions', 'loaders', 'onError', 'loadOptions']) {
|
|
116
|
+
for (const key of ['type', 'name', 'attributions', 'loaders', 'onError', 'loadOptions']) {
|
|
112
117
|
delete parserCore[key];
|
|
113
118
|
}
|
|
114
119
|
if (Object.keys(parserCore).length === 0) {
|
|
115
120
|
delete loadOptions.core;
|
|
116
121
|
}
|
|
117
122
|
}
|
|
118
|
-
const topLevelBaseUri = typeof loadOptions.baseUri === 'string' ? loadOptions.baseUri : undefined;
|
|
119
|
-
const topLevelBaseUrl = typeof loadOptions.baseUrl === 'string' ? loadOptions.baseUrl : undefined;
|
|
120
|
-
if (topLevelBaseUri !== undefined || topLevelBaseUrl !== undefined) {
|
|
121
|
-
loadOptions.core ||= {};
|
|
122
|
-
if (loadOptions.core.baseUrl === undefined) {
|
|
123
|
-
loadOptions.core.baseUrl = topLevelBaseUrl ?? topLevelBaseUri;
|
|
124
|
-
}
|
|
125
|
-
delete loadOptions.baseUri;
|
|
126
|
-
delete loadOptions.baseUrl;
|
|
127
|
-
}
|
|
128
123
|
return loadOptions;
|
|
129
124
|
}
|
|
130
125
|
/** Normalizes arbitrary thrown values to `Error` instances for source-level reporting. */
|
|
@@ -139,7 +134,51 @@ function normalizeError(error, message) {
|
|
|
139
134
|
}
|
|
140
135
|
function unavailableCoreApiMethod(methodName) {
|
|
141
136
|
return () => {
|
|
142
|
-
throw new Error(`CoreAPI.${methodName} is unavailable. Use @loaders.gl/core.
|
|
137
|
+
throw new Error(`CoreAPI.${methodName} is unavailable. Use @loaders.gl/core.createDataSourceSync().`);
|
|
143
138
|
};
|
|
144
139
|
}
|
|
140
|
+
/** Derives a stable identifier from explicit options or already available data metadata. */
|
|
141
|
+
function getDataSourceName(data, options) {
|
|
142
|
+
const explicitName = options.core?.name;
|
|
143
|
+
if (explicitName !== undefined) {
|
|
144
|
+
if (typeof explicitName !== 'string' || !explicitName.trim())
|
|
145
|
+
throw new Error('Data source name must be a non-empty string.');
|
|
146
|
+
return explicitName;
|
|
147
|
+
}
|
|
148
|
+
if (data && typeof data === 'object') {
|
|
149
|
+
const named = data;
|
|
150
|
+
if (typeof named.name === 'string' && named.name.trim())
|
|
151
|
+
return data instanceof Blob ? removeFileExtension(named.name) : named.name;
|
|
152
|
+
const metadata = named.schema?.metadata;
|
|
153
|
+
const embeddedName = metadata instanceof Map ? metadata.get('name') : metadata?.name;
|
|
154
|
+
if (typeof embeddedName === 'string' && embeddedName.trim())
|
|
155
|
+
return embeddedName;
|
|
156
|
+
}
|
|
157
|
+
if (typeof data === 'string') {
|
|
158
|
+
try {
|
|
159
|
+
const url = new URL(data.replace(/\\/g, '/'), 'https://source.invalid/');
|
|
160
|
+
if (!['data:', 'blob:'].includes(url.protocol)) {
|
|
161
|
+
let basename = url.pathname.split('/').filter(Boolean).pop();
|
|
162
|
+
if (basename) {
|
|
163
|
+
try {
|
|
164
|
+
basename = decodeURIComponent(basename);
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
/* Keep malformed encoded names literal. */
|
|
168
|
+
}
|
|
169
|
+
return removeFileExtension(basename);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
/* Invalid URLs still receive a source-type fallback name. */
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return options.core?.type && options.core.type !== 'auto' ? options.core.type : 'source';
|
|
178
|
+
}
|
|
179
|
+
/** Removes a filename suffix without erasing a hidden filename. */
|
|
180
|
+
function removeFileExtension(name) {
|
|
181
|
+
const extension = name.lastIndexOf('.');
|
|
182
|
+
return extension > 0 ? name.slice(0, extension) : name;
|
|
183
|
+
}
|
|
145
184
|
//# sourceMappingURL=data-source.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-source.js","sourceRoot":"","sources":["../../../../src/loader-utils/lib/sources/data-source.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAKpC,OAAO,EAAC,YAAY,EAAC,yCAAsC;AAC3D,OAAO,EAAC,WAAW,EAAC,sCAAmC;AACvD,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"data-source.js","sourceRoot":"","sources":["../../../../src/loader-utils/lib/sources/data-source.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAKpC,OAAO,EAAC,YAAY,EAAC,yCAAsC;AAC3D,OAAO,EAAC,WAAW,EAAC,sCAAmC;AACvD,OAAO,EAAC,YAAY,EAAC,4BAAyB;AAC9C,OAAO,EAAC,qBAAqB,EAAC,gDAA6C;AAC3E,OAAO,EAAC,4BAA4B,EAAC,2CAAwC;AA+D7E,MAAM,oBAAoB,GAAY;IACpC,SAAS,EAAE,wBAAwB,CAAC,WAAW,CAAC;IAChD,KAAK,EAAE,wBAAwB,CAAC,OAAO,CAAC;IACxC,SAAS,EAAE,wBAAwB,CAAC,WAAW,CAAC;IAChD,SAAS,EAAE,wBAAwB,CAAC,WAAW,CAAC;IAChD,cAAc,EAAE,wBAAwB,CAAC,gBAAgB,CAAC;IAC1D,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC;IACtC,aAAa,EAAE,wBAAwB,CAAC,eAAe,CAAC;CACzD,CAAC;AAEF,qCAAqC;AACrC,MAAM,OAAgB,UAAU;IAC9B,MAAM,CAAC,cAAc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oader will normalize the response to the WMS `GetCapabilities`
|
|
14
14
|
* data structure extracted from WMS XML response into an ImageSourceMetadata.
|
|
15
15
|
*/
|
|
16
16
|
export type ImageSourceMetadata = {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ArrowTable, Schema } from '@loaders.gl/core/schema';
|
|
2
|
+
import type { TableScanSource } from "../scan-utils/scan-query-metadata.js";
|
|
3
|
+
/** Source exposing named tables. Returned handles remain owned by the source or caller. */
|
|
4
|
+
export interface TableSourceCollection {
|
|
5
|
+
/** Resolves one table without loading unrelated tables. */
|
|
6
|
+
getTable(name: string, options?: {
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
}): ArrowTable | TableScanSource | Promise<ArrowTable | TableScanSource>;
|
|
9
|
+
}
|
|
10
|
+
/** Metadata for one named table without reading its result rows. */
|
|
11
|
+
export type TableMetadata = Readonly<{
|
|
12
|
+
/** Unique loaded table name within its parent source. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Already available schema; table listings may omit it for lazy discovery. */
|
|
15
|
+
schema?: Schema;
|
|
16
|
+
/** Whether the source exposes this table through the common query contract. */
|
|
17
|
+
queryable?: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
/** Metadata-only discovery implemented by sources exposing multiple tables. */
|
|
20
|
+
export interface TableDiscoverySource {
|
|
21
|
+
/** Lists table names without opening their row readers. */
|
|
22
|
+
getTablesMetadata(options?: {
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
}): readonly TableMetadata[] | Promise<readonly TableMetadata[]>;
|
|
25
|
+
/** Discovers one table schema without materializing its rows. */
|
|
26
|
+
getTableMetadata?(name: string, options?: {
|
|
27
|
+
signal?: AbortSignal;
|
|
28
|
+
}): TableMetadata | Promise<TableMetadata>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=table-source-collection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-source-collection.d.ts","sourceRoot":"","sources":["../../../../src/loader-utils/lib/sources/table-source-collection.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAC,eAAe,EAAC,6CAA0C;AAEvE,2FAA2F;AAC3F,MAAM,WAAW,qBAAqB;IACpC,2DAA2D;IAC3D,QAAQ,CACN,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAC,GAC/B,UAAU,GAAG,eAAe,GAAG,OAAO,CAAC,UAAU,GAAG,eAAe,CAAC,CAAC;CACzE;AAED,oEAAoE;AACpE,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH,+EAA+E;AAC/E,MAAM,WAAW,oBAAoB;IACnC,2DAA2D;IAC3D,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC1B,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,GAAG,SAAS,aAAa,EAAE,GAAG,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC,CAAC;IACjE,iEAAiE;IACjE,gBAAgB,CAAC,CACf,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAC,GAC/B,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-source-collection.js","sourceRoot":"","sources":["../../../../src/loader-utils/lib/sources/table-source-collection.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/loader-utils/lib/sources/utils/utils.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,qBAAqB,EAAC,mDAAgD;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAuB;IACtD,OAAO,qBAAqB,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,KAAY;IAEZ,mBAAmB;IACnB,OAAO;QACL,gBAAgB;QAChB,GAAG,KAAK;QACR,WAAW,EAAE;YACX,GAAG,KAAK,CAAC,WAAW;YACpB,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/loader-utils/lib/sources/utils/utils.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,qBAAqB,EAAC,mDAAgD;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAuB;IACtD,OAAO,qBAAqB,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,KAAY;IAEZ,mBAAmB;IACnB,OAAO;QACL,gBAAgB;QAChB,GAAG,KAAK;QACR,WAAW,EAAE;YACX,GAAG,KAAK,CAAC,WAAW;YACpB,IAAI,EAAE,EAAC,GAAG,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,EAAC;SAC/E;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Table as ArrowTable } from 'apache-arrow';
|
|
2
|
+
import type { BinaryFeatureCollection, GeoArrowEncodingPreference, GeoJSONTable, Schema } from '@loaders.gl/core/schema';
|
|
2
3
|
import type { CRSIdentifier, SpatialReference } from '@math.gl/geospatial/crs';
|
|
3
4
|
export type VectorSourceProps = {};
|
|
4
5
|
/** Valid vector-source response tables. */
|
|
@@ -19,7 +20,7 @@ export interface VectorSource {
|
|
|
19
20
|
/**
|
|
20
21
|
* Normalized capabilities of an Image service
|
|
21
22
|
* @example
|
|
22
|
-
* The
|
|
23
|
+
* The WMSLoader will normalize the response to the WMS `GetCapabilities`
|
|
23
24
|
* data structure extracted from WMS XML response into an VectorSourceMetadata.
|
|
24
25
|
*/
|
|
25
26
|
export type VectorSourceMetadata = {
|
|
@@ -63,7 +64,7 @@ export type GetFeaturesParameters = {
|
|
|
63
64
|
requestCrs?: CRSIdentifier;
|
|
64
65
|
/**
|
|
65
66
|
* Requested feature encoding for the returned table.
|
|
66
|
-
* `arrow` returns a
|
|
67
|
+
* `arrow` returns a native Apache Arrow `Table`.
|
|
67
68
|
*/
|
|
68
69
|
format?: 'geojson' | 'binary' | 'arrow';
|
|
69
70
|
/** Preferred GeoArrow encoding when `format` is `arrow`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector-source.d.ts","sourceRoot":"","sources":["../../../../src/loader-utils/lib/sources/vector-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"vector-source.d.ts","sourceRoot":"","sources":["../../../../src/loader-utils/lib/sources/vector-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,KAAK,IAAI,UAAU,EAAC,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,YAAY,EACZ,MAAM,EACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAE7E,MAAM,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEnC,2CAA2C;AAC3C,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,uBAAuB,GAAG,UAAU,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