@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
|
@@ -36,68 +36,6 @@ __export(vector_table_scan_source_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(vector_table_scan_source_exports);
|
|
38
38
|
|
|
39
|
-
// src/schema-utils/lib/schema/data-type.ts
|
|
40
|
-
var import_core = require("@math.gl/core");
|
|
41
|
-
function getDataTypeFromValue(value, defaultNumberType = "float32") {
|
|
42
|
-
if (value instanceof Date) {
|
|
43
|
-
return "date-millisecond";
|
|
44
|
-
}
|
|
45
|
-
if (typeof value === "number") {
|
|
46
|
-
return defaultNumberType;
|
|
47
|
-
}
|
|
48
|
-
if (typeof value === "boolean") {
|
|
49
|
-
return "bool";
|
|
50
|
-
}
|
|
51
|
-
if (typeof value === "string") {
|
|
52
|
-
return "utf8";
|
|
53
|
-
}
|
|
54
|
-
if (value === null || value === "undefined") {
|
|
55
|
-
return "null";
|
|
56
|
-
}
|
|
57
|
-
return "null";
|
|
58
|
-
}
|
|
59
|
-
function getDataTypeFromArray(array) {
|
|
60
|
-
let type = getDataTypeFromTypedArray(array);
|
|
61
|
-
if (type !== "null") {
|
|
62
|
-
return { type, nullable: false };
|
|
63
|
-
}
|
|
64
|
-
if (array.length > 0) {
|
|
65
|
-
type = getDataTypeFromValue(array[0]);
|
|
66
|
-
return { type, nullable: true };
|
|
67
|
-
}
|
|
68
|
-
return { type: "null", nullable: true };
|
|
69
|
-
}
|
|
70
|
-
function getDataTypeFromTypedArray(array) {
|
|
71
|
-
if (typeof Float16Array !== "undefined" && array instanceof Float16Array) {
|
|
72
|
-
return "float16";
|
|
73
|
-
}
|
|
74
|
-
switch (array.constructor) {
|
|
75
|
-
case Int8Array:
|
|
76
|
-
return "int8";
|
|
77
|
-
case Uint8Array:
|
|
78
|
-
case Uint8ClampedArray:
|
|
79
|
-
return "uint8";
|
|
80
|
-
case Int16Array:
|
|
81
|
-
return "int16";
|
|
82
|
-
case Uint16Array:
|
|
83
|
-
return "uint16";
|
|
84
|
-
case Int32Array:
|
|
85
|
-
return "int32";
|
|
86
|
-
case Uint32Array:
|
|
87
|
-
return "uint32";
|
|
88
|
-
case BigInt64Array:
|
|
89
|
-
return "int64";
|
|
90
|
-
case BigUint64Array:
|
|
91
|
-
return "uint64";
|
|
92
|
-
case Float32Array:
|
|
93
|
-
return "float32";
|
|
94
|
-
case Float64Array:
|
|
95
|
-
return "float64";
|
|
96
|
-
default:
|
|
97
|
-
return "null";
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
39
|
// src/schema-utils/lib/schema/convert-arrow-schema.ts
|
|
102
40
|
var arrow = __toESM(require("apache-arrow"), 1);
|
|
103
41
|
function convertArrowToSchema(arrowSchema) {
|
|
@@ -109,9 +47,18 @@ function serializeArrowSchema(arrowSchema) {
|
|
|
109
47
|
metadata: serializeArrowMetadata(arrowSchema.metadata)
|
|
110
48
|
};
|
|
111
49
|
}
|
|
50
|
+
function deserializeArrowSchema(schema, options) {
|
|
51
|
+
return new arrow.Schema(
|
|
52
|
+
schema.fields.map((field) => deserializeArrowField(field, options)),
|
|
53
|
+
deserializeArrowMetadata(schema.metadata)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
112
56
|
function serializeArrowMetadata(arrowMetadata) {
|
|
113
57
|
return Object.fromEntries(arrowMetadata);
|
|
114
58
|
}
|
|
59
|
+
function deserializeArrowMetadata(metadata) {
|
|
60
|
+
return metadata ? new Map(Object.entries(metadata)) : /* @__PURE__ */ new Map();
|
|
61
|
+
}
|
|
115
62
|
function serializeArrowField(field) {
|
|
116
63
|
return {
|
|
117
64
|
name: field.name,
|
|
@@ -120,6 +67,14 @@ function serializeArrowField(field) {
|
|
|
120
67
|
metadata: serializeArrowMetadata(field.metadata)
|
|
121
68
|
};
|
|
122
69
|
}
|
|
70
|
+
function deserializeArrowField(field, options) {
|
|
71
|
+
return new arrow.Field(
|
|
72
|
+
field.name,
|
|
73
|
+
deserializeArrowType(field.type, options),
|
|
74
|
+
field.nullable,
|
|
75
|
+
deserializeArrowMetadata(field.metadata)
|
|
76
|
+
);
|
|
77
|
+
}
|
|
123
78
|
function serializeArrowType(arrowType) {
|
|
124
79
|
if (isArrowViewType(arrowType, "BinaryView")) {
|
|
125
80
|
return "binary-view";
|
|
@@ -307,6 +262,125 @@ function serializeArrowType(arrowType) {
|
|
|
307
262
|
throw new Error(`arrow type not supported: ${arrowType.constructor.name}`);
|
|
308
263
|
}
|
|
309
264
|
}
|
|
265
|
+
function deserializeArrowType(dataType, options) {
|
|
266
|
+
if (typeof dataType === "object") {
|
|
267
|
+
switch (dataType.type) {
|
|
268
|
+
case "decimal":
|
|
269
|
+
return new arrow.Decimal(dataType.scale, dataType.precision, dataType.bitWidth);
|
|
270
|
+
case "map": {
|
|
271
|
+
const children = dataType.children.map(
|
|
272
|
+
(arrowField) => deserializeArrowField(arrowField, options)
|
|
273
|
+
);
|
|
274
|
+
return new arrow.Map_(children[0], dataType.keysSorted);
|
|
275
|
+
}
|
|
276
|
+
case "list": {
|
|
277
|
+
const field = deserializeArrowField(dataType.children[0], options);
|
|
278
|
+
return new arrow.List(field);
|
|
279
|
+
}
|
|
280
|
+
case "large-list": {
|
|
281
|
+
const field = deserializeArrowField(dataType.children[0], options);
|
|
282
|
+
const LargeList = getOptionalArrowConstructor("LargeList");
|
|
283
|
+
if (!LargeList) {
|
|
284
|
+
throw new Error(
|
|
285
|
+
"LargeList requires an Apache Arrow runtime that exports the LargeList constructor"
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
return new LargeList(field);
|
|
289
|
+
}
|
|
290
|
+
case "fixed-size-list": {
|
|
291
|
+
const child = deserializeArrowField(dataType.children[0], options);
|
|
292
|
+
return new arrow.FixedSizeList(dataType.listSize, child);
|
|
293
|
+
}
|
|
294
|
+
case "fixed-size-binary":
|
|
295
|
+
return new arrow.FixedSizeBinary(dataType.byteWidth);
|
|
296
|
+
case "struct": {
|
|
297
|
+
const children = dataType.children.map(
|
|
298
|
+
(arrowField) => deserializeArrowField(arrowField, options)
|
|
299
|
+
);
|
|
300
|
+
return new arrow.Struct(children);
|
|
301
|
+
}
|
|
302
|
+
case "sparse-union":
|
|
303
|
+
case "dense-union": {
|
|
304
|
+
const children = dataType.children.map(
|
|
305
|
+
(arrowField) => deserializeArrowField(arrowField, options)
|
|
306
|
+
);
|
|
307
|
+
return dataType.type === "dense-union" ? new arrow.DenseUnion(dataType.typeIds, children) : new arrow.SparseUnion(dataType.typeIds, children);
|
|
308
|
+
}
|
|
309
|
+
case "dictionary": {
|
|
310
|
+
return new arrow.Dictionary(
|
|
311
|
+
deserializeArrowType(dataType.dictionary, options),
|
|
312
|
+
deserializeArrowDictionaryKeyType(dataType.indices),
|
|
313
|
+
dataType.id,
|
|
314
|
+
dataType.isOrdered
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
default:
|
|
318
|
+
throw new Error("array type not supported");
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
switch (dataType) {
|
|
322
|
+
case "null":
|
|
323
|
+
return new arrow.Null();
|
|
324
|
+
case "binary":
|
|
325
|
+
return makeVariableWidthArrowType("BinaryView", new arrow.Binary(), options);
|
|
326
|
+
case "binary-view":
|
|
327
|
+
return makeRequiredArrowViewType("BinaryView");
|
|
328
|
+
case "bool":
|
|
329
|
+
return new arrow.Bool();
|
|
330
|
+
case "int8":
|
|
331
|
+
return new arrow.Int8();
|
|
332
|
+
case "int16":
|
|
333
|
+
return new arrow.Int16();
|
|
334
|
+
case "int32":
|
|
335
|
+
return new arrow.Int32();
|
|
336
|
+
case "int64":
|
|
337
|
+
return new arrow.Int64();
|
|
338
|
+
case "uint8":
|
|
339
|
+
return new arrow.Uint8();
|
|
340
|
+
case "uint16":
|
|
341
|
+
return new arrow.Uint16();
|
|
342
|
+
case "uint32":
|
|
343
|
+
return new arrow.Uint32();
|
|
344
|
+
case "uint64":
|
|
345
|
+
return new arrow.Uint64();
|
|
346
|
+
case "float16":
|
|
347
|
+
return new arrow.Float16();
|
|
348
|
+
case "float32":
|
|
349
|
+
return new arrow.Float32();
|
|
350
|
+
case "float64":
|
|
351
|
+
return new arrow.Float64();
|
|
352
|
+
case "utf8":
|
|
353
|
+
return makeVariableWidthArrowType("Utf8View", new arrow.Utf8(), options);
|
|
354
|
+
case "utf8-view":
|
|
355
|
+
return makeRequiredArrowViewType("Utf8View");
|
|
356
|
+
case "date-day":
|
|
357
|
+
return new arrow.DateDay();
|
|
358
|
+
case "date-millisecond":
|
|
359
|
+
return new arrow.DateMillisecond();
|
|
360
|
+
case "time-second":
|
|
361
|
+
return new arrow.TimeSecond();
|
|
362
|
+
case "time-millisecond":
|
|
363
|
+
return new arrow.TimeMillisecond();
|
|
364
|
+
case "time-microsecond":
|
|
365
|
+
return new arrow.TimeMicrosecond();
|
|
366
|
+
case "time-nanosecond":
|
|
367
|
+
return new arrow.TimeNanosecond();
|
|
368
|
+
case "timestamp-second":
|
|
369
|
+
return new arrow.TimestampSecond();
|
|
370
|
+
case "timestamp-millisecond":
|
|
371
|
+
return new arrow.TimestampMillisecond();
|
|
372
|
+
case "timestamp-microsecond":
|
|
373
|
+
return new arrow.TimestampMicrosecond();
|
|
374
|
+
case "timestamp-nanosecond":
|
|
375
|
+
return new arrow.TimestampNanosecond();
|
|
376
|
+
case "interval-daytime":
|
|
377
|
+
return new arrow.IntervalDayTime();
|
|
378
|
+
case "interval-yearmonth":
|
|
379
|
+
return new arrow.IntervalYearMonth();
|
|
380
|
+
default:
|
|
381
|
+
throw new Error("array type not supported");
|
|
382
|
+
}
|
|
383
|
+
}
|
|
310
384
|
function getOptionalArrowConstructor(typeName) {
|
|
311
385
|
return arrow[typeName];
|
|
312
386
|
}
|
|
@@ -323,6 +397,31 @@ function isOptionalArrowType(arrowType, typeName) {
|
|
|
323
397
|
const constructor = getOptionalArrowConstructor(typeName);
|
|
324
398
|
return Boolean(constructor && arrowType instanceof constructor);
|
|
325
399
|
}
|
|
400
|
+
function makeVariableWidthArrowType(viewTypeName, fallbackType, options) {
|
|
401
|
+
const viewTypeMode = (options == null ? void 0 : options.viewTypes) || "never";
|
|
402
|
+
if (viewTypeMode === "never") {
|
|
403
|
+
return fallbackType;
|
|
404
|
+
}
|
|
405
|
+
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
406
|
+
if (constructor) {
|
|
407
|
+
return new constructor();
|
|
408
|
+
}
|
|
409
|
+
if (viewTypeMode === "require") {
|
|
410
|
+
throw new Error(
|
|
411
|
+
`${viewTypeName} requires apache-arrow 21.2.0 or later; the installed runtime does not support it`
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
return fallbackType;
|
|
415
|
+
}
|
|
416
|
+
function makeRequiredArrowViewType(viewTypeName) {
|
|
417
|
+
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
418
|
+
if (!constructor) {
|
|
419
|
+
throw new Error(
|
|
420
|
+
`${viewTypeName} requires apache-arrow 21.2.0 or later; the installed runtime does not support it`
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
return new constructor();
|
|
424
|
+
}
|
|
326
425
|
function serializeArrowDictionaryKeyType(arrowType) {
|
|
327
426
|
if (arrowType instanceof arrow.Int) {
|
|
328
427
|
const prefix = arrowType.isSigned ? "int" : "uint";
|
|
@@ -351,128 +450,37 @@ function serializeArrowDictionaryKeyType(arrowType) {
|
|
|
351
450
|
function isSchemaDictionaryKeyType(keyType) {
|
|
352
451
|
return ["int8", "int16", "int32", "uint8", "uint16", "uint32"].includes(keyType);
|
|
353
452
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
case "
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
453
|
+
function deserializeArrowDictionaryKeyType(keyType) {
|
|
454
|
+
switch (keyType) {
|
|
455
|
+
case "int8":
|
|
456
|
+
return new arrow.Int8();
|
|
457
|
+
case "int16":
|
|
458
|
+
return new arrow.Int16();
|
|
459
|
+
case "int32":
|
|
460
|
+
return new arrow.Int32();
|
|
461
|
+
case "uint8":
|
|
462
|
+
return new arrow.Uint8();
|
|
463
|
+
case "uint16":
|
|
464
|
+
return new arrow.Uint16();
|
|
465
|
+
case "uint32":
|
|
466
|
+
return new arrow.Uint32();
|
|
366
467
|
default:
|
|
367
|
-
throw new Error(
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
function deduceSchemaFromColumns(columnarTable) {
|
|
371
|
-
const fields = [];
|
|
372
|
-
for (const [columnName, column] of Object.entries(columnarTable)) {
|
|
373
|
-
const field = deduceFieldFromColumn(column, columnName);
|
|
374
|
-
fields.push(field);
|
|
375
|
-
}
|
|
376
|
-
return { fields, metadata: {} };
|
|
377
|
-
}
|
|
378
|
-
function deduceSchemaFromRows(rowTable) {
|
|
379
|
-
if (!rowTable.length) {
|
|
380
|
-
throw new Error("deduce from empty table");
|
|
381
|
-
}
|
|
382
|
-
const fields = [];
|
|
383
|
-
const row0 = rowTable[0];
|
|
384
|
-
for (const [columnName, value] of Object.entries(row0)) {
|
|
385
|
-
const name = Array.isArray(row0) ? `column${Number(columnName) + 1}` : columnName;
|
|
386
|
-
fields.push(deduceFieldFromValue(value, name));
|
|
387
|
-
}
|
|
388
|
-
return { fields, metadata: {} };
|
|
389
|
-
}
|
|
390
|
-
function deduceSchemaFromGeoJSON(features) {
|
|
391
|
-
if (!features.length) {
|
|
392
|
-
throw new Error("deduce from empty table");
|
|
468
|
+
throw new Error(`schema dictionary index type not supported: ${keyType}`);
|
|
393
469
|
}
|
|
394
|
-
const fields = [];
|
|
395
|
-
const row0 = features[0].properties || {};
|
|
396
|
-
for (const [columnName, value] of Object.entries(row0)) {
|
|
397
|
-
fields.push(deduceFieldFromValue(value, columnName));
|
|
398
|
-
}
|
|
399
|
-
return { fields, metadata: {} };
|
|
400
|
-
}
|
|
401
|
-
function deduceFieldFromColumn(column, name) {
|
|
402
|
-
if (ArrayBuffer.isView(column)) {
|
|
403
|
-
const type = getDataTypeFromArray(column);
|
|
404
|
-
return {
|
|
405
|
-
name,
|
|
406
|
-
type: type.type || "null",
|
|
407
|
-
nullable: type.nullable
|
|
408
|
-
// metadata: {}
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
if (Array.isArray(column) && column.length > 0) {
|
|
412
|
-
const value = column[0];
|
|
413
|
-
const type = getDataTypeFromValue(value);
|
|
414
|
-
return {
|
|
415
|
-
name,
|
|
416
|
-
type,
|
|
417
|
-
nullable: true
|
|
418
|
-
// metadata: {},
|
|
419
|
-
};
|
|
420
|
-
}
|
|
421
|
-
throw new Error("empty table");
|
|
422
|
-
}
|
|
423
|
-
function deduceFieldFromValue(value, name) {
|
|
424
|
-
const type = getDataTypeFromValue(value);
|
|
425
|
-
return {
|
|
426
|
-
name,
|
|
427
|
-
type,
|
|
428
|
-
nullable: true
|
|
429
|
-
// metadata: {}
|
|
430
|
-
};
|
|
431
470
|
}
|
|
432
471
|
|
|
433
|
-
// src/schema-utils/lib/
|
|
472
|
+
// src/schema-utils/lib/arrow/arrow-metadata.ts
|
|
434
473
|
var arrow2 = __toESM(require("apache-arrow"), 1);
|
|
435
|
-
function
|
|
436
|
-
|
|
437
|
-
switch (getTableShapeFromData(data)) {
|
|
438
|
-
case "array-row-table":
|
|
439
|
-
table = { shape: "array-row-table", data };
|
|
440
|
-
break;
|
|
441
|
-
case "object-row-table":
|
|
442
|
-
table = { shape: "object-row-table", data };
|
|
443
|
-
break;
|
|
444
|
-
case "columnar-table":
|
|
445
|
-
table = { shape: "columnar-table", data };
|
|
446
|
-
break;
|
|
447
|
-
case "arrow-table":
|
|
448
|
-
table = { shape: "arrow-table", data };
|
|
449
|
-
break;
|
|
450
|
-
default:
|
|
451
|
-
throw new Error("table");
|
|
452
|
-
}
|
|
453
|
-
const schema = deduceTableSchema(table);
|
|
454
|
-
return { ...table, schema };
|
|
474
|
+
function snapshotArrowSchema(schema) {
|
|
475
|
+
return deserializeArrowSchema(serializeArrowSchema(schema));
|
|
455
476
|
}
|
|
456
|
-
function
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
const firstRow = data[0];
|
|
465
|
-
if (Array.isArray(firstRow)) {
|
|
466
|
-
return "array-row-table";
|
|
467
|
-
}
|
|
468
|
-
if (firstRow && typeof firstRow === "object") {
|
|
469
|
-
return "object-row-table";
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
if (data && typeof data === "object") {
|
|
473
|
-
return "columnar-table";
|
|
474
|
-
}
|
|
475
|
-
throw new Error("invalid table");
|
|
477
|
+
function makeArrowMetadataBatch(schema) {
|
|
478
|
+
return new arrow2.RecordBatch(snapshotArrowSchema(schema), void 0);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
// dist/lib/loader-utils/native-arrow.js
|
|
482
|
+
function isArrowTable(value) {
|
|
483
|
+
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");
|
|
476
484
|
}
|
|
477
485
|
|
|
478
486
|
// src/loader-utils/lib/scan-utils/columnar-predicate.ts
|
|
@@ -549,6 +557,7 @@ function createScanQueryMetadata(options) {
|
|
|
549
557
|
});
|
|
550
558
|
}
|
|
551
559
|
);
|
|
560
|
+
const queryCapabilities = Object.freeze({ ...options.capabilities });
|
|
552
561
|
return Object.freeze({
|
|
553
562
|
sourceType: options.sourceType,
|
|
554
563
|
queryType: options.queryType,
|
|
@@ -557,7 +566,9 @@ function createScanQueryMetadata(options) {
|
|
|
557
566
|
description: options.description,
|
|
558
567
|
schema,
|
|
559
568
|
columns: Object.freeze(columns),
|
|
560
|
-
capabilities:
|
|
569
|
+
capabilities: queryCapabilities,
|
|
570
|
+
queryCapabilities,
|
|
571
|
+
...options.hasDefaultRowWindow ? { hasDefaultRowWindow: true } : {},
|
|
561
572
|
spatial: options.spatial ? Object.freeze({
|
|
562
573
|
...options.spatial,
|
|
563
574
|
bounds: options.spatial.bounds ? Object.freeze({
|
|
@@ -646,11 +657,6 @@ function validateTableQueryLimit(limit) {
|
|
|
646
657
|
}
|
|
647
658
|
}
|
|
648
659
|
|
|
649
|
-
// src/loader-utils/lib/scan-utils/table-scan-batch.ts
|
|
650
|
-
function makeTableScanBatch(table) {
|
|
651
|
-
return { ...table, batchType: "data", length: table.data.numRows };
|
|
652
|
-
}
|
|
653
|
-
|
|
654
660
|
// src/loader-utils/lib/scan-utils/relational-query.ts
|
|
655
661
|
function planRelationalQuery(sourceColumnNames, options = {}) {
|
|
656
662
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -819,6 +825,7 @@ function projectArrowTable(source, selections) {
|
|
|
819
825
|
|
|
820
826
|
// dist/scan/arrow-execution/filter-arrow-table.js
|
|
821
827
|
var arrow4 = __toESM(require("apache-arrow"), 1);
|
|
828
|
+
var import_arrow = require("@math.gl/core/arrow");
|
|
822
829
|
function filterArrowTable(source, predicate, options = {}) {
|
|
823
830
|
validateColumnarPredicate(predicate, new Set(source.schema.fields.map((field) => field.name)));
|
|
824
831
|
const columnNames = getColumnarPredicateColumns(predicate);
|
|
@@ -858,15 +865,8 @@ function filterArrowRows(source, selectBatch, options = {}) {
|
|
|
858
865
|
batches.push(batch.slice(indices[0], indices[indices.length - 1] + 1));
|
|
859
866
|
continue;
|
|
860
867
|
}
|
|
861
|
-
const
|
|
862
|
-
|
|
863
|
-
return [
|
|
864
|
-
field.name,
|
|
865
|
-
arrow4.vectorFromArray(indices.map((index) => vector.get(index)), field.type)
|
|
866
|
-
];
|
|
867
|
-
}));
|
|
868
|
-
const gathered = new arrow4.Table(source.schema, vectors);
|
|
869
|
-
batches.push(...gathered.batches.map((output) => new arrow4.RecordBatch(source.schema, output.data, batch.metadata)));
|
|
868
|
+
const gathered = (0, import_arrow.takeArrowTableRows)(data, Int32Array.from(indices));
|
|
869
|
+
batches.push(...gathered.batches);
|
|
870
870
|
}
|
|
871
871
|
return new arrow4.Table(source.schema, batches);
|
|
872
872
|
}
|
|
@@ -1029,33 +1029,7 @@ function isInPredicate(predicate) {
|
|
|
1029
1029
|
// dist/scan/rows-to-arrow.js
|
|
1030
1030
|
var arrow5 = __toESM(require("apache-arrow"), 1);
|
|
1031
1031
|
function convertRowsToArrowTable(rows) {
|
|
1032
|
-
|
|
1033
|
-
const schema = deducePrimitiveAwareSchema(table);
|
|
1034
|
-
if (table.data.length === 0 || schema.fields.length === 0) {
|
|
1035
|
-
return {
|
|
1036
|
-
shape: "arrow-table",
|
|
1037
|
-
schema,
|
|
1038
|
-
data: new arrow5.Table(new arrow5.Schema([]))
|
|
1039
|
-
};
|
|
1040
|
-
}
|
|
1041
|
-
return {
|
|
1042
|
-
shape: "arrow-table",
|
|
1043
|
-
schema,
|
|
1044
|
-
data: arrow5.tableFromJSON(table.data)
|
|
1045
|
-
};
|
|
1046
|
-
}
|
|
1047
|
-
function deducePrimitiveAwareSchema(table) {
|
|
1048
|
-
return {
|
|
1049
|
-
...table.schema,
|
|
1050
|
-
fields: table.schema.fields.map((field) => {
|
|
1051
|
-
if (field.type !== "null") {
|
|
1052
|
-
return field;
|
|
1053
|
-
}
|
|
1054
|
-
const columnValues = table.data.map((row) => row[field.name]);
|
|
1055
|
-
const inferredType = getDataTypeFromArray(columnValues);
|
|
1056
|
-
return { ...field, type: inferredType.type, nullable: inferredType.nullable };
|
|
1057
|
-
})
|
|
1058
|
-
};
|
|
1032
|
+
return arrow5.tableFromJSON(rows);
|
|
1059
1033
|
}
|
|
1060
1034
|
|
|
1061
1035
|
// dist/scan/sql-predicate-types.js
|
|
@@ -1174,7 +1148,7 @@ function explainArrowTableQuery(sourceTable, options = {}) {
|
|
|
1174
1148
|
if (options.columns !== void 0 || hasRelationalOperators(options) || options.join) {
|
|
1175
1149
|
throw new Error("Arrow select cannot be combined with columns or relational operators.");
|
|
1176
1150
|
}
|
|
1177
|
-
const projected = projectArrowTable(sourceTable
|
|
1151
|
+
const projected = projectArrowTable(sourceTable, options.select);
|
|
1178
1152
|
const columns = [
|
|
1179
1153
|
...new Set(options.select.map((selection) => typeof selection === "string" ? selection : selection.column))
|
|
1180
1154
|
];
|
|
@@ -1190,22 +1164,27 @@ function explainArrowTableQuery(sourceTable, options = {}) {
|
|
|
1190
1164
|
if (options.predicate) {
|
|
1191
1165
|
validateSQLPredicate(options.predicate);
|
|
1192
1166
|
}
|
|
1193
|
-
return explainTableQuery(sourceTable.
|
|
1167
|
+
return explainTableQuery(sourceTable.schema.fields.map((field) => field.name), options, ARROW_TABLE_QUERY_CAPABILITIES);
|
|
1194
1168
|
}
|
|
1195
|
-
|
|
1196
|
-
|
|
1169
|
+
var executePortableArrowQuery = (table, { select, where, limit, signal }) => {
|
|
1170
|
+
if (where)
|
|
1171
|
+
table = filterArrowTable(table, where, { limit, signal });
|
|
1172
|
+
const projected = select ? projectArrowTable(table, select) : table;
|
|
1173
|
+
return projected.numRows === 0 || limit === void 0 ? projected : projected.slice(0, limit);
|
|
1174
|
+
};
|
|
1175
|
+
function queryArrowTable(sourceTable, options = {}, executeLinear = executePortableArrowQuery) {
|
|
1197
1176
|
throwIfAborted(options.signal);
|
|
1198
1177
|
if (options.select !== void 0) {
|
|
1199
1178
|
if (options.columns !== void 0 || hasRelationalOperators(options) || options.join) {
|
|
1200
1179
|
throw new Error("Arrow select cannot be combined with columns or relational operators.");
|
|
1201
1180
|
}
|
|
1202
|
-
projectArrowTable(sourceTable
|
|
1181
|
+
projectArrowTable(sourceTable, options.select);
|
|
1203
1182
|
const columns = [
|
|
1204
1183
|
...new Set(options.select.map((selection) => typeof selection === "string" ? selection : selection.column))
|
|
1205
1184
|
];
|
|
1206
1185
|
const { select, ...remainingOptions } = options;
|
|
1207
|
-
const result = queryArrowTable(sourceTable, { ...remainingOptions, columns });
|
|
1208
|
-
return
|
|
1186
|
+
const result = queryArrowTable(sourceTable, { ...remainingOptions, columns }, executeLinear);
|
|
1187
|
+
return projectArrowTable(result, select);
|
|
1209
1188
|
}
|
|
1210
1189
|
if (options.join) {
|
|
1211
1190
|
validateArrowJoinQuery(sourceTable, options);
|
|
@@ -1219,34 +1198,31 @@ function queryArrowTable(sourceTable, options = {}) {
|
|
|
1219
1198
|
if (hasRelationalOperators(options)) {
|
|
1220
1199
|
return queryArrowTableRelational(sourceTable, options);
|
|
1221
1200
|
}
|
|
1222
|
-
const
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
}
|
|
1231
|
-
const filteredData = filterArrowTable(scannedData, predicate, { limit, signal: options.signal });
|
|
1232
|
-
return wrapArrowTable(projectArrowTable(filteredData, getProjectStep(plan).columns));
|
|
1201
|
+
const plan = planTableQuery2(sourceTable.schema.fields.map((field) => field.name), options);
|
|
1202
|
+
const projection = plan.find((step) => step.kind === "project");
|
|
1203
|
+
return executeLinear(sourceTable, {
|
|
1204
|
+
where: options.predicate,
|
|
1205
|
+
select: projection == null ? void 0 : projection.columns,
|
|
1206
|
+
limit: options.limit,
|
|
1207
|
+
signal: options.signal
|
|
1208
|
+
});
|
|
1233
1209
|
}
|
|
1234
1210
|
function queryArrowTableRelational(sourceTable, options) {
|
|
1235
1211
|
var _a, _b, _c, _d, _e, _f;
|
|
1236
|
-
const sourceData = sourceTable
|
|
1212
|
+
const sourceData = sourceTable;
|
|
1237
1213
|
const sourceColumnNames = sourceData.schema.fields.map((field) => field.name);
|
|
1238
1214
|
const relationalPlan = planRelationalQuery(sourceColumnNames, options);
|
|
1239
1215
|
const scanStep = relationalPlan.tablePlan.find((step) => step.kind === "scan");
|
|
1240
1216
|
if (!scanStep || scanStep.kind !== "scan") {
|
|
1241
1217
|
throw new Error("Arrow relational query plan is missing a scan step.");
|
|
1242
1218
|
}
|
|
1243
|
-
const scannedTable =
|
|
1219
|
+
const scannedTable = sourceData.select([...scanStep.columns]);
|
|
1244
1220
|
const filteredTable = queryArrowTable(scannedTable, {
|
|
1245
1221
|
predicate: options.predicate,
|
|
1246
1222
|
columns: scanStep.columns,
|
|
1247
1223
|
signal: options.signal
|
|
1248
1224
|
});
|
|
1249
|
-
let rows = arrowTableToRows(filteredTable
|
|
1225
|
+
let rows = arrowTableToRows(filteredTable);
|
|
1250
1226
|
for (const child of options.union || []) {
|
|
1251
1227
|
const childTable = (_a = options.tables) == null ? void 0 : _a[child.source];
|
|
1252
1228
|
if (!childTable)
|
|
@@ -1256,7 +1232,7 @@ function queryArrowTableRelational(sourceTable, options) {
|
|
|
1256
1232
|
columns: getUnionChildColumns(sourceColumnNames, options),
|
|
1257
1233
|
signal: options.signal
|
|
1258
1234
|
});
|
|
1259
|
-
rows = rows.concat(arrowTableToRows(childResult
|
|
1235
|
+
rows = rows.concat(arrowTableToRows(childResult));
|
|
1260
1236
|
}
|
|
1261
1237
|
for (const expression of options.expressions || []) {
|
|
1262
1238
|
for (const row of rows) {
|
|
@@ -1338,12 +1314,12 @@ function queryArrowJoin(sourceTable, options) {
|
|
|
1338
1314
|
...join.child.query || {},
|
|
1339
1315
|
signal: options.signal
|
|
1340
1316
|
});
|
|
1341
|
-
const leftRows = arrowTableToRows(leftResult
|
|
1342
|
-
const rightRows = arrowTableToRows(rightResult
|
|
1317
|
+
const leftRows = arrowTableToRows(leftResult);
|
|
1318
|
+
const rightRows = arrowTableToRows(rightResult);
|
|
1343
1319
|
const rightPrefix = `${join.child.source}.`;
|
|
1344
1320
|
const defaultOutputColumns = [
|
|
1345
|
-
...sourceTable.
|
|
1346
|
-
...rightResult.
|
|
1321
|
+
...sourceTable.schema.fields.map((field) => field.name),
|
|
1322
|
+
...rightResult.schema.fields.map((field) => `${rightPrefix}${field.name}`)
|
|
1347
1323
|
];
|
|
1348
1324
|
const rows = [];
|
|
1349
1325
|
for (const leftRow of leftRows) {
|
|
@@ -1359,7 +1335,7 @@ function queryArrowJoin(sourceTable, options) {
|
|
|
1359
1335
|
const outputColumns = options.columns || defaultOutputColumns;
|
|
1360
1336
|
const outputRows = rows.map((row) => Object.fromEntries(outputColumns.map((column) => [column, row[column]])));
|
|
1361
1337
|
const limitedRows = outputRows.slice(0, options.limit);
|
|
1362
|
-
return limitedRows.length ? convertRowsToArrowTable(limitedRows) : createEmptyRelationalResult(sourceTable
|
|
1338
|
+
return limitedRows.length ? convertRowsToArrowTable(limitedRows) : createEmptyRelationalResult(sourceTable, outputColumns, options, new Map(rightResult.schema.fields.map((field) => [
|
|
1363
1339
|
`${rightPrefix}${field.name}`,
|
|
1364
1340
|
new arrow6.Field(`${rightPrefix}${field.name}`, field.type, field.nullable, field.metadata)
|
|
1365
1341
|
])));
|
|
@@ -1369,11 +1345,11 @@ function validateArrowJoinQuery(sourceTable, options) {
|
|
|
1369
1345
|
const join = options.join;
|
|
1370
1346
|
if (!join)
|
|
1371
1347
|
return;
|
|
1372
|
-
const sourceColumnNames = sourceTable.
|
|
1348
|
+
const sourceColumnNames = sourceTable.schema.fields.map((field) => field.name);
|
|
1373
1349
|
const childTable = (_a = options.tables) == null ? void 0 : _a[join.child.source];
|
|
1374
1350
|
if (!childTable)
|
|
1375
1351
|
throw new Error(`Arrow join source not found: ${join.child.source}`);
|
|
1376
|
-
const childColumnNames = childTable.
|
|
1352
|
+
const childColumnNames = childTable.schema.fields.map((field) => field.name);
|
|
1377
1353
|
if (!sourceColumnNames.includes(join.left)) {
|
|
1378
1354
|
throw new Error(`Arrow join column not found: ${join.left}`);
|
|
1379
1355
|
}
|
|
@@ -1532,7 +1508,7 @@ function createEmptyRelationalResult(sourceData, outputColumns, options, additio
|
|
|
1532
1508
|
const columns = {};
|
|
1533
1509
|
for (const field of fields)
|
|
1534
1510
|
columns[field.name] = arrow6.vectorFromArray([], field.type);
|
|
1535
|
-
return
|
|
1511
|
+
return new arrow6.Table(new arrow6.Schema(fields), columns);
|
|
1536
1512
|
}
|
|
1537
1513
|
function getExpressionType(expression, sourceFields) {
|
|
1538
1514
|
var _a;
|
|
@@ -1575,26 +1551,6 @@ function evaluateAggregate(aggregate, rows) {
|
|
|
1575
1551
|
return Math.max(...numericValues);
|
|
1576
1552
|
}
|
|
1577
1553
|
}
|
|
1578
|
-
function getScanStep(plan) {
|
|
1579
|
-
const step = plan.find((candidate) => candidate.kind === "scan");
|
|
1580
|
-
if (!step) {
|
|
1581
|
-
throw new Error("Arrow query plan is missing a scan step.");
|
|
1582
|
-
}
|
|
1583
|
-
return step;
|
|
1584
|
-
}
|
|
1585
|
-
function getFilterStep(plan) {
|
|
1586
|
-
return plan.find((candidate) => candidate.kind === "filter");
|
|
1587
|
-
}
|
|
1588
|
-
function getProjectStep(plan) {
|
|
1589
|
-
const step = plan.find((candidate) => candidate.kind === "project");
|
|
1590
|
-
if (!step) {
|
|
1591
|
-
throw new Error("Arrow query plan is missing a project step.");
|
|
1592
|
-
}
|
|
1593
|
-
return step;
|
|
1594
|
-
}
|
|
1595
|
-
function getLimitStep(plan) {
|
|
1596
|
-
return plan.find((candidate) => candidate.kind === "limit");
|
|
1597
|
-
}
|
|
1598
1554
|
function throwIfAborted(signal) {
|
|
1599
1555
|
if (signal == null ? void 0 : signal.aborted) {
|
|
1600
1556
|
const error = new Error("Arrow query was aborted.");
|
|
@@ -1602,13 +1558,6 @@ function throwIfAborted(signal) {
|
|
|
1602
1558
|
throw error;
|
|
1603
1559
|
}
|
|
1604
1560
|
}
|
|
1605
|
-
function wrapArrowTable(data) {
|
|
1606
|
-
return {
|
|
1607
|
-
shape: "arrow-table",
|
|
1608
|
-
schema: convertArrowToSchema(data.schema),
|
|
1609
|
-
data
|
|
1610
|
-
};
|
|
1611
|
-
}
|
|
1612
1561
|
|
|
1613
1562
|
// dist/scan/vector-table-scan-source.js
|
|
1614
1563
|
var AddressedVectorTableScanSource = class {
|
|
@@ -1631,7 +1580,7 @@ var AddressedVectorTableScanSource = class {
|
|
|
1631
1580
|
/** Discovers the addressed result schema and portable residual-query capabilities. */
|
|
1632
1581
|
async getQueryMetadata(options = {}) {
|
|
1633
1582
|
const table = await this.getTable(options.signal);
|
|
1634
|
-
const schema =
|
|
1583
|
+
const schema = convertArrowToSchema(table.schema);
|
|
1635
1584
|
return createScanQueryMetadata({
|
|
1636
1585
|
sourceType: this.sourceType,
|
|
1637
1586
|
queryType: "table",
|
|
@@ -1646,7 +1595,7 @@ var AddressedVectorTableScanSource = class {
|
|
|
1646
1595
|
},
|
|
1647
1596
|
columnRoles: inferVectorColumnRoles(schema.fields.map((field) => field.name)),
|
|
1648
1597
|
spatial: this.spatial,
|
|
1649
|
-
statistics: { rowCount: table.
|
|
1598
|
+
statistics: { rowCount: table.numRows }
|
|
1650
1599
|
});
|
|
1651
1600
|
}
|
|
1652
1601
|
/** Applies the portable Arrow query to the addressed feature table. */
|
|
@@ -1661,8 +1610,11 @@ var AddressedVectorTableScanSource = class {
|
|
|
1661
1610
|
}
|
|
1662
1611
|
/** Emits the portable query result as one bounded Arrow batch. */
|
|
1663
1612
|
async *read(options = {}) {
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1613
|
+
const data = await this.query(options);
|
|
1614
|
+
if (data.batches.length)
|
|
1615
|
+
yield* data.batches;
|
|
1616
|
+
else
|
|
1617
|
+
yield makeArrowMetadataBatch(data.schema);
|
|
1666
1618
|
}
|
|
1667
1619
|
/** Scans the addressed query result through the same batch contract as `read()`. */
|
|
1668
1620
|
scan(options = {}) {
|
|
@@ -1676,9 +1628,6 @@ var AddressedVectorTableScanSource = class {
|
|
|
1676
1628
|
if (!table) {
|
|
1677
1629
|
throw new Error("The addressed vector selection did not return a feature table.");
|
|
1678
1630
|
}
|
|
1679
|
-
if (table.shape !== "arrow-table") {
|
|
1680
|
-
throw new Error('The addressed vector selection must return an Arrow table. Configure the source with shape "arrow-table".');
|
|
1681
|
-
}
|
|
1682
1631
|
return table;
|
|
1683
1632
|
}).catch((error) => {
|
|
1684
1633
|
this.tablePromise = null;
|
|
@@ -1711,8 +1660,11 @@ var VectorTileTableScanSource = class extends AddressedVectorTableScanSource {
|
|
|
1711
1660
|
this.tile = tile;
|
|
1712
1661
|
}
|
|
1713
1662
|
/** Loads the bound vector tile using the source's requested Arrow output shape. */
|
|
1714
|
-
loadTable(signal) {
|
|
1715
|
-
|
|
1663
|
+
async loadTable(signal) {
|
|
1664
|
+
const tile = await this.source.getVectorTile({ ...this.tile, signal });
|
|
1665
|
+
if (tile === null || isArrowTable(tile))
|
|
1666
|
+
return tile;
|
|
1667
|
+
throw new Error('The addressed vector selection must return an Arrow table. Configure the source with shape "arrow".');
|
|
1716
1668
|
}
|
|
1717
1669
|
};
|
|
1718
1670
|
var VectorFeatureTableScanSource = class extends AddressedVectorTableScanSource {
|
|
@@ -1747,12 +1699,9 @@ var VectorFeatureTableScanSource = class extends AddressedVectorTableScanSource
|
|
|
1747
1699
|
this.request = request;
|
|
1748
1700
|
}
|
|
1749
1701
|
/** Loads the bound service request through the source's Arrow feature output. */
|
|
1750
|
-
loadTable(signal) {
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
format: "arrow",
|
|
1754
|
-
signal
|
|
1755
|
-
});
|
|
1702
|
+
async loadTable(signal) {
|
|
1703
|
+
const data = await this.source.getFeatures({ ...this.request, format: "arrow", signal });
|
|
1704
|
+
return isArrowTable(data) ? data : null;
|
|
1756
1705
|
}
|
|
1757
1706
|
};
|
|
1758
1707
|
function getWGS84TileBounds(tile) {
|