@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/src/scan/scan-engine.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type {Table} from 'apache-arrow';
|
|
6
6
|
import {explainArrowTableQuery, queryArrowTable, type ArrowQueryOptions} from './query-arrow-table';
|
|
7
7
|
import {type SQLPredicate} from './sql-predicate-types';
|
|
8
8
|
import type {TableQueryExplain} from '@loaders.gl/core/loader-utils';
|
|
@@ -15,11 +15,11 @@ export type ScanBackend = Readonly<{
|
|
|
15
15
|
/** Stable backend name reported by the engine. */
|
|
16
16
|
name: ScanBackendName;
|
|
17
17
|
/** Executes a query over one in-memory Arrow table. */
|
|
18
|
-
query(sourceTable:
|
|
18
|
+
query(sourceTable: Table, options?: ArrowQueryOptions): Table;
|
|
19
19
|
/** Optional asynchronous execution hook for backends that compile or schedule work. */
|
|
20
|
-
queryAsync?: (sourceTable:
|
|
20
|
+
queryAsync?: (sourceTable: Table, options?: ArrowQueryOptions) => Promise<Table>;
|
|
21
21
|
/** Explains a query without evaluating table rows. */
|
|
22
|
-
explain(sourceTable:
|
|
22
|
+
explain(sourceTable: Table, options?: ArrowQueryOptions): TableQueryExplain<SQLPredicate>;
|
|
23
23
|
}>;
|
|
24
24
|
|
|
25
25
|
/** Lazy loader used to register an optional scan backend. */
|
|
@@ -34,7 +34,7 @@ export type ScanEngineOptions = Readonly<{
|
|
|
34
34
|
/** Stable application-facing scan engine returned by {@link createScanEngine}. */
|
|
35
35
|
export type ScanEngine = ScanBackend & {
|
|
36
36
|
/** Executes a query asynchronously, allowing backends to schedule remote or compiled work. */
|
|
37
|
-
queryAsync: (sourceTable:
|
|
37
|
+
queryAsync: (sourceTable: Table, options?: ArrowQueryOptions) => Promise<Table>;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
const scanBackends = new Map<ScanBackendName, ScanBackend | ScanBackendLoader>();
|
|
@@ -43,7 +43,7 @@ const arrowScanBackend: ScanBackend = Object.freeze({
|
|
|
43
43
|
name: 'arrow',
|
|
44
44
|
query: queryArrowTable,
|
|
45
45
|
queryAsync: (sourceTable, options) =>
|
|
46
|
-
Promise.resolve().then(queryArrowTable
|
|
46
|
+
Promise.resolve().then(() => queryArrowTable(sourceTable, options)),
|
|
47
47
|
explain: explainArrowTableQuery
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -90,7 +90,7 @@ export async function createScanEngine(options: ScanEngineOptions = {}): Promise
|
|
|
90
90
|
const explain = backend.explain.bind(backend);
|
|
91
91
|
const queryAsync = backend.queryAsync
|
|
92
92
|
? backend.queryAsync.bind(backend)
|
|
93
|
-
: async (sourceTable:
|
|
93
|
+
: async (sourceTable: Table, queryOptions?: ArrowQueryOptions) =>
|
|
94
94
|
backend.query.call(backend, sourceTable, queryOptions);
|
|
95
95
|
return Object.freeze({...backend, query, explain, queryAsync});
|
|
96
96
|
}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type {RecordBatch, Table} from 'apache-arrow';
|
|
6
|
+
import {makeArrowMetadataBatch} from '@loaders.gl/core/schema-utils';
|
|
7
|
+
import {isArrowTable} from '../lib/loader-utils/native-arrow';
|
|
6
8
|
import {convertArrowToSchema} from '@loaders.gl/core/schema-utils';
|
|
7
9
|
import type {
|
|
8
10
|
GetFeaturesParameters,
|
|
@@ -14,7 +16,7 @@ import type {
|
|
|
14
16
|
VectorSource,
|
|
15
17
|
VectorTileSource
|
|
16
18
|
} from '@loaders.gl/core/loader-utils';
|
|
17
|
-
import {createScanQueryMetadata
|
|
19
|
+
import {createScanQueryMetadata} from '@loaders.gl/core/loader-utils';
|
|
18
20
|
import {ARROW_TABLE_QUERY_CAPABILITIES} from './table-query-capabilities';
|
|
19
21
|
import {explainArrowTableQuery, queryArrowTable, type ArrowQueryOptions} from './query-arrow-table';
|
|
20
22
|
import {type SQLPredicate} from './sql-predicate-types';
|
|
@@ -59,7 +61,7 @@ export abstract class AddressedVectorTableScanSource {
|
|
|
59
61
|
/** Spatial extent of the bound physical selection. */
|
|
60
62
|
readonly spatial?: ScanSpatialMetadata;
|
|
61
63
|
|
|
62
|
-
private tablePromise: Promise<
|
|
64
|
+
private tablePromise: Promise<Table> | null = null;
|
|
63
65
|
|
|
64
66
|
/** Creates a table-scan view over one immutable physical selection. */
|
|
65
67
|
protected constructor(
|
|
@@ -77,12 +79,12 @@ export abstract class AddressedVectorTableScanSource {
|
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
/** Loads the physically addressed data as one Arrow table. */
|
|
80
|
-
protected abstract loadTable(signal?: AbortSignal): Promise<
|
|
82
|
+
protected abstract loadTable(signal?: AbortSignal): Promise<Table | null>;
|
|
81
83
|
|
|
82
84
|
/** Discovers the addressed result schema and portable residual-query capabilities. */
|
|
83
85
|
async getQueryMetadata(options: ScanQueryMetadataOptions = {}): Promise<ScanQueryMetadata> {
|
|
84
86
|
const table = await this.getTable(options.signal);
|
|
85
|
-
const schema =
|
|
87
|
+
const schema = convertArrowToSchema(table.schema);
|
|
86
88
|
return createScanQueryMetadata({
|
|
87
89
|
sourceType: this.sourceType,
|
|
88
90
|
queryType: 'table',
|
|
@@ -97,12 +99,12 @@ export abstract class AddressedVectorTableScanSource {
|
|
|
97
99
|
},
|
|
98
100
|
columnRoles: inferVectorColumnRoles(schema.fields.map(field => field.name)),
|
|
99
101
|
spatial: this.spatial,
|
|
100
|
-
statistics: {rowCount: table.
|
|
102
|
+
statistics: {rowCount: table.numRows}
|
|
101
103
|
});
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
/** Applies the portable Arrow query to the addressed feature table. */
|
|
105
|
-
async query(options: ArrowQueryOptions = {}): Promise<
|
|
107
|
+
async query(options: ArrowQueryOptions = {}): Promise<Table> {
|
|
106
108
|
const table = await this.getTable(options.signal);
|
|
107
109
|
return queryArrowTable(table, options);
|
|
108
110
|
}
|
|
@@ -114,18 +116,19 @@ export abstract class AddressedVectorTableScanSource {
|
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
/** Emits the portable query result as one bounded Arrow batch. */
|
|
117
|
-
async *read(options: ArrowQueryOptions = {}): AsyncIterableIterator<
|
|
118
|
-
const
|
|
119
|
-
|
|
119
|
+
async *read(options: ArrowQueryOptions = {}): AsyncIterableIterator<RecordBatch> {
|
|
120
|
+
const data = await this.query(options);
|
|
121
|
+
if (data.batches.length) yield* data.batches;
|
|
122
|
+
else yield makeArrowMetadataBatch(data.schema);
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
/** Scans the addressed query result through the same batch contract as `read()`. */
|
|
123
|
-
scan(options: ArrowQueryOptions = {}): AsyncIterableIterator<
|
|
126
|
+
scan(options: ArrowQueryOptions = {}): AsyncIterableIterator<RecordBatch> {
|
|
124
127
|
return this.read(options);
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
/** Resolves and caches the addressed table while allowing failed loads to be retried. */
|
|
128
|
-
private async getTable(signal?: AbortSignal): Promise<
|
|
131
|
+
private async getTable(signal?: AbortSignal): Promise<Table> {
|
|
129
132
|
throwIfAborted(signal);
|
|
130
133
|
if (!this.tablePromise) {
|
|
131
134
|
this.tablePromise = this.loadTable()
|
|
@@ -133,11 +136,6 @@ export abstract class AddressedVectorTableScanSource {
|
|
|
133
136
|
if (!table) {
|
|
134
137
|
throw new Error('The addressed vector selection did not return a feature table.');
|
|
135
138
|
}
|
|
136
|
-
if (table.shape !== 'arrow-table') {
|
|
137
|
-
throw new Error(
|
|
138
|
-
'The addressed vector selection must return an Arrow table. Configure the source with shape "arrow-table".'
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
139
|
return table;
|
|
142
140
|
})
|
|
143
141
|
.catch(error => {
|
|
@@ -152,7 +150,7 @@ export abstract class AddressedVectorTableScanSource {
|
|
|
152
150
|
/**
|
|
153
151
|
* Portable table-query view over one explicitly addressed vector tile.
|
|
154
152
|
*
|
|
155
|
-
* MVT and vector PMTiles sources participate when configured to return `shape: 'arrow
|
|
153
|
+
* MVT and vector PMTiles sources participate when configured to return `shape: 'arrow'`.
|
|
156
154
|
* Tile coordinates and layer selection remain source parameters rather than relational operators.
|
|
157
155
|
*/
|
|
158
156
|
export class VectorTileTableScanSource extends AddressedVectorTableScanSource {
|
|
@@ -180,8 +178,12 @@ export class VectorTileTableScanSource extends AddressedVectorTableScanSource {
|
|
|
180
178
|
}
|
|
181
179
|
|
|
182
180
|
/** Loads the bound vector tile using the source's requested Arrow output shape. */
|
|
183
|
-
protected loadTable(signal?: AbortSignal): Promise<
|
|
184
|
-
|
|
181
|
+
protected async loadTable(signal?: AbortSignal): Promise<Table | null> {
|
|
182
|
+
const tile = await this.source.getVectorTile({...this.tile, signal});
|
|
183
|
+
if (tile === null || isArrowTable(tile)) return tile;
|
|
184
|
+
throw new Error(
|
|
185
|
+
'The addressed vector selection must return an Arrow table. Configure the source with shape "arrow".'
|
|
186
|
+
);
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
|
|
@@ -225,12 +227,9 @@ export class VectorFeatureTableScanSource extends AddressedVectorTableScanSource
|
|
|
225
227
|
}
|
|
226
228
|
|
|
227
229
|
/** Loads the bound service request through the source's Arrow feature output. */
|
|
228
|
-
protected loadTable(signal?: AbortSignal): Promise<
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
format: 'arrow',
|
|
232
|
-
signal
|
|
233
|
-
}) as Promise<ArrowTable | null>;
|
|
230
|
+
protected async loadTable(signal?: AbortSignal): Promise<Table | null> {
|
|
231
|
+
const data = await this.source.getFeatures({...this.request, format: 'arrow', signal});
|
|
232
|
+
return isArrowTable(data) ? data : null;
|
|
234
233
|
}
|
|
235
234
|
}
|
|
236
235
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type {Schema} from '../types/schema';
|
|
6
6
|
import type {TypedArray} from '../types/types';
|
|
7
|
-
import type {ColumnarTable
|
|
7
|
+
import type {ColumnarTable} from './category-table';
|
|
8
8
|
import * as arrow from 'apache-arrow';
|
|
9
9
|
|
|
10
10
|
/** Mesh as columnar table */
|
|
@@ -14,16 +14,8 @@ export interface MeshTable extends ColumnarTable {
|
|
|
14
14
|
indices?: MeshAttribute;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
export
|
|
19
|
-
// shape: 'mesh-arrow-table';
|
|
20
|
-
/** Mesh topology represented by the Arrow table rows and indices. */
|
|
21
|
-
topology: MeshTopology;
|
|
22
|
-
/** Optional top-level primitive indices accessor for indexed meshes. */
|
|
23
|
-
indices?: MeshAttribute;
|
|
24
|
-
/** Raw Apache Arrow table data for Mesh or IndexedMesh columns. */
|
|
25
|
-
data: MeshArrowTableData | IndexedMeshArrowTableData;
|
|
26
|
-
}
|
|
17
|
+
/** Native Apache Arrow table carrying mesh columns and topology metadata. */
|
|
18
|
+
export type MeshArrowTable = arrow.Table;
|
|
27
19
|
|
|
28
20
|
/** Apache Arrow columns for a mesh vertex table. */
|
|
29
21
|
export type MeshArrowColumns = {
|
|
@@ -5,16 +5,9 @@
|
|
|
5
5
|
import type {Schema} from '../types/schema';
|
|
6
6
|
import type {Batch} from '../types/batch';
|
|
7
7
|
import type {Feature} from './category-gis';
|
|
8
|
-
import type * as arrow from 'apache-arrow';
|
|
9
8
|
|
|
10
9
|
/** A general table */
|
|
11
|
-
export type Table =
|
|
12
|
-
| RowTable
|
|
13
|
-
| ArrayRowTable
|
|
14
|
-
| ObjectRowTable
|
|
15
|
-
| GeoJSONTable
|
|
16
|
-
| ColumnarTable
|
|
17
|
-
| ArrowTable;
|
|
10
|
+
export type Table = RowTable | ArrayRowTable | ObjectRowTable | GeoJSONTable | ColumnarTable;
|
|
18
11
|
|
|
19
12
|
/** A table organized as an array of rows */
|
|
20
13
|
export type RowTable = ArrayRowTable | ObjectRowTable | GeoJSONTable;
|
|
@@ -53,15 +46,6 @@ export type ColumnarTable = {
|
|
|
53
46
|
data: {[columnName: string]: ArrayLike<unknown>};
|
|
54
47
|
};
|
|
55
48
|
|
|
56
|
-
/**
|
|
57
|
-
* A table that wraps an Apache Arrow table
|
|
58
|
-
*/
|
|
59
|
-
export type ArrowTable = {
|
|
60
|
-
shape: 'arrow-table';
|
|
61
|
-
schema?: Schema;
|
|
62
|
-
data: arrow.Table;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
49
|
/** A collection of tables */
|
|
66
50
|
export type Tables<TableType = Table> = {
|
|
67
51
|
shape: 'tables';
|
|
@@ -75,8 +59,7 @@ export type TableBatch =
|
|
|
75
59
|
| ArrayRowTableBatch
|
|
76
60
|
| ObjectRowTableBatch
|
|
77
61
|
| GeoJSONTableBatch
|
|
78
|
-
| ColumnarTableBatch
|
|
79
|
-
| ArrowTableBatch;
|
|
62
|
+
| ColumnarTableBatch;
|
|
80
63
|
|
|
81
64
|
/** Batch for a table organized as an array of rows, each row is an array of values */
|
|
82
65
|
export type ArrayRowTableBatch<MetadataT = unknown> = Batch<MetadataT> & {
|
|
@@ -114,12 +97,3 @@ export type ColumnarTableBatch<MetadataT = unknown> = Batch<MetadataT> & {
|
|
|
114
97
|
data: {[columnName: string]: ArrayLike<unknown>};
|
|
115
98
|
length: number;
|
|
116
99
|
};
|
|
117
|
-
|
|
118
|
-
/** Batch that wraps an Apache Arrow RecordBatch */
|
|
119
|
-
export type ArrowTableBatch<MetadataT = unknown> = Batch<MetadataT> & {
|
|
120
|
-
shape: 'arrow-table';
|
|
121
|
-
schemaType?: 'explicit' | 'deduced';
|
|
122
|
-
schema?: Schema;
|
|
123
|
-
data: arrow.Table; // RecordBatch wrapped in Table
|
|
124
|
-
length: number;
|
|
125
|
-
};
|
package/src/schema/float16.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import {getFloat16ArrayConstructor, NativeFloat16ArrayConstructor} from '@math.gl/core';
|
|
5
|
+
import {getFloat16ArrayConstructor, NativeFloat16ArrayConstructor} from '@math.gl/core/types';
|
|
6
6
|
|
|
7
7
|
/** Array storage used for logical Float16 values. */
|
|
8
8
|
export type Float16ArrayStorage = Float16Array | Uint16Array;
|
|
@@ -10,7 +10,7 @@ import type {BinaryGeometryType} from './binary-geometries';
|
|
|
10
10
|
export type ArrowBinaryFeatureTable = {
|
|
11
11
|
/** Geometry family stored in this table. */
|
|
12
12
|
type: BinaryGeometryType;
|
|
13
|
-
/** Arrow table
|
|
13
|
+
/** Native Arrow table for the family. */
|
|
14
14
|
table: arrow.Table;
|
|
15
15
|
/** Original feature-level properties sidecar from the binary feature collection. */
|
|
16
16
|
properties: BinaryProperties['properties'];
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {GeoArrowEncoding} from '@math.gl/arrow
|
|
5
|
+
import type {GeoArrowEncoding} from '@math.gl/core/arrow';
|
|
6
6
|
|
|
7
7
|
/** Canonical geometry encodings are shared with math.gl. */
|
|
8
8
|
export type {
|
|
9
9
|
GeoArrowEncoding,
|
|
10
10
|
GeoArrowDimension,
|
|
11
11
|
GeoArrowCoordinateLayout
|
|
12
|
-
} from '@math.gl/arrow
|
|
12
|
+
} from '@math.gl/core/arrow';
|
|
13
13
|
|
|
14
14
|
/** Preferred output policy for loader-facing GeoArrow conversions. */
|
|
15
15
|
export type GeoArrowEncodingPreference = 'geoarrow.wkb' | 'geoarrow.geometry' | 'optimized';
|
package/src/schema/index.ts
CHANGED
|
@@ -62,7 +62,6 @@ export type {
|
|
|
62
62
|
ObjectRowTable,
|
|
63
63
|
GeoJSONTable,
|
|
64
64
|
ColumnarTable,
|
|
65
|
-
ArrowTable,
|
|
66
65
|
Tables
|
|
67
66
|
} from './categories/category-table';
|
|
68
67
|
export type {
|
|
@@ -70,8 +69,7 @@ export type {
|
|
|
70
69
|
ArrayRowTableBatch,
|
|
71
70
|
ObjectRowTableBatch,
|
|
72
71
|
GeoJSONTableBatch,
|
|
73
|
-
ColumnarTableBatch
|
|
74
|
-
ArrowTableBatch
|
|
72
|
+
ColumnarTableBatch
|
|
75
73
|
} from './categories/category-table';
|
|
76
74
|
|
|
77
75
|
// MESH CATEGORY
|
|
@@ -92,8 +90,6 @@ export type {
|
|
|
92
90
|
MeshTopology
|
|
93
91
|
} from './categories/category-mesh';
|
|
94
92
|
export {meshArrowSchema, indexedMeshArrowSchema} from './categories/category-mesh';
|
|
95
|
-
/** @deprecated Import `getMeshBoundingBox` from `@loaders.gl/core/schema-utils`. */
|
|
96
|
-
export {getMeshBoundingBox} from './deprecated/mesh-utils';
|
|
97
93
|
// TEXTURES
|
|
98
94
|
export type {
|
|
99
95
|
TextureMetadata,
|
|
@@ -167,3 +163,6 @@ export type {
|
|
|
167
163
|
ArrowBinaryFeatureCollection,
|
|
168
164
|
BinaryFeatureCollectionLike
|
|
169
165
|
} from './categories/category-gis';
|
|
166
|
+
|
|
167
|
+
/** @deprecated Compatibility export for deck.gl 10.0.0-alpha.1. Use schema-utils. */
|
|
168
|
+
export {getMeshBoundingBox} from '../schema-utils/lib/mesh/get-mesh-bounding-box';
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {Schema} from './schema';
|
|
6
|
-
// import type {RecordBatch} from 'apache-arrow';
|
|
7
|
-
|
|
8
|
-
type ApacheRecordBatch = unknown;
|
|
9
6
|
|
|
10
7
|
/**
|
|
11
8
|
* A batch of data (or metadata/schema), from a streaming loader
|
|
@@ -23,8 +20,6 @@ export type Batch<MetadataT = unknown> = {
|
|
|
23
20
|
schema?: Schema;
|
|
24
21
|
/** Data in this batch */
|
|
25
22
|
data?: unknown;
|
|
26
|
-
/** If this is an arrow table. @deprecated Use `data` */
|
|
27
|
-
recordBatch?: ApacheRecordBatch;
|
|
28
23
|
/** Length of data in this batch */
|
|
29
24
|
length: number;
|
|
30
25
|
|
|
@@ -29,11 +29,6 @@ export type {
|
|
|
29
29
|
export {getArrowViewTypeSupport} from './lib/schema/convert-arrow-schema';
|
|
30
30
|
export {getDataTypeFromArray} from './lib/schema/data-type';
|
|
31
31
|
|
|
32
|
-
export {
|
|
33
|
-
convertArrowTable,
|
|
34
|
-
convertArrowTableBatch
|
|
35
|
-
} from './lib/table/tables/convert-arrow-table-wrapper';
|
|
36
|
-
|
|
37
32
|
// TABLE CATEGORY UTILS
|
|
38
33
|
|
|
39
34
|
export {deduceTableSchema} from './lib/schema/deduce-table-schema';
|
|
@@ -54,10 +49,7 @@ export {
|
|
|
54
49
|
makeTableBatchIterator,
|
|
55
50
|
makeBatchFromTable
|
|
56
51
|
} from './lib/table/batches/make-table-batch-iterator';
|
|
57
|
-
export {
|
|
58
|
-
makeArrowTableBatchIterator,
|
|
59
|
-
makeArrowRecordBatchIterator
|
|
60
|
-
} from './lib/table/batches/make-arrow-batch-iterator';
|
|
52
|
+
export {makeArrowRecordBatchIterator} from './lib/table/batches/make-arrow-batch-iterator';
|
|
61
53
|
export {
|
|
62
54
|
selectArrowTableRows,
|
|
63
55
|
queryArrowTable,
|
|
@@ -70,8 +62,7 @@ export {
|
|
|
70
62
|
isArrayRowTable,
|
|
71
63
|
isObjectRowTable,
|
|
72
64
|
isColumnarTable,
|
|
73
|
-
isGeoJSONTable
|
|
74
|
-
isArrowTable
|
|
65
|
+
isGeoJSONTable
|
|
75
66
|
} from './lib/table/tables/table-types';
|
|
76
67
|
|
|
77
68
|
export {
|
|
@@ -93,16 +84,17 @@ export {
|
|
|
93
84
|
// Table batch builders
|
|
94
85
|
|
|
95
86
|
export {TableBatchBuilder} from './lib/table/batch-builder/table-batch-builder';
|
|
96
|
-
export type {TableBatchAggregator} from './lib/table/batch-builder/table-batch-aggregator';
|
|
97
|
-
export {RowTableBatchAggregator} from './lib/table/batch-builder/row-table-batch-aggregator';
|
|
98
|
-
export {ColumnarTableBatchAggregator} from './lib/table/batch-builder/columnar-table-batch-aggregator';
|
|
99
87
|
|
|
100
88
|
export {ArrowLikeTable} from './lib/table/arrow-api/arrow-like-table';
|
|
101
89
|
|
|
102
90
|
// MESH CATEGORY
|
|
103
91
|
|
|
104
92
|
export {getMeshSize, getMeshBoundingBox} from './lib/mesh/mesh-utils';
|
|
105
|
-
export {
|
|
93
|
+
export {
|
|
94
|
+
convertMeshToTable,
|
|
95
|
+
convertMeshToArrowTable,
|
|
96
|
+
makeMeshArrowTable
|
|
97
|
+
} from './lib/mesh/convert-mesh-to-table';
|
|
106
98
|
export type {MeshArrowTableOptions} from './lib/mesh/convert-mesh-to-table';
|
|
107
99
|
export {convertTableToMesh} from './lib/mesh/convert-table-to-mesh';
|
|
108
100
|
export {
|
|
@@ -149,7 +141,7 @@ export {
|
|
|
149
141
|
// IntervalYearMonth,
|
|
150
142
|
// FixedSizeList,
|
|
151
143
|
// Struct
|
|
152
|
-
} from './lib/table/arrow-api
|
|
144
|
+
} from './lib/table/arrow-api';
|
|
153
145
|
|
|
154
146
|
// EXPERIMENTAL APIs
|
|
155
147
|
export {ArrowTableBuilder} from './lib/table/batch-builder/arrow-table-builder';
|
|
@@ -168,3 +160,15 @@ export type {
|
|
|
168
160
|
PointCloudTilerNode,
|
|
169
161
|
PointCloudTileBounds
|
|
170
162
|
} from './lib/mesh/point-cloud-tiler';
|
|
163
|
+
|
|
164
|
+
export {
|
|
165
|
+
snapshotArrowSchema,
|
|
166
|
+
mergeArrowSchemas,
|
|
167
|
+
updateArrowTableSchema,
|
|
168
|
+
updateNativeArrowTableMetadata,
|
|
169
|
+
makeArrowMetadataBatch,
|
|
170
|
+
makeArrowTableFromBatches
|
|
171
|
+
} from './lib/arrow/arrow-metadata';
|
|
172
|
+
export {refineArrowTableBatches} from './lib/arrow/arrow-metadata';
|
|
173
|
+
|
|
174
|
+
export {isArrowRecordBatch, isArrowTable} from '../lib/loader-utils/native-arrow';
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import * as arrow from 'apache-arrow';
|
|
6
|
+
import type {Field, DataType} from '@loaders.gl/core/schema';
|
|
7
|
+
import {serializeArrowSchema, deserializeArrowSchema} from '../schema/convert-arrow-schema';
|
|
8
|
+
|
|
9
|
+
/** Copies a schema, including nested field metadata, without retaining mutable metadata maps. */
|
|
10
|
+
export function snapshotArrowSchema(schema: arrow.Schema): arrow.Schema {
|
|
11
|
+
return deserializeArrowSchema(serializeArrowSchema(schema));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Merges compatible schema snapshots, with later metadata values taking precedence. */
|
|
15
|
+
export function mergeArrowSchemas(
|
|
16
|
+
previous: arrow.Schema | undefined,
|
|
17
|
+
next: arrow.Schema
|
|
18
|
+
): arrow.Schema {
|
|
19
|
+
if (!previous) return snapshotArrowSchema(next);
|
|
20
|
+
// Arrow validates names, order, nullability and types, but intentionally ignores metadata.
|
|
21
|
+
new arrow.Table(previous, [new arrow.RecordBatch(next, undefined)]);
|
|
22
|
+
const earlier = serializeArrowSchema(previous);
|
|
23
|
+
const later = serializeArrowSchema(next);
|
|
24
|
+
return deserializeArrowSchema({
|
|
25
|
+
...later,
|
|
26
|
+
fields: later.fields.map((field, index) => mergeFieldMetadata(earlier.fields[index], field)),
|
|
27
|
+
metadata: {...earlier.metadata, ...later.metadata}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Merges metadata recursively without changing a field's structural definition. */
|
|
32
|
+
function mergeFieldMetadata(previous: Field, next: Field): Field {
|
|
33
|
+
return {
|
|
34
|
+
...next,
|
|
35
|
+
type: mergeTypeMetadata(previous.type, next.type),
|
|
36
|
+
metadata: {...previous.metadata, ...next.metadata}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Preserves nested field metadata, including fields inside dictionary values. */
|
|
41
|
+
function mergeTypeMetadata(previous: DataType, next: DataType): DataType {
|
|
42
|
+
if (typeof previous !== 'object' || typeof next !== 'object') return next;
|
|
43
|
+
if ('children' in previous && 'children' in next) {
|
|
44
|
+
const previousChildren = previous.children;
|
|
45
|
+
return {
|
|
46
|
+
...next,
|
|
47
|
+
children: next.children.map((field, index) =>
|
|
48
|
+
mergeFieldMetadata(previousChildren[index], field)
|
|
49
|
+
)
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (previous.type === 'dictionary' && next.type === 'dictionary') {
|
|
53
|
+
return {...next, dictionary: mergeTypeMetadata(previous.dictionary, next.dictionary)};
|
|
54
|
+
}
|
|
55
|
+
return next;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Snapshots a batch's schema and metadata while retaining its data buffers and row count. */
|
|
59
|
+
function snapshotArrowBatch(batch: arrow.RecordBatch, schema: arrow.Schema): arrow.RecordBatch {
|
|
60
|
+
const snapshot = new arrow.RecordBatch(
|
|
61
|
+
snapshotArrowSchema(schema),
|
|
62
|
+
batch.data,
|
|
63
|
+
new Map(batch.metadata)
|
|
64
|
+
);
|
|
65
|
+
// Arrow reconstructs the Struct length from its columns, which are absent in zero-column batches.
|
|
66
|
+
if (snapshot.numRows !== batch.numRows) {
|
|
67
|
+
Object.defineProperty(snapshot, 'data', {value: batch.data});
|
|
68
|
+
}
|
|
69
|
+
return snapshot;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Applies a table schema snapshot to its batches while retaining batch-local custom metadata. */
|
|
73
|
+
export function updateArrowTableSchema(table: arrow.Table, schema: arrow.Schema): arrow.Table {
|
|
74
|
+
const snapshot = snapshotArrowSchema(schema);
|
|
75
|
+
const batches = table.batches.map(batch => snapshotArrowBatch(batch, snapshot));
|
|
76
|
+
// Preserve declared schemas even for schema-only empty tables.
|
|
77
|
+
return new arrow.Table(
|
|
78
|
+
snapshot,
|
|
79
|
+
batches.length ? batches : [new arrow.RecordBatch(snapshotArrowSchema(snapshot), undefined)]
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Updates native Arrow metadata while preserving independent batch snapshots. */
|
|
84
|
+
export function updateNativeArrowTableMetadata(
|
|
85
|
+
table: arrow.Table,
|
|
86
|
+
metadata: Record<string, string>
|
|
87
|
+
): arrow.Table {
|
|
88
|
+
const schema = new arrow.Schema(
|
|
89
|
+
table.schema.fields,
|
|
90
|
+
new Map([...table.schema.metadata, ...Object.entries(metadata)])
|
|
91
|
+
);
|
|
92
|
+
return updateArrowTableSchema(table, schema);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Creates a zero-row metadata update retaining the complete declared schema. */
|
|
96
|
+
export function makeArrowMetadataBatch(schema: arrow.Schema): arrow.RecordBatch {
|
|
97
|
+
return new arrow.RecordBatch(snapshotArrowSchema(schema), undefined);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Collects Arrow batches, retaining emission snapshots and merging final schema metadata. */
|
|
101
|
+
export async function makeArrowTableFromBatches(
|
|
102
|
+
batches: AsyncIterable<arrow.RecordBatch> | Iterable<arrow.RecordBatch>
|
|
103
|
+
): Promise<arrow.Table | null> {
|
|
104
|
+
let schema: arrow.Schema | undefined;
|
|
105
|
+
const collected: arrow.RecordBatch[] = [];
|
|
106
|
+
for await (const batch of batches) {
|
|
107
|
+
schema = mergeArrowSchemas(schema, batch.schema);
|
|
108
|
+
collected.push(snapshotArrowBatch(batch, batch.schema));
|
|
109
|
+
}
|
|
110
|
+
return schema ? new arrow.Table(schema, collected) : null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** Snapshots native Arrow schemas, accumulating bounds and retaining local batch bounds. */
|
|
114
|
+
export async function* refineArrowTableBatches(
|
|
115
|
+
batches: AsyncIterable<arrow.Table> | Iterable<arrow.Table>
|
|
116
|
+
): AsyncIterable<arrow.Table> {
|
|
117
|
+
let schema: arrow.Schema | undefined;
|
|
118
|
+
let bounds: number[][] | undefined;
|
|
119
|
+
for await (const table of batches) {
|
|
120
|
+
const localBounds = table.schema.metadata.get('boundingBox');
|
|
121
|
+
const nextSchema = snapshotArrowSchema(table.schema);
|
|
122
|
+
if (localBounds) {
|
|
123
|
+
const nextBounds = JSON.parse(localBounds) as number[][];
|
|
124
|
+
bounds = bounds
|
|
125
|
+
? [
|
|
126
|
+
nextBounds[0].map((value, index) => Math.min(bounds![0][index], value)),
|
|
127
|
+
nextBounds[1].map((value, index) => Math.max(bounds![1][index], value))
|
|
128
|
+
]
|
|
129
|
+
: nextBounds;
|
|
130
|
+
nextSchema.metadata.set('boundingBox', JSON.stringify(bounds));
|
|
131
|
+
}
|
|
132
|
+
schema = mergeArrowSchemas(schema, nextSchema);
|
|
133
|
+
const data = updateArrowTableSchema(table, schema);
|
|
134
|
+
if (localBounds) {
|
|
135
|
+
for (const recordBatch of data.batches) recordBatch.metadata.set('boundingBox', localBounds);
|
|
136
|
+
}
|
|
137
|
+
yield data;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import {TypedArray} from '@math.gl/core';
|
|
5
|
+
import type {TypedArray} from '@math.gl/core/types';
|
|
6
6
|
import * as arrow from 'apache-arrow';
|
|
7
7
|
import {getDataTypeFromArray} from '../schema/data-type';
|
|
8
8
|
import {deserializeArrowType} from '../schema/convert-arrow-schema';
|
|
@@ -70,11 +70,16 @@ function detectSourceShape<Shape extends string>(
|
|
|
70
70
|
detectedShapes.add(fallbackShape as Shape);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
let detectionPriority = 0;
|
|
73
74
|
for (const converter of converters) {
|
|
74
75
|
const detectedShape = converter.detectInputShape?.(input);
|
|
75
|
-
if (detectedShape)
|
|
76
|
-
|
|
76
|
+
if (!detectedShape) continue;
|
|
77
|
+
const priority = converter.inputShapePriority ?? 0;
|
|
78
|
+
if (priority > detectionPriority) {
|
|
79
|
+
detectedShapes.clear();
|
|
80
|
+
detectionPriority = priority;
|
|
77
81
|
}
|
|
82
|
+
if (priority === detectionPriority) detectedShapes.add(detectedShape);
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
if (detectedShapes.size === 0) {
|
|
@@ -32,6 +32,8 @@ export type Converter<Shape extends string = string, Options = unknown> = {
|
|
|
32
32
|
to: readonly Shape[];
|
|
33
33
|
/** Optional runtime shape detector for raw inputs that do not expose a `shape` discriminator. */
|
|
34
34
|
detectInputShape?: (input: unknown) => Shape | null;
|
|
35
|
+
/** Priority for a detector that identifies a more specific shape of the same input. */
|
|
36
|
+
inputShapePriority?: number;
|
|
35
37
|
/** Optional guard to prune unsupported source/target pairs within the declared shape sets. */
|
|
36
38
|
canConvert?: (sourceShape: Shape, targetShape: Shape) => boolean;
|
|
37
39
|
/** Performs one direct conversion from the current shape to the requested target shape. */
|