@loaders.gl/core 5.0.0-beta.8 → 5.0.0-rc.1
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 +6 -0
- package/SCAN-README.md +2 -2
- package/SCHEMA-UTILS-README.md +1 -1
- package/dist/arrow-geometry/binary-features.cjs +4 -1
- package/dist/arrow-geometry/binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/binary-features.d.ts.map +1 -1
- package/dist/arrow-geometry/binary-features.js +1 -1
- package/dist/arrow-geometry/binary-features.js.map +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.map +2 -2
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts +4 -3
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js.map +1 -1
- package/dist/arrow-geometry/feature-table.cjs +2 -6
- package/dist/arrow-geometry/feature-table.cjs.map +2 -2
- package/dist/arrow-geometry/feature-table.d.ts +6 -5
- package/dist/arrow-geometry/feature-table.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-table.js +5 -9
- package/dist/arrow-geometry/feature-table.js.map +1 -1
- package/dist/arrow-geometry/geojson-table.cjs +270 -4
- package/dist/arrow-geometry/geojson-table.cjs.map +4 -4
- package/dist/arrow-geometry/geojson-table.d.ts +3 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +5 -4
- 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/legacy-binary/convert-flat-geojson-to-binary-features.cjs +3 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js +3 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.cjs +1 -5
- package/dist/arrow-geometry/wkb-arrow-utils.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts +7 -7
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.js +4 -8
- package/dist/arrow-geometry/wkb-arrow-utils.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 +59 -35
- package/dist/arrow-worker-transport.cjs.map +1 -1
- package/dist/arrow-worker-transport.d.ts +9 -7
- package/dist/arrow-worker-transport.d.ts.map +1 -1
- package/dist/arrow-worker-transport.js +59 -42
- package/dist/arrow-worker-transport.js.map +1 -1
- package/dist/cluster-source.cjs +198 -503
- package/dist/cluster-source.cjs.map +3 -3
- package/dist/dist.dev.js +211 -218
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +166 -531
- package/dist/federated-table-scan-source.cjs.map +3 -3
- 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 +16 -19
- package/dist/geoarrow/clustering/cluster-source.cjs.map +2 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts +3 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.js +13 -18
- package/dist/geoarrow/clustering/cluster-source.js.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.cjs +5 -12
- package/dist/geoarrow/convert-table-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts +6 -6
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.js +8 -14
- package/dist/geoarrow/convert-table-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.cjs.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-bounds.cjs +7 -7
- package/dist/geoarrow/geoarrow-bounds.cjs.map +3 -3
- 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 +13 -15
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +8 -11
- 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 +5 -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 +5 -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 +10 -11
- package/dist/geoarrow/geoarrow-stream.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-stream.js +9 -12
- 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/index.cjs +0 -3
- package/dist/geoarrow/index.cjs.map +2 -2
- package/dist/geoarrow/index.d.ts +0 -2
- package/dist/geoarrow/index.d.ts.map +1 -1
- package/dist/geoarrow/index.js +0 -1
- package/dist/geoarrow/index.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js +3 -3
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +5 -2
- 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.js +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs.map +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.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/kernels/geoarrow-union.cjs +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.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 +5 -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 +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +1 -1
- package/dist/index.cjs +203 -197
- 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 +7 -1
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +2 -2
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/load-loader.js +1 -1
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +13 -12
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/loader-options.d.ts +6 -0
- package/dist/lib/api/loader-options.d.ts.map +1 -1
- package/dist/lib/api/loader-options.js +48 -0
- package/dist/lib/api/loader-options.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +2 -5
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +55 -15
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +2 -5
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +2 -5
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +15 -24
- package/dist/lib/api/select-loader.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/native-arrow.d.ts +7 -5
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -1
- package/dist/lib/loader-utils/native-arrow.js +34 -20
- package/dist/lib/loader-utils/native-arrow.js.map +1 -1
- 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 +7 -8
- 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 +11 -105
- 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 +126 -58
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +7 -2
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +4 -2
- 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/log-utils/log.d.ts +0 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +2 -2
- 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/scan-query-metadata.d.ts +48 -3
- 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 +12 -1
- 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 +17 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- 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 +15 -14
- 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 +36 -22
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +0 -10
- 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 +2 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts +6 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.js +32 -14
- package/dist/loader-utils/lib/sources/tile-grid.js.map +1 -1
- 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 +4 -3
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.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 +12 -15
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +19 -67
- 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 +2 -0
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +4 -0
- package/dist/loader-utils/source-types.js.map +1 -1
- package/dist/loader-utils/tile-grid.cjs +21 -9
- package/dist/loader-utils/tile-grid.cjs.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 +1 -1
- package/dist/null-worker.js +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +32 -8
- package/dist/scan/arrow-execution/expressions.cjs.map +2 -2
- package/dist/scan/arrow-execution/expressions.d.ts +7 -4
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -1
- package/dist/scan/arrow-execution/expressions.js +32 -6
- package/dist/scan/arrow-execution/expressions.js.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +3 -18
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +2 -2
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.js +3 -9
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -1
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs +41 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs.map +7 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts +5 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts.map +1 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js +23 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js.map +1 -0
- package/dist/scan/arrow-query-worker-entry.cjs +121 -0
- package/dist/scan/arrow-query-worker-entry.cjs.map +7 -0
- package/dist/scan/arrow-query-worker-entry.d.ts +2 -0
- package/dist/scan/arrow-query-worker-entry.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker-entry.js +7 -0
- package/dist/scan/arrow-query-worker-entry.js.map +1 -0
- package/dist/scan/arrow-query-worker.cjs +197 -0
- package/dist/scan/arrow-query-worker.cjs.map +7 -0
- package/dist/scan/arrow-query-worker.d.ts +47 -0
- package/dist/scan/arrow-query-worker.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker.js +101 -0
- package/dist/scan/arrow-query-worker.js.map +1 -0
- package/dist/scan/arrow-query.cjs +6 -2
- package/dist/scan/arrow-query.cjs.map +2 -2
- package/dist/scan/arrow-query.d.ts +3 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/arrow-query.js +3 -1
- package/dist/scan/arrow-query.js.map +1 -1
- package/dist/scan/federated-table-scan-source.cjs +38 -39
- package/dist/scan/federated-table-scan-source.cjs.map +2 -2
- package/dist/scan/federated-table-scan-source.d.ts +5 -9
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -1
- package/dist/scan/federated-table-scan-source.js +35 -36
- package/dist/scan/federated-table-scan-source.js.map +1 -1
- package/dist/scan/index.cjs +15 -6
- package/dist/scan/index.cjs.map +3 -3
- package/dist/scan/index.d.ts +9 -5
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +7 -4
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +2 -2
- package/dist/scan/parse-sql-predicate.cjs.map +2 -2
- package/dist/scan/parse-sql-predicate.js +1 -1
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +60 -26
- package/dist/scan/query-arrow-table-in-batches.cjs.map +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.js +52 -24
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -1
- package/dist/{geoarrow/get-geoarrow-native-geometry.cjs → scan/query-arrow-table-math.cjs} +18 -8
- package/dist/scan/query-arrow-table-math.cjs.map +7 -0
- package/dist/scan/query-arrow-table-math.d.ts +5 -0
- package/dist/scan/query-arrow-table-math.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-math.js +14 -0
- package/dist/scan/query-arrow-table-math.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +32 -62
- package/dist/scan/query-arrow-table.cjs.map +2 -2
- package/dist/scan/query-arrow-table.d.ts +13 -8
- package/dist/scan/query-arrow-table.d.ts.map +1 -1
- package/dist/scan/query-arrow-table.js +35 -67
- package/dist/scan/query-arrow-table.js.map +1 -1
- package/dist/scan/query-grouped-sql.cjs +66 -0
- package/dist/scan/query-grouped-sql.cjs.map +7 -0
- package/dist/scan/query-grouped-sql.d.ts +5 -0
- package/dist/scan/query-grouped-sql.d.ts.map +1 -0
- package/dist/scan/query-grouped-sql.js +58 -0
- package/dist/scan/query-grouped-sql.js.map +1 -0
- 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 +7 -8
- package/dist/scan/query-progressive.cjs.map +2 -2
- package/dist/scan/query-progressive.d.ts +5 -3
- package/dist/scan/query-progressive.d.ts.map +1 -1
- package/dist/scan/query-progressive.js +7 -8
- package/dist/scan/query-progressive.js.map +1 -1
- 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 +133 -0
- package/dist/scan/query-pushdown.js.map +1 -0
- package/dist/scan/query-scales.cjs +195 -0
- package/dist/scan/query-scales.cjs.map +7 -0
- package/dist/scan/query-scales.d.ts +47 -0
- package/dist/scan/query-scales.d.ts.map +1 -0
- package/dist/scan/query-scales.js +201 -0
- package/dist/scan/query-scales.js.map +1 -0
- package/dist/scan/query.cjs +118 -103
- package/dist/scan/query.cjs.map +2 -2
- package/dist/scan/query.d.ts +29 -22
- package/dist/scan/query.d.ts.map +1 -1
- package/dist/scan/query.js +111 -111
- package/dist/scan/query.js.map +1 -1
- 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 +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 +1 -1
- package/dist/scan/scan-engine.js.map +1 -1
- package/dist/scan/vector-table-scan-source.cjs +24 -17
- package/dist/scan/vector-table-scan-source.cjs.map +4 -4
- package/dist/scan/vector-table-scan-source.d.ts +8 -8
- package/dist/scan/vector-table-scan-source.d.ts.map +1 -1
- package/dist/scan/vector-table-scan-source.js +19 -17
- package/dist/scan/vector-table-scan-source.js.map +1 -1
- package/dist/schema/categories/category-mesh.d.ts +3 -10
- package/dist/schema/categories/category-mesh.d.ts.map +1 -1
- package/dist/schema/categories/category-mesh.js.map +1 -1
- package/dist/schema/categories/category-table.d.ts +2 -19
- package/dist/schema/categories/category-table.d.ts.map +1 -1
- package/dist/schema/float16.js +1 -1
- package/dist/schema/float16.js.map +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -1
- package/dist/schema/geometry/geoarrow.d.ts +2 -2
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -1
- package/dist/schema/index.cjs +14 -10
- package/dist/schema/index.cjs.map +2 -2
- package/dist/schema/index.d.ts +4 -4
- 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/types/batch.d.ts +0 -4
- package/dist/schema/types/batch.d.ts.map +1 -1
- package/dist/schema-utils/index.cjs +623 -860
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -7
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -6
- package/dist/schema-utils/index.js.map +1 -1
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts +16 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js +109 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- 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 +8 -12
- 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 +8 -21
- 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 +5 -4
- 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 +18 -13
- 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.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/data-type.js +1 -1
- package/dist/schema-utils/lib/schema/data-type.js.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +2 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +3 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.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 +27 -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 +22 -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 +13 -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.d.ts +9 -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 -76
- 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/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 +36 -39
- 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 +1 -1
- 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 +8 -5
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +1 -3
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.js +0 -4
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -1
- package/dist/vector-table-scan-source.cjs +241 -292
- package/dist/vector-table-scan-source.cjs.map +2 -2
- package/dist/wkt/index.cjs.map +1 -1
- package/dist/wkt/index.d.ts.map +1 -1
- package/dist/wkt/index.js.map +1 -1
- package/dist/worker-utils/index.cjs +4 -4
- package/dist/worker-utils/index.cjs.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/npm-tag.d.ts.map +1 -1
- package/dist/worker-utils/lib/npm-tag.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +4 -1
- 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 +2 -2
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js.map +1 -1
- package/dist/worker-utils/null-worker.js.map +1 -1
- package/package.json +102 -13
- package/src/arrow-geometry/binary-features.ts +4 -1
- package/src/arrow-geometry/binary-geometry-to-wkb.ts +1 -1
- package/src/arrow-geometry/feature-collection-to-arrow.ts +4 -3
- package/src/arrow-geometry/feature-table.ts +8 -17
- package/src/arrow-geometry/geojson-table.ts +5 -4
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.ts +3 -1
- package/src/arrow-geometry/wkb-arrow-utils.ts +8 -12
- package/src/arrow-geometry/wkb-builder.ts +2 -2
- package/src/arrow-geometry/wkb-statistics.ts +2 -2
- package/src/arrow-worker-transport.ts +89 -50
- package/src/geoarrow/binary-polygon-to-geoarrow.ts +2 -2
- package/src/geoarrow/clustering/cluster-source.ts +20 -30
- package/src/geoarrow/convert-table-to-geoarrow.ts +14 -24
- package/src/geoarrow/geo-column/geo-column.ts +1 -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 +12 -15
- package/src/geoarrow/geoarrow-converter/convert-geoarrow.ts +14 -9
- package/src/geoarrow/geoarrow-converter/geoarrow-converter.ts +7 -6
- package/src/geoarrow/geoarrow-inspection.ts +2 -2
- package/src/geoarrow/geoarrow-stream.ts +15 -15
- package/src/geoarrow/get-geoarrow-vertex-count.ts +1 -1
- package/src/geoarrow/index.ts +0 -2
- package/src/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.ts +3 -3
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +5 -2
- package/src/geoarrow/lib/geoarrow/geoarrow-union-kind.ts +1 -1
- 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/kernels/geoarrow-union.ts +1 -1
- package/src/geoarrow/lib/table-converters/convert-geoarrow-table.ts +11 -11
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +2 -2
- package/src/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/geoarrow/mesharrow/get-deck-binary-data.ts +1 -1
- package/src/geoarrow/mesharrow/mesh-accessors.ts +1 -1
- package/src/index.ts +1 -5
- package/src/lib/api/create-data-source.ts +15 -3
- package/src/lib/api/load-loader.ts +1 -1
- package/src/lib/api/load.ts +21 -25
- package/src/lib/api/loader-options.ts +69 -0
- package/src/lib/api/parse-file.ts +2 -11
- package/src/lib/api/parse-in-batches.ts +81 -17
- package/src/lib/api/parse-sync.ts +3 -7
- package/src/lib/api/parse.ts +2 -6
- package/src/lib/api/select-loader.ts +15 -33
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/native-arrow.ts +38 -25
- package/src/lib/loader-utils/option-defaults.ts +7 -8
- package/src/lib/loader-utils/option-utils.ts +12 -112
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +17 -2
- package/src/loader-utils/lib/log-utils/log.ts +2 -5
- 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/scan-query-metadata.ts +68 -6
- package/src/loader-utils/lib/scan-utils/table-query.ts +18 -0
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +64 -43
- package/src/loader-utils/lib/sources/data-source.ts +0 -12
- package/src/loader-utils/lib/sources/image-source.ts +1 -1
- package/src/loader-utils/lib/sources/table-source-collection.ts +2 -1
- package/src/loader-utils/lib/sources/tile-grid.ts +34 -18
- 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 +4 -9
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +12 -18
- package/src/loader-utils/loader-types.ts +23 -69
- package/src/loader-utils/source-types.ts +5 -0
- package/src/null-loader.ts +1 -20
- package/src/scan/arrow-execution/expressions.ts +42 -7
- package/src/scan/arrow-execution/filter-arrow-table.ts +3 -18
- package/src/scan/arrow-execution/portable-predicate-compatibility.ts +27 -0
- package/src/scan/arrow-query-worker-entry.ts +8 -0
- package/src/scan/arrow-query-worker.ts +158 -0
- package/src/scan/arrow-query.ts +3 -1
- package/src/scan/federated-table-scan-source.ts +48 -59
- package/src/scan/index.ts +34 -10
- package/src/scan/parse-sql-predicate.ts +1 -1
- package/src/scan/query-arrow-table-in-batches.ts +62 -33
- package/src/scan/query-arrow-table-math.ts +23 -0
- package/src/scan/query-arrow-table.ts +62 -97
- package/src/scan/query-grouped-sql.ts +69 -0
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +12 -13
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +299 -0
- package/src/scan/query.ts +210 -165
- package/src/scan/rows-to-arrow.ts +3 -39
- package/src/scan/scan-engine.ts +7 -7
- package/src/scan/vector-table-scan-source.ts +25 -26
- package/src/schema/categories/category-mesh.ts +3 -11
- package/src/schema/categories/category-table.ts +2 -28
- package/src/schema/float16.ts +1 -1
- package/src/schema/geometry/arrow-binary-features.ts +1 -1
- package/src/schema/geometry/geoarrow.ts +2 -2
- package/src/schema/index.ts +4 -5
- package/src/schema/types/batch.ts +0 -5
- package/src/schema-utils/index.ts +20 -16
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +139 -0
- package/src/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.ts +1 -1
- 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 +15 -43
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +19 -16
- 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 +6 -5
- package/src/schema-utils/lib/schema/data-type.ts +1 -1
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +4 -2
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +10 -9
- 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 +38 -21
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +29 -19
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +26 -7
- package/src/schema-utils/lib/table/query-arrow-table.ts +14 -32
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +29 -96
- 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/table-accessors.ts +60 -63
- 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 +12 -9
- package/src/schema-utils/lib/table/tables/table-types.ts +1 -7
- package/src/wkt/index.ts +1 -1
- package/src/worker-utils/lib/npm-tag.ts +1 -1
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +7 -4
- package/dist/arrow-geometry/native-geometry.cjs +0 -215
- package/dist/arrow-geometry/native-geometry.cjs.map +0 -7
- package/dist/arrow-geometry/native-geometry.d.ts +0 -41
- package/dist/arrow-geometry/native-geometry.d.ts.map +0 -1
- package/dist/arrow-geometry/native-geometry.js +0 -224
- package/dist/arrow-geometry/native-geometry.js.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.cjs.map +0 -7
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts +0 -2
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.js +0 -5
- package/dist/geoarrow/get-geoarrow-native-geometry.js.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs +0 -290
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs.map +0 -7
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts +0 -16
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js +0 -334
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.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/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/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 +0 -5
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts +0 -28
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js +0 -26
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js.map +0 -1
- package/src/arrow-geometry/native-geometry.ts +0 -278
- package/src/geoarrow/get-geoarrow-native-geometry.ts +0 -8
- package/src/geoarrow/lib/kernels/encode-geoarrow-wkt.ts +0 -373
- 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/schema/deprecated/mesh-utils.ts +0 -46
- 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/schema-utils/lib/table/tables/convert-arrow-table-wrapper.ts +0 -58
package/dist/index.cjs
CHANGED
|
@@ -23,13 +23,13 @@ __export(index_exports, {
|
|
|
23
23
|
FetchError: () => FetchError,
|
|
24
24
|
JSONLoader: () => JSONLoader,
|
|
25
25
|
NullLoader: () => NullLoader,
|
|
26
|
-
NullWorkerLoader: () => NullWorkerLoader,
|
|
27
26
|
RequestScheduler: () => RequestScheduler,
|
|
28
27
|
_BrowserFileSystem: () => BrowserFileSystem,
|
|
29
28
|
_fetchProgress: () => fetchProgress,
|
|
30
29
|
_selectSource: () => selectSource,
|
|
31
30
|
_unregisterLoaders: () => _unregisterLoaders,
|
|
32
31
|
assert: () => assert,
|
|
32
|
+
compareLoaderOptions: () => compareLoaderOptions,
|
|
33
33
|
concatenateArrayBuffersAsync: () => concatenateArrayBuffersAsync,
|
|
34
34
|
coreApi: () => coreApi,
|
|
35
35
|
createDataSource: () => createDataSource,
|
|
@@ -152,7 +152,7 @@ function ignoreMessage() {
|
|
|
152
152
|
var nullLog = new NullLog();
|
|
153
153
|
function getLoaderLog(options) {
|
|
154
154
|
var _a;
|
|
155
|
-
const logger = (
|
|
155
|
+
const logger = (_a = options == null ? void 0 : options.core) == null ? void 0 : _a.log;
|
|
156
156
|
return logger === null ? nullLog : logger || log;
|
|
157
157
|
}
|
|
158
158
|
|
|
@@ -441,8 +441,8 @@ function getControls(options) {
|
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
443
|
function getParserOptions(options) {
|
|
444
|
-
const { signal, onProgress,
|
|
445
|
-
return getTransferListForWriter(parserOptions);
|
|
444
|
+
const { signal, onProgress, parserOptions, ...workerOptions } = options;
|
|
445
|
+
return getTransferListForWriter(parserOptions ?? workerOptions);
|
|
446
446
|
}
|
|
447
447
|
async function openSession(worker, options, context, jobContext) {
|
|
448
448
|
var _a, _b;
|
|
@@ -603,8 +603,7 @@ function canParseWithWorker(loader, options) {
|
|
|
603
603
|
(credential) => credential.type === "request" || "token" in credential && typeof credential.token === "function"
|
|
604
604
|
))
|
|
605
605
|
return false;
|
|
606
|
-
if (loader.id === "shapefile" &&
|
|
607
|
-
return false;
|
|
606
|
+
if (loader.id === "shapefile" && typeof ((_e = options == null ? void 0 : options.core) == null ? void 0 : _e.fetch) === "function") return false;
|
|
608
607
|
const workerOptions = getWorkerOptions(options);
|
|
609
608
|
const nodeWorkers = workerOptions._nodeWorkers;
|
|
610
609
|
if (!isBrowser2 && !nodeWorkers) {
|
|
@@ -757,13 +756,12 @@ function resolveWorkerLoaders(loader, loaderIds, loaderIsArray, context, options
|
|
|
757
756
|
}
|
|
758
757
|
}
|
|
759
758
|
function getWorkerOptions(options = {}, loader) {
|
|
760
|
-
var _a;
|
|
759
|
+
var _a, _b;
|
|
761
760
|
const portableOptions = ((_a = loader == null ? void 0 : loader.serializeWorkerOptions) == null ? void 0 : _a.call(loader, options)) || options;
|
|
762
761
|
const optionsToSerialize = {
|
|
763
762
|
...portableOptions,
|
|
764
763
|
signal: void 0,
|
|
765
764
|
onProgress: void 0,
|
|
766
|
-
log: isDisabledLog(portableOptions.log) ? null : void 0,
|
|
767
765
|
...portableOptions.core ? {
|
|
768
766
|
core: {
|
|
769
767
|
...portableOptions.core,
|
|
@@ -781,17 +779,17 @@ function getWorkerOptions(options = {}, loader) {
|
|
|
781
779
|
})
|
|
782
780
|
);
|
|
783
781
|
restoreBigIntOptions(optionsToSerialize, serializedOptions);
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
...serializedOptions
|
|
787
|
-
};
|
|
788
|
-
if (workerOptions.worker === "auto") {
|
|
789
|
-
workerOptions.worker = true;
|
|
782
|
+
if (((_b = serializedOptions.core) == null ? void 0 : _b.worker) === "auto") {
|
|
783
|
+
serializedOptions.core.worker = true;
|
|
790
784
|
}
|
|
791
785
|
if (loader) {
|
|
792
|
-
|
|
786
|
+
serializedOptions._workerLoaderId = loader.id;
|
|
793
787
|
}
|
|
794
|
-
return
|
|
788
|
+
return {
|
|
789
|
+
...serializedOptions,
|
|
790
|
+
...serializedOptions.core,
|
|
791
|
+
parserOptions: serializedOptions
|
|
792
|
+
};
|
|
795
793
|
}
|
|
796
794
|
function restoreBigIntOptions(original, serialized) {
|
|
797
795
|
if (!serialized || typeof serialized !== "object") return;
|
|
@@ -821,7 +819,7 @@ function getSerializableLoaderContext(context) {
|
|
|
821
819
|
function shouldParseCSVWithWorker(options) {
|
|
822
820
|
var _a, _b;
|
|
823
821
|
const csvOptions = options;
|
|
824
|
-
return (((_a = csvOptions == null ? void 0 : csvOptions.csv) == null ? void 0 : _a.shape) ?? ((_b = csvOptions == null ? void 0 : csvOptions.core) == null ? void 0 : _b.shape)) === "arrow
|
|
822
|
+
return (((_a = csvOptions == null ? void 0 : csvOptions.csv) == null ? void 0 : _a.shape) ?? ((_b = csvOptions == null ? void 0 : csvOptions.core) == null ? void 0 : _b.shape)) === "arrow";
|
|
825
823
|
}
|
|
826
824
|
function isLoaderWithWorkerResultDeserializer(loader) {
|
|
827
825
|
return typeof loader.deserializeWorkerResult === "function";
|
|
@@ -1745,11 +1743,50 @@ var NodeFileFacade = class {
|
|
|
1745
1743
|
}
|
|
1746
1744
|
};
|
|
1747
1745
|
|
|
1748
|
-
// src/loader-utils/
|
|
1749
|
-
function
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1746
|
+
// src/loader-utils/lib/pace-batch-iterator.ts
|
|
1747
|
+
function validateBatchDeliveryRate(rate) {
|
|
1748
|
+
if (!Number.isFinite(rate) || rate < 0) {
|
|
1749
|
+
throw new RangeError("core.batchMaxRowsPerSecond must be a finite nonnegative number");
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
async function* paceBatchIterator(batches, { batchMaxRowsPerSecond = 0, getRowCount, signal }) {
|
|
1753
|
+
validateBatchDeliveryRate(batchMaxRowsPerSecond);
|
|
1754
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1755
|
+
if (batchMaxRowsPerSecond === 0) {
|
|
1756
|
+
yield* batches;
|
|
1757
|
+
return;
|
|
1758
|
+
}
|
|
1759
|
+
let deadline = 0;
|
|
1760
|
+
for await (const batch of batches) {
|
|
1761
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1762
|
+
const rowCount = getRowCount(batch);
|
|
1763
|
+
if (rowCount !== void 0 && rowCount > 0) {
|
|
1764
|
+
let remaining = deadline - performance.now();
|
|
1765
|
+
while (remaining > 0) {
|
|
1766
|
+
await waitForBatch(Math.min(Math.ceil(remaining), 2 ** 31 - 1), signal);
|
|
1767
|
+
remaining = deadline - performance.now();
|
|
1768
|
+
}
|
|
1769
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1770
|
+
deadline = performance.now() + rowCount / batchMaxRowsPerSecond * 1e3;
|
|
1771
|
+
}
|
|
1772
|
+
yield batch;
|
|
1773
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
function waitForBatch(delay, signal) {
|
|
1777
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1778
|
+
return new Promise((resolve2, reject) => {
|
|
1779
|
+
const timer = setTimeout(() => {
|
|
1780
|
+
signal == null ? void 0 : signal.removeEventListener("abort", abort);
|
|
1781
|
+
resolve2();
|
|
1782
|
+
}, delay);
|
|
1783
|
+
function abort() {
|
|
1784
|
+
clearTimeout(timer);
|
|
1785
|
+
signal == null ? void 0 : signal.removeEventListener("abort", abort);
|
|
1786
|
+
reject(signal == null ? void 0 : signal.reason);
|
|
1787
|
+
}
|
|
1788
|
+
signal == null ? void 0 : signal.addEventListener("abort", abort, { once: true });
|
|
1789
|
+
});
|
|
1753
1790
|
}
|
|
1754
1791
|
|
|
1755
1792
|
// dist/lib/fetch/fetch-error.js
|
|
@@ -1980,7 +2017,7 @@ var import_log6 = require("probe.gl/log");
|
|
|
1980
2017
|
|
|
1981
2018
|
// dist/loader-utils/lib/log-utils/log.js
|
|
1982
2019
|
var import_log5 = require("probe.gl/log");
|
|
1983
|
-
var VERSION4 = true ? "5.0.0-
|
|
2020
|
+
var VERSION4 = true ? "5.0.0-rc.1" : "latest";
|
|
1984
2021
|
var version2 = VERSION4[0] >= "0" && VERSION4[0] <= "9" ? `v${VERSION4}` : "";
|
|
1985
2022
|
function createLog2() {
|
|
1986
2023
|
const log3 = new import_log5.Log({ id: "loaders.gl" });
|
|
@@ -2048,18 +2085,17 @@ var DEFAULT_LOADER_OPTIONS = {
|
|
|
2048
2085
|
// By default do not support node workers
|
|
2049
2086
|
_workerType: "",
|
|
2050
2087
|
// 'test' to use locally generated workers
|
|
2051
|
-
limit: 0,
|
|
2052
|
-
_limitMB: 0,
|
|
2053
2088
|
batchSize: "auto",
|
|
2054
|
-
|
|
2089
|
+
batchMaxRowsPerSecond: 0,
|
|
2055
2090
|
metadata: false,
|
|
2056
2091
|
// TODO - currently only implemented for parseInBatches, adds initial metadata batch,
|
|
2057
2092
|
transforms: []
|
|
2058
2093
|
}
|
|
2059
2094
|
};
|
|
2060
2095
|
var REMOVED_LOADER_OPTIONS = {
|
|
2061
|
-
//
|
|
2096
|
+
// Removed top-level aliases
|
|
2062
2097
|
baseUri: "core.baseUrl",
|
|
2098
|
+
baseUrl: "core.baseUrl",
|
|
2063
2099
|
fetch: "core.fetch",
|
|
2064
2100
|
mimeType: "core.mimeType",
|
|
2065
2101
|
fallbackMimeType: "core.fallbackMimeType",
|
|
@@ -2069,17 +2105,17 @@ var REMOVED_LOADER_OPTIONS = {
|
|
|
2069
2105
|
useLocalLibraries: "core.useLocalLibraries",
|
|
2070
2106
|
CDN: "core.CDN",
|
|
2071
2107
|
worker: "core.worker",
|
|
2108
|
+
workerThreshold: "core.workerThreshold",
|
|
2109
|
+
workerTransferBufferCopy: "core.workerTransferBufferCopy",
|
|
2072
2110
|
maxConcurrency: "core.maxConcurrency",
|
|
2073
2111
|
maxMobileConcurrency: "core.maxMobileConcurrency",
|
|
2074
2112
|
reuseWorkers: "core.reuseWorkers",
|
|
2075
|
-
_nodeWorkers: "core.
|
|
2113
|
+
_nodeWorkers: "core._nodeWorkers",
|
|
2076
2114
|
_workerType: "core._workerType",
|
|
2077
2115
|
_worker: "core._workerType",
|
|
2078
|
-
limit: "core.limit",
|
|
2079
|
-
_limitMB: "core._limitMB",
|
|
2080
2116
|
shape: "core.shape",
|
|
2081
2117
|
batchSize: "core.batchSize",
|
|
2082
|
-
batchDebounceMs: "core.
|
|
2118
|
+
batchDebounceMs: "(removed; use core.batchMaxRowsPerSecond)",
|
|
2083
2119
|
metadata: "core.metadata",
|
|
2084
2120
|
transforms: "core.transforms",
|
|
2085
2121
|
// Older deprecations
|
|
@@ -2110,66 +2146,41 @@ function getShapeOptionKey(loader) {
|
|
|
2110
2146
|
});
|
|
2111
2147
|
return keys.includes(loader.id) ? loader.id : keys.length === 1 ? keys[0] : void 0;
|
|
2112
2148
|
}
|
|
2113
|
-
function
|
|
2114
|
-
var _a
|
|
2149
|
+
function usesNativeArrowBatches(loader, options) {
|
|
2150
|
+
var _a;
|
|
2115
2151
|
const key = getShapeOptionKey(loader);
|
|
2116
2152
|
const scopedOptions = key && options[key];
|
|
2117
2153
|
if (!scopedOptions || typeof scopedOptions !== "object" || !("shape" in scopedOptions) || scopedOptions.shape !== "arrow") {
|
|
2118
|
-
return
|
|
2154
|
+
return false;
|
|
2119
2155
|
}
|
|
2120
|
-
if (
|
|
2121
|
-
throw new Error('shape: "arrow" does not support core.metadata
|
|
2156
|
+
if ((_a = options.core) == null ? void 0 : _a.metadata) {
|
|
2157
|
+
throw new Error('shape: "arrow" carries metadata in the Arrow schema and does not support core.metadata envelopes');
|
|
2122
2158
|
}
|
|
2123
|
-
return
|
|
2124
|
-
...options,
|
|
2125
|
-
core: { ...options.core, ...((_b = options.core) == null ? void 0 : _b.shape) === "arrow" ? { shape: "arrow-table" } : {} },
|
|
2126
|
-
[key]: { ...scopedOptions, shape: "arrow-table" }
|
|
2127
|
-
};
|
|
2128
|
-
}
|
|
2129
|
-
function unwrapArrowTable(result) {
|
|
2130
|
-
const table = result;
|
|
2131
|
-
if ((table == null ? void 0 : table.shape) !== "arrow-table" || !table.data || !Array.isArray(table.data.batches)) {
|
|
2132
|
-
throw new Error('shape: "arrow" requires a loader that supports "arrow-table" output');
|
|
2133
|
-
}
|
|
2134
|
-
return table.data;
|
|
2159
|
+
return true;
|
|
2135
2160
|
}
|
|
2136
|
-
async function*
|
|
2161
|
+
async function* normalizeNativeArrowBatches(batches) {
|
|
2137
2162
|
for await (const batch of batches) {
|
|
2138
2163
|
const batchType = batch == null ? void 0 : batch.batchType;
|
|
2139
2164
|
if (batchType === "metadata" || batchType === "partial-result" || batchType === "final-result") {
|
|
2140
2165
|
continue;
|
|
2141
2166
|
}
|
|
2142
|
-
|
|
2167
|
+
if (isArrowRecordBatch(batch)) {
|
|
2168
|
+
yield batch;
|
|
2169
|
+
} else if (isArrowTable(batch)) {
|
|
2170
|
+
yield* batch.batches;
|
|
2171
|
+
} else {
|
|
2172
|
+
throw new Error('shape: "arrow" requires a native Arrow table or record batch');
|
|
2173
|
+
}
|
|
2143
2174
|
}
|
|
2144
2175
|
}
|
|
2176
|
+
function isArrowTable(value) {
|
|
2177
|
+
return Boolean(value && typeof value === "object" && "schema" in value && "batches" in value && Array.isArray(value.batches) && "numRows" in value && typeof value.numRows === "number" && "getChildAt" in value && typeof value.getChildAt === "function");
|
|
2178
|
+
}
|
|
2179
|
+
function isArrowRecordBatch(value) {
|
|
2180
|
+
return Boolean(value && typeof value === "object" && value[/* @__PURE__ */ Symbol.for("apache-arrow/RecordBatch")] === true);
|
|
2181
|
+
}
|
|
2145
2182
|
|
|
2146
2183
|
// dist/lib/loader-utils/option-utils.js
|
|
2147
|
-
var CORE_LOADER_OPTION_KEYS = [
|
|
2148
|
-
"baseUrl",
|
|
2149
|
-
"fetch",
|
|
2150
|
-
"mimeType",
|
|
2151
|
-
"fallbackMimeType",
|
|
2152
|
-
"ignoreRegisteredLoaders",
|
|
2153
|
-
"nothrow",
|
|
2154
|
-
"log",
|
|
2155
|
-
"useLocalLibraries",
|
|
2156
|
-
"CDN",
|
|
2157
|
-
"worker",
|
|
2158
|
-
"workerThreshold",
|
|
2159
|
-
"maxConcurrency",
|
|
2160
|
-
"maxMobileConcurrency",
|
|
2161
|
-
"reuseWorkers",
|
|
2162
|
-
"workerTransferBufferCopy",
|
|
2163
|
-
"_nodeWorkers",
|
|
2164
|
-
"_workerType",
|
|
2165
|
-
"limit",
|
|
2166
|
-
"_limitMB",
|
|
2167
|
-
"shape",
|
|
2168
|
-
"batchSize",
|
|
2169
|
-
"batchDebounceMs",
|
|
2170
|
-
"metadata",
|
|
2171
|
-
"transforms"
|
|
2172
|
-
];
|
|
2173
2184
|
function applySearchParamsToUrl(url, options) {
|
|
2174
2185
|
const searchParams = options == null ? void 0 : options.searchParams;
|
|
2175
2186
|
if (!searchParams || Object.keys(searchParams).length === 0 || /^(?:data|blob):/i.test(url)) {
|
|
@@ -2205,12 +2216,15 @@ function getGlobalLoaderOptions() {
|
|
|
2205
2216
|
...DEFAULT_LOADER_OPTIONS,
|
|
2206
2217
|
core: { ...DEFAULT_LOADER_OPTIONS.core }
|
|
2207
2218
|
};
|
|
2208
|
-
return
|
|
2219
|
+
return cloneLoaderOptions(state.globalOptions);
|
|
2209
2220
|
}
|
|
2210
2221
|
function setGlobalOptions(options) {
|
|
2211
2222
|
const state = getGlobalLoaderState();
|
|
2212
2223
|
const globalOptions = getGlobalLoaderOptions();
|
|
2213
|
-
|
|
2224
|
+
validateOptions(options, []);
|
|
2225
|
+
validateWorkerThreshold(options);
|
|
2226
|
+
mergeNestedFields(globalOptions, options);
|
|
2227
|
+
state.globalOptions = globalOptions;
|
|
2214
2228
|
registerJSModules(options.modules);
|
|
2215
2229
|
}
|
|
2216
2230
|
function normalizeOptions(options, loader, loaders, url) {
|
|
@@ -2218,23 +2232,10 @@ function normalizeOptions(options, loader, loaders, url) {
|
|
|
2218
2232
|
loaders = Array.isArray(loaders) ? loaders : [loaders];
|
|
2219
2233
|
validateOptions(options, loaders);
|
|
2220
2234
|
validateWorkerThreshold(options);
|
|
2221
|
-
const normalizedOptions =
|
|
2235
|
+
const normalizedOptions = normalizeOptionsInternal(loader, options, url);
|
|
2222
2236
|
validateWorkerThreshold(normalizedOptions);
|
|
2223
2237
|
return normalizedOptions;
|
|
2224
2238
|
}
|
|
2225
|
-
function normalizeLoaderOptions(options) {
|
|
2226
|
-
const normalized = cloneLoaderOptions(options);
|
|
2227
|
-
moveDeprecatedTopLevelOptionsToCore(normalized);
|
|
2228
|
-
for (const key of CORE_LOADER_OPTION_KEYS) {
|
|
2229
|
-
if (normalized.core && normalized.core[key] !== void 0) {
|
|
2230
|
-
delete normalized[key];
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
if (normalized.core && normalized.core._workerType !== void 0) {
|
|
2234
|
-
delete normalized._worker;
|
|
2235
|
-
}
|
|
2236
|
-
return normalized;
|
|
2237
|
-
}
|
|
2238
2239
|
function validateOptions(options, loaders) {
|
|
2239
2240
|
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
2240
2241
|
for (const loader of loaders) {
|
|
@@ -2256,9 +2257,9 @@ function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, l
|
|
|
2256
2257
|
const prefix = id ? `${id}.` : "";
|
|
2257
2258
|
for (const key in options) {
|
|
2258
2259
|
const isSubOptions = !id && isObject(options[key]);
|
|
2259
|
-
const
|
|
2260
|
+
const isLifecycleOption = !id && ["signal", "onProgress"].includes(key);
|
|
2260
2261
|
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
2261
|
-
if (!(key in defaultOptions) && !
|
|
2262
|
+
if (!(key in defaultOptions) && !isLifecycleOption && !isWorkerUrlOption) {
|
|
2262
2263
|
if (key in deprecatedOptions) {
|
|
2263
2264
|
if (log2.level > 0) {
|
|
2264
2265
|
log2.warn(`${loaderName} loader option '${prefix}${key}' no longer supported, use '${deprecatedOptions[key]}'`)();
|
|
@@ -2296,7 +2297,6 @@ function normalizeOptionsInternal(loader, options, url) {
|
|
|
2296
2297
|
if (loaderDefaultOptions.core) {
|
|
2297
2298
|
mergedOptions.core = { ...loaderDefaultOptions.core };
|
|
2298
2299
|
}
|
|
2299
|
-
moveDeprecatedTopLevelOptionsToCore(mergedOptions);
|
|
2300
2300
|
const shapeKey = loader.defaultShape && getShapeOptionKey(loader);
|
|
2301
2301
|
if (shapeKey) {
|
|
2302
2302
|
mergedOptions[shapeKey] = {
|
|
@@ -2304,15 +2304,13 @@ function normalizeOptionsInternal(loader, options, url) {
|
|
|
2304
2304
|
shape: loader.defaultShape
|
|
2305
2305
|
};
|
|
2306
2306
|
}
|
|
2307
|
-
mergeNestedFields(mergedOptions,
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
applyCoreShapeDefault(mergedOptions, userOptions, loader);
|
|
2307
|
+
mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
|
|
2308
|
+
mergeNestedFields(mergedOptions, options);
|
|
2309
|
+
applyCoreShapeDefault(mergedOptions, options, loader);
|
|
2311
2310
|
if (((_a = mergedOptions.core) == null ? void 0 : _a.log) === null) {
|
|
2312
2311
|
mergedOptions.core = { ...mergedOptions.core, log: getLoaderLog(mergedOptions) };
|
|
2313
2312
|
}
|
|
2314
2313
|
addUrlOptions(mergedOptions, url);
|
|
2315
|
-
addDeprecatedTopLevelOptions(mergedOptions);
|
|
2316
2314
|
return mergedOptions;
|
|
2317
2315
|
}
|
|
2318
2316
|
function applyCoreShapeDefault(mergedOptions, userOptions, loader) {
|
|
@@ -2376,41 +2374,46 @@ function cloneLoaderOptions(options) {
|
|
|
2376
2374
|
}
|
|
2377
2375
|
return clonedOptions;
|
|
2378
2376
|
}
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2377
|
+
|
|
2378
|
+
// dist/lib/api/loader-options.js
|
|
2379
|
+
function compareLoaderOptions(left, right) {
|
|
2380
|
+
return Object.is(left, right) || compareOptionValues(left, right, /* @__PURE__ */ new WeakMap());
|
|
2381
|
+
}
|
|
2382
|
+
function compareOptionValues(left, right, visited) {
|
|
2383
|
+
if (Object.is(left, right)) {
|
|
2384
|
+
return true;
|
|
2385
2385
|
}
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
options.core ||= {};
|
|
2389
|
-
const coreOptions = options.core;
|
|
2390
|
-
const coreRecord = coreOptions;
|
|
2391
|
-
if (coreRecord[key] === void 0) {
|
|
2392
|
-
coreRecord[key] = options[key];
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2386
|
+
if (!left || !right || typeof left !== "object" || typeof right !== "object") {
|
|
2387
|
+
return false;
|
|
2395
2388
|
}
|
|
2396
|
-
const
|
|
2397
|
-
if (
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2389
|
+
const leftPrototype = Object.getPrototypeOf(left);
|
|
2390
|
+
if (leftPrototype !== Object.getPrototypeOf(right)) {
|
|
2391
|
+
return false;
|
|
2392
|
+
}
|
|
2393
|
+
if (Array.isArray(left)) {
|
|
2394
|
+
if (!Array.isArray(right) || left.length !== right.length) {
|
|
2395
|
+
return false;
|
|
2401
2396
|
}
|
|
2397
|
+
} else if (leftPrototype !== Object.prototype && leftPrototype !== null) {
|
|
2398
|
+
return false;
|
|
2402
2399
|
}
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
if (!coreOptions) {
|
|
2407
|
-
return;
|
|
2400
|
+
let rightValues = visited.get(left);
|
|
2401
|
+
if (rightValues == null ? void 0 : rightValues.has(right)) {
|
|
2402
|
+
return true;
|
|
2408
2403
|
}
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
}
|
|
2404
|
+
if (!rightValues) {
|
|
2405
|
+
rightValues = /* @__PURE__ */ new WeakSet();
|
|
2406
|
+
visited.set(left, rightValues);
|
|
2413
2407
|
}
|
|
2408
|
+
rightValues.add(right);
|
|
2409
|
+
const leftKeys = getEnumerableKeys(left);
|
|
2410
|
+
const rightKeys = getEnumerableKeys(right);
|
|
2411
|
+
const leftOptions = left;
|
|
2412
|
+
const rightOptions = right;
|
|
2413
|
+
return leftKeys.length === rightKeys.length && leftKeys.every((key) => Object.prototype.propertyIsEnumerable.call(right, key) && compareOptionValues(leftOptions[key], rightOptions[key], visited));
|
|
2414
|
+
}
|
|
2415
|
+
function getEnumerableKeys(value) {
|
|
2416
|
+
return Reflect.ownKeys(value).filter((key) => Object.prototype.propertyIsEnumerable.call(value, key));
|
|
2414
2417
|
}
|
|
2415
2418
|
|
|
2416
2419
|
// dist/lib/loader-utils/normalize-loader.js
|
|
@@ -2472,11 +2475,10 @@ function _unregisterLoaders() {
|
|
|
2472
2475
|
// dist/lib/api/select-loader.js
|
|
2473
2476
|
var EXT_PATTERN = /\.([^.]+)$/;
|
|
2474
2477
|
async function selectLoader(data, loaders = [], options, context, operation = "parse") {
|
|
2478
|
+
var _a, _b;
|
|
2475
2479
|
if (!validHTTPResponse(data)) {
|
|
2476
2480
|
return null;
|
|
2477
2481
|
}
|
|
2478
|
-
const normalizedOptions = normalizeLoaderOptions(options || {});
|
|
2479
|
-
normalizedOptions.core ||= {};
|
|
2480
2482
|
if (loaders && !Array.isArray(loaders)) {
|
|
2481
2483
|
return normalizeLoader(loaders);
|
|
2482
2484
|
}
|
|
@@ -2484,18 +2486,18 @@ async function selectLoader(data, loaders = [], options, context, operation = "p
|
|
|
2484
2486
|
let initialBytes;
|
|
2485
2487
|
async function matchCandidates(candidates) {
|
|
2486
2488
|
normalizeLoaders(candidates);
|
|
2487
|
-
const loader2 = text !== null && selectLoaderInternal(text, candidates,
|
|
2489
|
+
const loader2 = text !== null && selectLoaderInternal(text, candidates, options, context, operation) || selectLoaderInternal(data, candidates, options, context, operation);
|
|
2488
2490
|
if (!loader2 && isBlob(data) && candidates.length) {
|
|
2489
2491
|
initialBytes ??= await data.slice(0, 10).arrayBuffer();
|
|
2490
|
-
return selectLoaderInternal(initialBytes, candidates,
|
|
2492
|
+
return selectLoaderInternal(initialBytes, candidates, options, context, operation);
|
|
2491
2493
|
}
|
|
2492
2494
|
return loader2;
|
|
2493
2495
|
}
|
|
2494
2496
|
let loader = await matchCandidates(loaders || []);
|
|
2495
|
-
if (!loader && !
|
|
2497
|
+
if (!loader && !((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.ignoreRegisteredLoaders)) {
|
|
2496
2498
|
loader = await matchCandidates(getRegisteredLoaders());
|
|
2497
2499
|
}
|
|
2498
|
-
if (!loader && !
|
|
2500
|
+
if (!loader && !((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.nothrow)) {
|
|
2499
2501
|
throw new Error(getNoValidLoaderMessage(data));
|
|
2500
2502
|
}
|
|
2501
2503
|
return loader;
|
|
@@ -2505,21 +2507,20 @@ function mayContainText(response) {
|
|
|
2505
2507
|
return Boolean(mimeType && (mimeType.startsWith("text/") || mimeType === "application/json" || mimeType.endsWith("+json")));
|
|
2506
2508
|
}
|
|
2507
2509
|
function selectLoaderSync(data, loaders = [], options, context, operation = "parse") {
|
|
2510
|
+
var _a, _b;
|
|
2508
2511
|
if (!validHTTPResponse(data)) {
|
|
2509
2512
|
return null;
|
|
2510
2513
|
}
|
|
2511
|
-
const normalizedOptions = normalizeLoaderOptions(options || {});
|
|
2512
|
-
normalizedOptions.core ||= {};
|
|
2513
2514
|
if (loaders && !Array.isArray(loaders)) {
|
|
2514
2515
|
return normalizeLoader(loaders);
|
|
2515
2516
|
}
|
|
2516
2517
|
const candidates = loaders || [];
|
|
2517
2518
|
normalizeLoaders(candidates);
|
|
2518
|
-
let loader = selectLoaderInternal(data, candidates,
|
|
2519
|
-
if (!loader && !
|
|
2520
|
-
loader = selectLoaderInternal(data, getRegisteredLoaders(),
|
|
2519
|
+
let loader = selectLoaderInternal(data, candidates, options, context, operation);
|
|
2520
|
+
if (!loader && !((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.ignoreRegisteredLoaders)) {
|
|
2521
|
+
loader = selectLoaderInternal(data, getRegisteredLoaders(), options, context, operation);
|
|
2521
2522
|
}
|
|
2522
|
-
if (!loader && !
|
|
2523
|
+
if (!loader && !((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.nothrow)) {
|
|
2523
2524
|
throw new Error(getNoValidLoaderMessage(data));
|
|
2524
2525
|
}
|
|
2525
2526
|
return loader;
|
|
@@ -2544,7 +2545,7 @@ function selectLoaderInternal(data, loaders, options, context, operation = "pars
|
|
|
2544
2545
|
loader = findSourceLoaderByTestURL(loaders, testUrl);
|
|
2545
2546
|
reason = loader ? `matched source url ${testUrl}` : "";
|
|
2546
2547
|
}
|
|
2547
|
-
const fallbackLoaders = operation === "source" && testUrl ? loaders.filter((candidate) => !
|
|
2548
|
+
const fallbackLoaders = operation === "source" && testUrl ? loaders.filter((candidate) => !candidate.testURL) : loaders;
|
|
2548
2549
|
loader = loader || findLoaderByUrl(fallbackLoaders, testUrl);
|
|
2549
2550
|
reason = reason || (loader ? `matched url ${testUrl}` : "");
|
|
2550
2551
|
if (!loader && operation === "parse") {
|
|
@@ -2610,18 +2611,19 @@ function findLoaderByExtension(loaders, extension) {
|
|
|
2610
2611
|
}
|
|
2611
2612
|
function findSourceLoaderByType(loaders, type) {
|
|
2612
2613
|
for (const loader of loaders) {
|
|
2613
|
-
if (
|
|
2614
|
+
if ((loader.type ?? loader.id) === type) {
|
|
2614
2615
|
return loader;
|
|
2615
2616
|
}
|
|
2616
2617
|
}
|
|
2617
2618
|
return null;
|
|
2618
2619
|
}
|
|
2619
2620
|
function findSourceLoaderByTestURL(loaders, url) {
|
|
2621
|
+
var _a;
|
|
2620
2622
|
if (!url) {
|
|
2621
2623
|
return null;
|
|
2622
2624
|
}
|
|
2623
2625
|
for (const loader of loaders) {
|
|
2624
|
-
if (
|
|
2626
|
+
if ((_a = loader.testURL) == null ? void 0 : _a.call(loader, url)) {
|
|
2625
2627
|
return loader;
|
|
2626
2628
|
}
|
|
2627
2629
|
}
|
|
@@ -2630,7 +2632,7 @@ function findSourceLoaderByTestURL(loaders, url) {
|
|
|
2630
2632
|
function findSourceLoaderByTestData(loaders, data) {
|
|
2631
2633
|
var _a;
|
|
2632
2634
|
for (const loader of loaders) {
|
|
2633
|
-
if (
|
|
2635
|
+
if (loader.testData) {
|
|
2634
2636
|
if ((_a = loader.testData) == null ? void 0 : _a.call(loader, data)) {
|
|
2635
2637
|
return loader;
|
|
2636
2638
|
}
|
|
@@ -2964,7 +2966,7 @@ function getFetchFunction(options, context) {
|
|
|
2964
2966
|
var _a, _b, _c;
|
|
2965
2967
|
const globalOptions = getGlobalLoaderOptions();
|
|
2966
2968
|
const loaderOptions = options || globalOptions;
|
|
2967
|
-
const fetchOption =
|
|
2969
|
+
const fetchOption = (_a = loaderOptions.core) == null ? void 0 : _a.fetch;
|
|
2968
2970
|
let fetchFunction;
|
|
2969
2971
|
if (typeof fetchOption === "function") {
|
|
2970
2972
|
fetchFunction = fetchOption;
|
|
@@ -3056,7 +3058,7 @@ async function resolveLoaderImplementation(loader, options, url) {
|
|
|
3056
3058
|
}
|
|
3057
3059
|
function getLoaderImplementationSpecifier(loader, options) {
|
|
3058
3060
|
var _a;
|
|
3059
|
-
const workerType = (
|
|
3061
|
+
const workerType = (_a = options == null ? void 0 : options.core) == null ? void 0 : _a._workerType;
|
|
3060
3062
|
if (workerType === "test") {
|
|
3061
3063
|
const sourcePath = `modules/${loader.module}/src/${loader.id}-loader.ts`;
|
|
3062
3064
|
if (typeof window !== "undefined") {
|
|
@@ -3196,15 +3198,13 @@ async function parseFile(file, loaders, options, context) {
|
|
|
3196
3198
|
const normalizedOptions = normalizeOptions(options, loader, candidateLoaders, url);
|
|
3197
3199
|
const authenticationLoader = !loader.getAuthentications && ((_c = (_b = normalizedOptions.core) == null ? void 0 : _b.credentials) == null ? void 0 : _c.length) ? await getLoaderImplementation(loader, normalizedOptions, url || (context == null ? void 0 : context.url)) : loader;
|
|
3198
3200
|
const strictOptions = await resolveLoaderAuthenticationOptions(authenticationLoader, url, normalizedOptions);
|
|
3199
|
-
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, false);
|
|
3200
3201
|
context = getLoaderContext(
|
|
3201
3202
|
// @ts-expect-error candidateLoaders may be a single forced loader
|
|
3202
3203
|
{ url, _parse: parse, loaders: candidateLoaders },
|
|
3203
|
-
|
|
3204
|
+
strictOptions,
|
|
3204
3205
|
context || null
|
|
3205
3206
|
);
|
|
3206
|
-
|
|
3207
|
-
return nativeArrowOptions ? unwrapArrowTable(result) : result;
|
|
3207
|
+
return parseFileWithLoader(loader, file, strictOptions, context);
|
|
3208
3208
|
}
|
|
3209
3209
|
async function parseFileWithLoader(loader, file, options, context) {
|
|
3210
3210
|
var _a, _b;
|
|
@@ -3251,11 +3251,9 @@ function parseSync(data, loaders, options, context) {
|
|
|
3251
3251
|
const parse2 = () => {
|
|
3252
3252
|
throw new Error("parseSync called parse (which is async");
|
|
3253
3253
|
};
|
|
3254
|
-
|
|
3255
|
-
context = getLoaderContext({ url, _parseSync: parse2, _parse: parse2, loaders }, nativeArrowOptions || strictOptions, context || null);
|
|
3254
|
+
context = getLoaderContext({ url, _parseSync: parse2, _parse: parse2, loaders }, strictOptions, context || null);
|
|
3256
3255
|
const loaderWithParser = getLoaderImplementationSync(loader);
|
|
3257
|
-
|
|
3258
|
-
return nativeArrowOptions ? unwrapArrowTable(result) : result;
|
|
3256
|
+
return parseWithLoaderSync(loaderWithParser || loader, data, strictOptions, context);
|
|
3259
3257
|
}
|
|
3260
3258
|
function parseWithLoaderSync(loader, data, options, context) {
|
|
3261
3259
|
data = getArrayBufferOrStringFromDataSync(data, loader, options);
|
|
@@ -3295,17 +3293,28 @@ async function parseInBatches(data, loaders, options, context) {
|
|
|
3295
3293
|
const normalizedOptions = normalizeOptions(options, loader, loaderArray, url);
|
|
3296
3294
|
const authenticationLoader = !loader.getAuthentications && ((_d = (_c = normalizedOptions.core) == null ? void 0 : _c.credentials) == null ? void 0 : _d.length) ? await getLoaderImplementation(loader, normalizedOptions, url || (context == null ? void 0 : context.url)) : loader;
|
|
3297
3295
|
const strictOptions = await resolveLoaderAuthenticationOptions(authenticationLoader, url || "", normalizedOptions);
|
|
3298
|
-
const
|
|
3299
|
-
context = getLoaderContext({ url, _parseInBatches: parseInBatches, _parse: parse, loaders: loaderArray },
|
|
3296
|
+
const nativeArrow = usesNativeArrowBatches(loader, strictOptions);
|
|
3297
|
+
context = getLoaderContext({ url, _parseInBatches: parseInBatches, _parse: parse, loaders: loaderArray }, strictOptions, context || null);
|
|
3300
3298
|
const loaderWithParser = await getLoaderImplementation(loader, strictOptions, context.url);
|
|
3301
|
-
const batches = await parseWithLoaderInBatches(loader, loaderWithParser, data,
|
|
3302
|
-
return
|
|
3299
|
+
const batches = await parseWithLoaderInBatches(loader, loaderWithParser, data, strictOptions, context);
|
|
3300
|
+
return nativeArrow ? normalizeNativeArrowBatches(batches) : batches;
|
|
3303
3301
|
}
|
|
3304
3302
|
async function parseWithLoaderInBatches(originalLoader, loader, data, options, context) {
|
|
3305
3303
|
var _a, _b;
|
|
3306
|
-
const
|
|
3307
|
-
|
|
3308
|
-
|
|
3304
|
+
const { batchMaxRowsPerSecond = 0, batchSize } = options.core ?? {};
|
|
3305
|
+
validateBatchDeliveryRate(batchMaxRowsPerSecond);
|
|
3306
|
+
if (batchSize !== void 0 && batchSize !== "auto" && (!Number.isSafeInteger(batchSize) || batchSize < 1)) {
|
|
3307
|
+
throw new RangeError('core.batchSize must be a positive integer or "auto"');
|
|
3308
|
+
}
|
|
3309
|
+
const parserOptions = batchMaxRowsPerSecond ? { ...options, core: { ...options.core, batchMaxRowsPerSecond: 0 } } : options;
|
|
3310
|
+
const output = loader.parseInBatches ? (_a = loader.prepareParseBatchOutput) == null ? void 0 : _a.call(loader, parserOptions) : null;
|
|
3311
|
+
const decoded = await parseToOutputIterator(loader, data, (output == null ? void 0 : output.options) ?? parserOptions, context);
|
|
3312
|
+
const batches = output ? convertOutputBatches(decoded, output.convert) : decoded;
|
|
3313
|
+
const outputIterator = batchMaxRowsPerSecond ? paceBatchIterator(batches, {
|
|
3314
|
+
batchMaxRowsPerSecond,
|
|
3315
|
+
getRowCount: (batch) => getBatchRowCount(batch, loader.module),
|
|
3316
|
+
signal: options.signal ?? context.signal
|
|
3317
|
+
}) : batches;
|
|
3309
3318
|
if (!((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.metadata)) {
|
|
3310
3319
|
return outputIterator;
|
|
3311
3320
|
}
|
|
@@ -3352,6 +3361,10 @@ async function* parseChunkInBatches(transformedIterator, loader, options, contex
|
|
|
3352
3361
|
{ ...options, core: { ...options == null ? void 0 : options.core, mimeType: loader.mimeTypes[0] } },
|
|
3353
3362
|
context
|
|
3354
3363
|
);
|
|
3364
|
+
if (isArrowTable(parsedData)) {
|
|
3365
|
+
yield* parsedData.batches;
|
|
3366
|
+
return;
|
|
3367
|
+
}
|
|
3355
3368
|
const batch = convertDataToBatch(parsedData, loader);
|
|
3356
3369
|
yield batch;
|
|
3357
3370
|
}
|
|
@@ -3378,8 +3391,6 @@ function isTable(value) {
|
|
|
3378
3391
|
return Array.isArray(table.features);
|
|
3379
3392
|
case "columnar-table":
|
|
3380
3393
|
return Boolean(table.data && typeof table.data === "object");
|
|
3381
|
-
case "arrow-table":
|
|
3382
|
-
return Boolean(table.data && typeof table.data === "object" && "numRows" in table.data);
|
|
3383
3394
|
default:
|
|
3384
3395
|
return false;
|
|
3385
3396
|
}
|
|
@@ -3391,8 +3402,6 @@ function getTableLength(table) {
|
|
|
3391
3402
|
return table.data.length;
|
|
3392
3403
|
case "geojson-table":
|
|
3393
3404
|
return table.features.length;
|
|
3394
|
-
case "arrow-table":
|
|
3395
|
-
return table.data.numRows;
|
|
3396
3405
|
case "columnar-table":
|
|
3397
3406
|
for (const column of Object.values(table.data)) {
|
|
3398
3407
|
return column.length || 0;
|
|
@@ -3407,6 +3416,22 @@ async function applyInputTransforms(inputIterator, transforms = []) {
|
|
|
3407
3416
|
}
|
|
3408
3417
|
return iteratorChain;
|
|
3409
3418
|
}
|
|
3419
|
+
function getBatchRowCount(batch, module2) {
|
|
3420
|
+
var _a, _b, _c;
|
|
3421
|
+
if (!batch || typeof batch !== "object")
|
|
3422
|
+
return void 0;
|
|
3423
|
+
if (module2 === "geospatial" && Array.isArray(batch))
|
|
3424
|
+
return batch.length;
|
|
3425
|
+
const result = batch;
|
|
3426
|
+
if (module2 === "traces" && result.table !== void 0 && result.table !== "spans" && result.table !== "slices") {
|
|
3427
|
+
return void 0;
|
|
3428
|
+
}
|
|
3429
|
+
if (result.batchType !== void 0 && result.batchType !== "data")
|
|
3430
|
+
return void 0;
|
|
3431
|
+
if (result.shape === "unknown")
|
|
3432
|
+
return void 0;
|
|
3433
|
+
return ((_a = result.data) == null ? void 0 : _a.numRows) ?? result.numRows ?? ((_b = result.header) == null ? void 0 : _b.vertexCount) ?? ((_c = result.features) == null ? void 0 : _c.length) ?? result.length;
|
|
3434
|
+
}
|
|
3410
3435
|
|
|
3411
3436
|
// dist/lib/api/load.js
|
|
3412
3437
|
async function load(url, loaders, options, context) {
|
|
@@ -3427,18 +3452,17 @@ async function load(url, loaders, options, context) {
|
|
|
3427
3452
|
...resolvedOptions,
|
|
3428
3453
|
core: { ...resolvedOptions == null ? void 0 : resolvedOptions.core, nothrow: true }
|
|
3429
3454
|
});
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3455
|
+
const loaderImplementation = selectedLoader && (typeof url === "string" || selectedLoader.createDataSourceSync) ? await getLoaderImplementation(selectedLoader, resolvedOptions, typeof url === "string" ? url : void 0) : null;
|
|
3456
|
+
if (selectedLoader && (loaderImplementation == null ? void 0 : loaderImplementation.createDataSourceSync) && !isLoaderWithParser(loaderImplementation)) {
|
|
3457
|
+
throw new Error(`${selectedLoader.id} creates sources. Use createDataSource() instead of load().`);
|
|
3458
|
+
}
|
|
3459
|
+
if (selectedLoader && loaderImplementation && typeof url === "string") {
|
|
3435
3460
|
resolvedOptions = await resolveLoaderAuthenticationOptions(selectedLoader.getAuthentications ? selectedLoader : loaderImplementation, url, resolvedOptions || {});
|
|
3436
3461
|
const { parseUrl } = loaderImplementation;
|
|
3437
3462
|
if (parseUrl) {
|
|
3438
3463
|
const requestUrl = applySearchParamsToUrl(url, resolvedOptions);
|
|
3439
|
-
const
|
|
3440
|
-
|
|
3441
|
-
return nativeOptions ? unwrapArrowTable(result) : result;
|
|
3464
|
+
const options2 = normalizeOptions(resolvedOptions, selectedLoader, [selectedLoader], url);
|
|
3465
|
+
return parseUrl(requestUrl, options2, context);
|
|
3442
3466
|
}
|
|
3443
3467
|
}
|
|
3444
3468
|
}
|
|
@@ -3453,8 +3477,7 @@ async function load(url, loaders, options, context) {
|
|
|
3453
3477
|
data = await fetch2(url);
|
|
3454
3478
|
}
|
|
3455
3479
|
if (typeof url === "string") {
|
|
3456
|
-
|
|
3457
|
-
if (!((_a = normalizedOptions.core) == null ? void 0 : _a.baseUrl)) {
|
|
3480
|
+
if (!((_a = resolvedOptions == null ? void 0 : resolvedOptions.core) == null ? void 0 : _a.baseUrl)) {
|
|
3458
3481
|
resolvedOptions = {
|
|
3459
3482
|
...resolvedOptions,
|
|
3460
3483
|
core: {
|
|
@@ -3579,15 +3602,13 @@ async function parse(data, loaders, options, context) {
|
|
|
3579
3602
|
const normalizedOptions = normalizeOptions(options, loader, candidateLoaders, url);
|
|
3580
3603
|
const authenticationLoader = !loader.getAuthentications && ((_d = (_c = normalizedOptions.core) == null ? void 0 : _c.credentials) == null ? void 0 : _d.length) ? await getLoaderImplementation(loader, normalizedOptions, url || (context == null ? void 0 : context.url)) : loader;
|
|
3581
3604
|
const strictOptions = await resolveLoaderAuthenticationOptions(authenticationLoader, url || "", normalizedOptions);
|
|
3582
|
-
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, false);
|
|
3583
3605
|
context = getLoaderContext(
|
|
3584
3606
|
// @ts-expect-error
|
|
3585
3607
|
{ url, _parse: parse, loaders: candidateLoaders },
|
|
3586
|
-
|
|
3608
|
+
strictOptions,
|
|
3587
3609
|
context || null
|
|
3588
3610
|
);
|
|
3589
|
-
|
|
3590
|
-
return nativeArrowOptions ? unwrapArrowTable(result) : result;
|
|
3611
|
+
return parseWithLoader(loader, data, strictOptions, context);
|
|
3591
3612
|
}
|
|
3592
3613
|
async function parseWithLoader(loader, data, options, context) {
|
|
3593
3614
|
var _a, _b;
|
|
@@ -3819,7 +3840,7 @@ function getCandidates(loaders, options) {
|
|
|
3819
3840
|
var _a;
|
|
3820
3841
|
const candidates = Array.isArray(loaders) ? [...loaders] : [loaders];
|
|
3821
3842
|
const type = ((_a = options.core) == null ? void 0 : _a.type) || options.type;
|
|
3822
|
-
return candidates.length > 1 && type && type !== "auto" ? candidates.filter((loader) =>
|
|
3843
|
+
return candidates.length > 1 && type && type !== "auto" ? candidates.filter((loader) => (loader.type ?? loader.id) === type) : candidates;
|
|
3823
3844
|
}
|
|
3824
3845
|
function getSelectionOptions(options) {
|
|
3825
3846
|
return { ...options, core: { ...options.core, ignoreRegisteredLoaders: true, nothrow: true } };
|
|
@@ -3894,22 +3915,7 @@ function makeStream(source, options) {
|
|
|
3894
3915
|
}
|
|
3895
3916
|
|
|
3896
3917
|
// dist/null-loader.js
|
|
3897
|
-
var VERSION5 = true ? "5.0.0-
|
|
3898
|
-
var NullWorkerLoader = {
|
|
3899
|
-
dataType: null,
|
|
3900
|
-
batchType: null,
|
|
3901
|
-
name: "Null loader",
|
|
3902
|
-
id: "null",
|
|
3903
|
-
module: "core",
|
|
3904
|
-
version: VERSION5,
|
|
3905
|
-
worker: true,
|
|
3906
|
-
mimeTypes: ["application/x.empty"],
|
|
3907
|
-
extensions: ["null"],
|
|
3908
|
-
tests: [() => false],
|
|
3909
|
-
options: {
|
|
3910
|
-
null: {}
|
|
3911
|
-
}
|
|
3912
|
-
};
|
|
3918
|
+
var VERSION5 = true ? "5.0.0-rc.1" : "latest";
|
|
3913
3919
|
var NullLoader = {
|
|
3914
3920
|
dataType: null,
|
|
3915
3921
|
batchType: null,
|