@loaders.gl/core 5.0.0-beta.7 → 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 +295 -18
- package/dist/arrow-geometry/geojson-table.cjs.map +4 -4
- package/dist/arrow-geometry/geojson-table.d.ts +10 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +23 -13
- package/dist/arrow-geometry/geojson-table.js.map +1 -1
- package/dist/arrow-geometry/geometry-codecs.cjs +6 -6
- package/dist/arrow-geometry/geometry-codecs.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-codecs.js +1 -1
- package/dist/arrow-geometry/geometry-codecs.js.map +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.cjs +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.js +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.js.map +1 -1
- package/dist/arrow-geometry/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 +274 -509
- package/dist/cluster-source.cjs.map +3 -3
- package/dist/dist.dev.js +478 -450
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +121 -485
- 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 +8 -9
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +5 -9
- 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 +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +2 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts +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 +3 -2
- 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 +44 -2
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +4 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.js +3 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.js.map +1 -1
- package/dist/index.cjs +486 -410
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +20 -9
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +55 -45
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode.d.ts +1 -1
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +11 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +3 -2
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +3 -3
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +15 -19
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +7 -3
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +15 -67
- 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 +5 -3
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +8 -6
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +5 -3
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +60 -9
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +5 -3
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +3 -4
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +5 -3
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +22 -14
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts +4 -2
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +47 -53
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/api/select-source.js +1 -1
- package/dist/lib/api/select-source.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +2 -2
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/loggers.d.ts +2 -37
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +2 -63
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +13 -0
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -0
- package/dist/lib/loader-utils/native-arrow.js +66 -0
- package/dist/lib/loader-utils/native-arrow.js.map +1 -0
- package/dist/lib/loader-utils/option-defaults.d.ts +3 -2
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +9 -10
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +0 -6
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +31 -114
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +3 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -1
- package/dist/loader-utils/index.cjs +257 -88
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +9 -4
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +5 -3
- 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 +23 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +32 -1
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -1
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts +14 -0
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts.map +1 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js +51 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +1 -1
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts +5 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js +13 -5
- package/dist/loader-utils/lib/scan-utils/logical-table-query.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 +22 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.js +6 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +17 -11
- 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 +53 -32
- 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 +3 -13
- 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 +26 -15
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +114 -87
- package/dist/loader-utils/loader-types.d.ts.map +1 -1
- package/dist/loader-utils/loader-types.js.map +1 -1
- package/dist/loader-utils/source-types.d.ts +7 -5
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +9 -1
- package/dist/loader-utils/source-types.js.map +1 -1
- package/dist/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/polyfills/index.cjs +3 -2
- package/dist/polyfills/index.d.ts.map +1 -1
- package/dist/polyfills/index.js +2 -2
- package/dist/polyfills/index.js.map +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +36 -12
- package/dist/scan/arrow-execution/expressions.cjs.map +3 -3
- 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 +36 -12
- package/dist/scan/index.cjs.map +3 -3
- package/dist/scan/index.d.ts +11 -6
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +8 -5
- 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 +190 -0
- package/dist/scan/query-progressive.cjs.map +7 -0
- package/dist/scan/query-progressive.d.ts +41 -0
- package/dist/scan/query-progressive.d.ts.map +1 -0
- package/dist/scan/query-progressive.js +173 -0
- package/dist/scan/query-progressive.js.map +1 -0
- package/dist/scan/query-pushdown.cjs +140 -0
- package/dist/scan/query-pushdown.cjs.map +7 -0
- package/dist/scan/query-pushdown.d.ts +14 -0
- package/dist/scan/query-pushdown.d.ts.map +1 -0
- package/dist/scan/query-pushdown.js +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 +141 -92
- package/dist/scan/query.cjs.map +3 -3
- package/dist/scan/query.d.ts +37 -10
- package/dist/scan/query.d.ts.map +1 -1
- package/dist/scan/query.js +137 -96
- 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 +410 -626
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -6
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -5
- 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 +7 -3
- 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/row-utils.js +2 -2
- package/dist/schema-utils/lib/table/tables/row-utils.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +18 -16
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.js +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 -291
- 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 +51 -11
- package/dist/worker-utils/index.cjs.map +3 -3
- package/dist/worker-utils/lib/env-utils/version.js +1 -1
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js +2 -1
- package/dist/worker-utils/lib/library-utils/library-utils.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/process-utils/child-process-proxy.d.ts.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +8 -7
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +5 -2
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +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/lib/worker-utils/get-loadable-worker-url.js +1 -6
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js.map +1 -1
- package/dist/worker-utils/null-worker.js.map +1 -1
- package/package.json +102 -12
- 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 +32 -21
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/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 +8 -12
- 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 +4 -3
- 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/geoarrow/metadata/geoarrow-metadata.ts +3 -4
- package/src/index.ts +2 -6
- package/src/lib/api/create-data-source.ts +148 -58
- package/src/lib/api/encode.ts +14 -3
- package/src/lib/api/load-in-batches.ts +15 -7
- package/src/lib/api/load-loader.ts +22 -21
- package/src/lib/api/load.ts +51 -127
- package/src/lib/api/loader-options.ts +69 -0
- package/src/lib/api/parse-file.ts +32 -22
- package/src/lib/api/parse-in-batches.ts +121 -20
- package/src/lib/api/parse-sync.ts +30 -16
- package/src/lib/api/parse.ts +46 -29
- package/src/lib/api/select-loader.ts +54 -69
- package/src/lib/api/select-source.ts +7 -1
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/loggers.ts +2 -70
- package/src/lib/loader-utils/native-arrow.ts +83 -0
- package/src/lib/loader-utils/option-defaults.ts +9 -10
- package/src/lib/loader-utils/option-utils.ts +33 -122
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +19 -3
- package/src/loader-utils/lib/log-utils/log.ts +36 -1
- package/src/loader-utils/lib/pace-batch-iterator.ts +66 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +1 -1
- package/src/loader-utils/lib/scan-utils/logical-table-query.ts +18 -8
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +68 -6
- package/src/loader-utils/lib/scan-utils/table-query.ts +28 -1
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +88 -56
- package/src/loader-utils/lib/sources/data-source.ts +3 -15
- 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 +27 -18
- package/src/loader-utils/loader-types.ts +186 -107
- package/src/loader-utils/source-types.ts +17 -6
- package/src/null-loader.ts +1 -20
- package/src/polyfills/index.ts +3 -3
- 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 +41 -11
- 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 +230 -0
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +299 -0
- package/src/scan/query.ts +254 -127
- 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 -11
- 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 +8 -4
- 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/row-utils.ts +2 -2
- 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/library-utils/library-utils.ts +2 -1
- package/src/worker-utils/lib/npm-tag.ts +1 -1
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +8 -7
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +4 -3
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +7 -4
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +1 -6
- 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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-arrow-table.js","sourceRoot":"","sources":["../../../../src/schema-utils/lib/table/query-arrow-table.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;
|
|
1
|
+
{"version":3,"file":"query-arrow-table.js","sourceRoot":"","sources":["../../../../src/schema-utils/lib/table/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AC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,UAAU,CAAE,CACjF,EACD,UAAU,CAAC,MAAM,CAAC,QAAQ,CAC3B,CAAC;IACF,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CAChC,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;QAC/B,MAAM,YAAY,GAAG,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACrD,OAAO;YACL,UAAU;YACV,KAAK,CAAC,eAAe,CACnB,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,EACvD,YAAY,EAAE,IAAI,CACnB;SACF,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;IACF,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,IAAI,CACzB,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAC/B,CAAC,EACD,UAAU,CAAC,MAAM,EACjB,CAAC,EACD,SAAS,EACT,QAAQ,CACT,CAAC;IACF,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import * as arrow from 'apache-arrow';
|
|
2
|
-
import type { Table, ArrayRowTable, ColumnarTable, ObjectRowTable, GeoJSONTable
|
|
2
|
+
import type { Table, ArrayRowTable, ColumnarTable, ObjectRowTable, GeoJSONTable } from '@loaders.gl/core/schema';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @param metadata
|
|
7
|
-
* @param batchSize
|
|
8
|
-
* @returns
|
|
4
|
+
* Converts a loaders.gl table to native Arrow and preserves the schema on empty input.
|
|
5
|
+
* Native Arrow inputs retain their identity.
|
|
9
6
|
*/
|
|
10
|
-
export declare function convertTableToArrow(table: Table, options?: {
|
|
7
|
+
export declare function convertTableToArrow(table: Table | arrow.Table, options?: {
|
|
11
8
|
batchSize?: number;
|
|
12
9
|
}): arrow.Table;
|
|
10
|
+
/** Loader table layouts produced when converting from Arrow. */
|
|
11
|
+
type NonArrowTableShape = Table['shape'];
|
|
13
12
|
/**
|
|
14
13
|
* Convert an Apache Arrow table to a loaders.gl Table
|
|
15
14
|
* @note Currently does not convert schema
|
|
16
15
|
*/
|
|
17
|
-
export declare function convertArrowToTable(arrow: arrow.Table, shape: 'arrow
|
|
16
|
+
export declare function convertArrowToTable(arrow: arrow.Table, shape: 'arrow'): arrow.Table;
|
|
18
17
|
export declare function convertArrowToTable(arrow: arrow.Table, shape: 'columnar-table'): ColumnarTable;
|
|
19
18
|
export declare function convertArrowToTable(arrow: arrow.Table, shape: 'object-row-table'): ObjectRowTable;
|
|
20
19
|
export declare function convertArrowToTable(arrow: arrow.Table, shape: 'array-row-table'): ArrayRowTable;
|
|
21
20
|
export declare function convertArrowToTable(arrow: arrow.Table, shape: 'geojson-table'): GeoJSONTable;
|
|
22
|
-
export declare function convertArrowToTable(arrow: arrow.Table, shape:
|
|
23
|
-
export
|
|
21
|
+
export declare function convertArrowToTable(arrow: arrow.Table, shape: NonArrowTableShape): Table;
|
|
22
|
+
export {};
|
|
24
23
|
//# sourceMappingURL=convert-arrow-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-arrow-table.d.ts","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/convert-arrow-table.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,
|
|
1
|
+
{"version":3,"file":"convert-arrow-table.d.ts","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/convert-arrow-table.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EAEb,MAAM,yBAAyB,CAAC;AAOjC;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAC1B,OAAO,CAAC,EAAE;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAC,GAC7B,KAAK,CAAC,KAAK,CAMb;AAED,gEAAgE;AAChE,KAAK,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAEzC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC;AACrF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,gBAAgB,GAAG,aAAa,CAAC;AAChG,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,kBAAkB,GAAG,cAAc,CAAC;AACnG,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,iBAAiB,GAAG,aAAa,CAAC;AACjG,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,eAAe,GAAG,YAAY,CAAC;AAC9F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,kBAAkB,GAAG,KAAK,CAAC"}
|
|
@@ -3,27 +3,20 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import * as arrow from 'apache-arrow';
|
|
5
5
|
import { convertTable } from "./convert-table.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { deduceTableSchema } from "../../schema/deduce-table-schema.js";
|
|
7
|
+
import { convertArrowToSchema, convertSchemaToArrow } from "../../schema/convert-arrow-schema.js";
|
|
8
|
+
import { makePortableTableRecordBatchIterator } from "../batches/make-arrow-batch-iterator.js";
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @param metadata
|
|
12
|
-
* @param batchSize
|
|
13
|
-
* @returns
|
|
10
|
+
* Converts a loaders.gl table to native Arrow and preserves the schema on empty input.
|
|
11
|
+
* Native Arrow inputs retain their identity.
|
|
14
12
|
*/
|
|
15
13
|
export function convertTableToArrow(table, options) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// fall through
|
|
23
|
-
default:
|
|
24
|
-
const arrowBatchIterator = makeArrowRecordBatchIterator(table, options);
|
|
25
|
-
return new arrow.Table(arrowBatchIterator);
|
|
26
|
-
}
|
|
14
|
+
if (!('shape' in table))
|
|
15
|
+
return table;
|
|
16
|
+
const schema = table.schema ?? deduceTableSchema(table);
|
|
17
|
+
return new arrow.Table(convertSchemaToArrow(schema), [
|
|
18
|
+
...makePortableTableRecordBatchIterator({ ...table, schema }, options)
|
|
19
|
+
]);
|
|
27
20
|
}
|
|
28
21
|
/**
|
|
29
22
|
* Convert an Apache Arrow table to a loaders.gl Table
|
|
@@ -31,8 +24,8 @@ export function convertTableToArrow(table, options) {
|
|
|
31
24
|
*/
|
|
32
25
|
export function convertArrowToTable(arrowTable, shape) {
|
|
33
26
|
switch (shape) {
|
|
34
|
-
case 'arrow
|
|
35
|
-
return
|
|
27
|
+
case 'arrow':
|
|
28
|
+
return arrowTable;
|
|
36
29
|
case 'array-row-table':
|
|
37
30
|
return convertArrowToArrayRowTable(arrowTable);
|
|
38
31
|
case 'object-row-table':
|
|
@@ -45,19 +38,6 @@ export function convertArrowToTable(arrowTable, shape) {
|
|
|
45
38
|
throw new Error(shape);
|
|
46
39
|
}
|
|
47
40
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Wrap an apache arrow table in a loaders.gl table wrapper.
|
|
50
|
-
* From this additional conversions are available.
|
|
51
|
-
* @param arrowTable
|
|
52
|
-
* @returns
|
|
53
|
-
*/
|
|
54
|
-
function convertArrowToArrowTable(arrowTable) {
|
|
55
|
-
return {
|
|
56
|
-
shape: 'arrow-table',
|
|
57
|
-
schema: convertArrowToSchema(arrowTable.schema),
|
|
58
|
-
data: arrowTable
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
41
|
function convertArrowToArrayRowTable(arrowTable) {
|
|
62
42
|
const columnarTable = convertArrowToColumnarTable(arrowTable);
|
|
63
43
|
return convertTable(columnarTable, 'array-row-table');
|
|
@@ -77,7 +57,8 @@ function convertArrowToColumnarTable(arrowTable) {
|
|
|
77
57
|
for (const field of arrowTable.schema.fields) {
|
|
78
58
|
// This (is intended to) coalesce all record batches into a single typed array
|
|
79
59
|
const arrowColumn = arrowTable.getChild(field.name);
|
|
80
|
-
|
|
60
|
+
// Typed value buffers omit the validity bitmap; materialize nullable columns through Arrow.
|
|
61
|
+
const values = arrowColumn?.nullCount ? Array.from(arrowColumn) : arrowColumn?.toArray();
|
|
81
62
|
columns[field.name] = values;
|
|
82
63
|
}
|
|
83
64
|
const schema = convertArrowToSchema(arrowTable.schema);
|
|
@@ -106,46 +87,4 @@ function convertArrowToGeoJSONTable(arrowTable) {
|
|
|
106
87
|
features
|
|
107
88
|
};
|
|
108
89
|
}
|
|
109
|
-
// /**
|
|
110
|
-
// * Wrap an apache arrow table in a loaders.gl table wrapper.
|
|
111
|
-
// * From this additional conversions are available.
|
|
112
|
-
// * @param arrowTable
|
|
113
|
-
// * @returns
|
|
114
|
-
// */
|
|
115
|
-
// function convertArrowToArrowTable(arrowTable: arrow.Table): ArrowTable {
|
|
116
|
-
// return {
|
|
117
|
-
// shape: 'arrow-table',
|
|
118
|
-
// schema: convertArrowToSchema(arrowTable.schema),
|
|
119
|
-
// data: arrowTable
|
|
120
|
-
// };
|
|
121
|
-
// }
|
|
122
|
-
// function convertArrowToArrayRowTable(arrowTable: arrow.Table): Table {
|
|
123
|
-
// const columnarTable = convertArrowToColumnarTable(arrowTable);
|
|
124
|
-
// return convertTable(columnarTable, 'array-row-table');
|
|
125
|
-
// }
|
|
126
|
-
// function convertArrowToObjectRowTable(arrowTable: arrow.Table): Table {
|
|
127
|
-
// const columnarTable = convertArrowToColumnarTable(arrowTable);
|
|
128
|
-
// return convertTable(columnarTable, 'object-row-table');
|
|
129
|
-
// }
|
|
130
|
-
// /**
|
|
131
|
-
// * Convert an Apache Arrow table to a ColumnarTable
|
|
132
|
-
// * @note Currently does not convert schema
|
|
133
|
-
// */
|
|
134
|
-
// function convertArrowToColumnarTable(arrowTable: arrow.Table): ColumnarTable {
|
|
135
|
-
// // TODO - avoid calling `getColumn` on columns we are not interested in?
|
|
136
|
-
// // Add options object?
|
|
137
|
-
// const columns: ColumnarTable['data'] = {};
|
|
138
|
-
// for (const field of arrowTable.schema.fields) {
|
|
139
|
-
// // This (is intended to) coalesce all record batches into a single typed array
|
|
140
|
-
// const arrowColumn = arrowTable.getChild(field.name);
|
|
141
|
-
// const values = arrowColumn?.toArray();
|
|
142
|
-
// columns[field.name] = values;
|
|
143
|
-
// }
|
|
144
|
-
// const schema = convertArrowToSchema(arrowTable.schema);
|
|
145
|
-
// return {
|
|
146
|
-
// shape: 'columnar-table',
|
|
147
|
-
// schema,
|
|
148
|
-
// data: columns
|
|
149
|
-
// };
|
|
150
|
-
// }
|
|
151
90
|
//# sourceMappingURL=convert-arrow-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-arrow-table.js","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/convert-arrow-table.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"convert-arrow-table.js","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/convert-arrow-table.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAUtC,OAAO,EAAC,YAAY,EAAC,2BAAwB;AAC7C,OAAO,EAAC,iBAAiB,EAAC,4CAAyC;AACnE,OAAO,EAAC,oBAAoB,EAAE,oBAAoB,EAAC,6CAA0C;AAC7F,OAAO,EAAC,oCAAoC,EAAC,gDAA6C;AAE1F;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAA0B,EAC1B,OAA8B;IAE9B,IAAI,CAAC,CAAC,OAAO,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACtC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACxD,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE;QACnD,GAAG,oCAAoC,CAAC,EAAC,GAAG,KAAK,EAAE,MAAM,EAAC,EAAE,OAAO,CAAC;KACrE,CAAC,CAAC;AACL,CAAC;AAgBD;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,UAAuB,EACvB,KAAmC;IAEnC,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,OAAO;YACV,OAAO,UAAU,CAAC;QACpB,KAAK,iBAAiB;YACpB,OAAO,2BAA2B,CAAC,UAAU,CAAC,CAAC;QACjD,KAAK,kBAAkB;YACrB,OAAO,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAClD,KAAK,gBAAgB;YACnB,OAAO,2BAA2B,CAAC,UAAU,CAAC,CAAC;QACjD,KAAK,eAAe;YA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C;IAEvD,MAAM,QAAQ,GAAc,EAAE,CAAC;IAE/B,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC;QAClD,0CAA0C;QAC1C,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACvD,QAAQ,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAK,EAAE,UAAU,EAAC,CAAC,CAAC;IAChE,CAAC;IAED,OAAO;QACL,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,mBAAmB;QACzB,MAAM;QACN,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,43 +1,13 @@
|
|
|
1
|
-
import type { Table, ArrayRowTable, ObjectRowTable, ColumnarTable
|
|
2
|
-
|
|
3
|
-
export declare function convertTable(table: Table, shape: '
|
|
4
|
-
export declare function convertTable(table: Table, shape: '
|
|
5
|
-
export declare function convertTable(table: Table, shape: '
|
|
1
|
+
import type { Table, ArrayRowTable, ObjectRowTable, ColumnarTable } from '@loaders.gl/core/schema';
|
|
2
|
+
import type * as arrow from 'apache-arrow';
|
|
3
|
+
export declare function convertTable(table: Table | arrow.Table, shape: 'object-row-table'): ObjectRowTable;
|
|
4
|
+
export declare function convertTable(table: Table | arrow.Table, shape: 'array-row-table'): ArrayRowTable;
|
|
5
|
+
export declare function convertTable(table: Table | arrow.Table, shape: 'columnar-table'): ColumnarTable;
|
|
6
|
+
export declare function convertTable(table: Table | arrow.Table, shape: 'arrow'): arrow.Table;
|
|
6
7
|
/** Convert any simple table into columnar format */
|
|
7
8
|
export declare function convertToColumnarTable(table: Table): ColumnarTable;
|
|
8
9
|
/** Convert any table into array row format */
|
|
9
10
|
export declare function convertToArrayRowTable(table: Table): ArrayRowTable;
|
|
10
11
|
/** Convert any table into object row format */
|
|
11
12
|
export declare function convertToObjectRowTable(table: Table): ObjectRowTable;
|
|
12
|
-
/**
|
|
13
|
-
* Convert a table to apache arrow format
|
|
14
|
-
* @note this depends on the `@loaders.gl/tables/arrow module being imported
|
|
15
|
-
*/
|
|
16
|
-
export declare function convertToArrowTable(table: Table): ArrowTable;
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @note - should be part of schema module
|
|
20
|
-
*
|
|
21
|
-
export function convertColumnarToRowFormatTable(columnarTable: ColumnarTable): ObjectRowTable {
|
|
22
|
-
const tableKeys = Object.keys(columnarTable);
|
|
23
|
-
const tableRowsCount = columnarTable[tableKeys[0]].length;
|
|
24
|
-
|
|
25
|
-
const rowFormatTable: {}[] = [];
|
|
26
|
-
|
|
27
|
-
for (let index = 0; index < tableRowsCount; index++) {
|
|
28
|
-
const tableItem = {};
|
|
29
|
-
for (let keyIndex = 0; keyIndex < tableKeys.length; keyIndex++) {
|
|
30
|
-
const fieldName = tableKeys[keyIndex];
|
|
31
|
-
tableItem[fieldName] = columnarTable[fieldName][index];
|
|
32
|
-
}
|
|
33
|
-
rowFormatTable.push(tableItem);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
shape: 'object-row-table',
|
|
38
|
-
schema: columnarTable.schema,
|
|
39
|
-
data: rowFormatTable
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
*/
|
|
43
13
|
//# sourceMappingURL=convert-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-table.d.ts","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/convert-table.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"convert-table.d.ts","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/convert-table.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AASjG,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAG3C,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,kBAAkB,GAAG,cAAc,CAAC;AACpG,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,iBAAiB,GAAG,aAAa,CAAC;AAClG,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,gBAAgB,GAAG,aAAa,CAAC;AACjG,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC;AA0BtF,oDAAoD;AACpD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa,CAyBlE;AAED,8CAA8C;AAC9C,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa,CAclE;AAED,+CAA+C;AAC/C,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,KAAK,GAAG,cAAc,CAcpE"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { getTableCell, getTableLength, getTableRowAsArray, getTableRowAsObject } from "./table-accessors.js";
|
|
5
5
|
import { deduceTableSchema } from "../../schema/deduce-table-schema.js";
|
|
6
6
|
import { makeColumnFromField } from "./table-column.js";
|
|
7
|
-
import { convertTableToArrow } from "./convert-arrow-table.js";
|
|
7
|
+
import { convertArrowToTable, convertTableToArrow } from "./convert-arrow-table.js";
|
|
8
8
|
/**
|
|
9
9
|
* Convert a table to a different shape
|
|
10
10
|
* @param table
|
|
@@ -12,6 +12,10 @@ import { convertTableToArrow } from "./convert-arrow-table.js";
|
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
14
|
export function convertTable(table, shape) {
|
|
15
|
+
if (shape === 'arrow')
|
|
16
|
+
return convertTableToArrow(table);
|
|
17
|
+
if (!('shape' in table))
|
|
18
|
+
return convertArrowToTable(table, shape);
|
|
15
19
|
switch (shape) {
|
|
16
20
|
case 'object-row-table':
|
|
17
21
|
return convertToObjectRowTable(table);
|
|
@@ -19,8 +23,6 @@ export function convertTable(table, shape) {
|
|
|
19
23
|
return convertToArrayRowTable(table);
|
|
20
24
|
case 'columnar-table':
|
|
21
25
|
return convertToColumnarTable(table);
|
|
22
|
-
case 'arrow-table':
|
|
23
|
-
return convertToArrowTable(table);
|
|
24
26
|
default:
|
|
25
27
|
throw new Error(shape);
|
|
26
28
|
}
|
|
@@ -80,43 +82,4 @@ export function convertToObjectRowTable(table) {
|
|
|
80
82
|
data
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
|
-
/**
|
|
84
|
-
* Convert a table to apache arrow format
|
|
85
|
-
* @note this depends on the `@loaders.gl/tables/arrow module being imported
|
|
86
|
-
*/
|
|
87
|
-
export function convertToArrowTable(table) {
|
|
88
|
-
const schema = table.schema || deduceTableSchema(table);
|
|
89
|
-
const arrowTable = convertTableToArrow({ ...table, schema });
|
|
90
|
-
return {
|
|
91
|
-
shape: 'arrow-table',
|
|
92
|
-
schema,
|
|
93
|
-
data: arrowTable
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
*
|
|
98
|
-
* @note - should be part of schema module
|
|
99
|
-
*
|
|
100
|
-
export function convertColumnarToRowFormatTable(columnarTable: ColumnarTable): ObjectRowTable {
|
|
101
|
-
const tableKeys = Object.keys(columnarTable);
|
|
102
|
-
const tableRowsCount = columnarTable[tableKeys[0]].length;
|
|
103
|
-
|
|
104
|
-
const rowFormatTable: {}[] = [];
|
|
105
|
-
|
|
106
|
-
for (let index = 0; index < tableRowsCount; index++) {
|
|
107
|
-
const tableItem = {};
|
|
108
|
-
for (let keyIndex = 0; keyIndex < tableKeys.length; keyIndex++) {
|
|
109
|
-
const fieldName = tableKeys[keyIndex];
|
|
110
|
-
tableItem[fieldName] = columnarTable[fieldName][index];
|
|
111
|
-
}
|
|
112
|
-
rowFormatTable.push(tableItem);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return {
|
|
116
|
-
shape: 'object-row-table',
|
|
117
|
-
schema: columnarTable.schema,
|
|
118
|
-
data: rowFormatTable
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
*/
|
|
122
85
|
//# sourceMappingURL=convert-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-table.js","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/convert-table.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;
|
|
1
|
+
{"version":3,"file":"convert-table.js","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/convert-table.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EACL,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACpB,6BAA0B;AAC3B,OAAO,EAAC,iBAAiB,EAAC,4CAAyC;AACnE,OAAO,EAAC,mBAAmB,EAAC,0BAAuB;AAEnD,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,iCAA8B;AAO/E;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC1B,KAA0B,EAC1B,KAA0E;IAE1E,IAAI,KAAK,KAAK,OAAO;QAAE,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACzD,IAAI,CAAC,CAAC,OAAO,IAAI,KAAK,CAAC;QAAE,OAAO,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAClE,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,kBAAkB;YACrB,OAAO,uBAAuB,CAAC,KAAK,CAAC,CAAC;QACxC,KAAK,iBAAiB;YACpB,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACvC,KAAK,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AC;IACrC,MAAM,IAAI,GAAG,IAAI,KAAK,CAAY,MAAM,CAAC,CAAC;IAC1C,KAAK,IAAI,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;QACrD,IAAI,CAAC,QAAQ,CAAC,GAAG,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACvD,CAAC;IACD,OAAO;QACL,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI;KACL,CAAC;AACJ,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,uBAAuB,CAAC,KAAY;IAClD,IAAI,KAAK,CAAC,KAAK,KAAK,kBAAkB,EAAE,CAAC;QACvC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,KAAK,CAA2B,MAAM,CAAC,CAAC;IACzD,KAAK,IAAI,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;QACrD,IAAI,CAAC,QAAQ,CAAC,GAAG,mBAAmB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACxD,CAAC;IACD,OAAO;QACL,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI;KACL,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as arrow from 'apache-arrow';
|
|
2
|
-
import type { ArrayRowTable, ObjectRowTable, ColumnarTable
|
|
1
|
+
import type * as arrow from 'apache-arrow';
|
|
2
|
+
import type { ArrayRowTable, ObjectRowTable, ColumnarTable } from '@loaders.gl/core/schema';
|
|
3
3
|
/**
|
|
4
4
|
* Makes a typed table from data.
|
|
5
5
|
* @throws Row tables must contain at least one row. Columnar tables must contain empty arrays
|
|
@@ -11,57 +11,5 @@ export declare function makeTableFromData(data: {
|
|
|
11
11
|
export declare function makeTableFromData(data: {
|
|
12
12
|
[column: string]: ArrayLike<unknown>;
|
|
13
13
|
}): ColumnarTable;
|
|
14
|
-
export declare function makeTableFromData(data: arrow.Table):
|
|
15
|
-
/** Convert any table into object row format *
|
|
16
|
-
export function makeColumnarTable(table: Table): ColumnarTable {
|
|
17
|
-
if (table.shape === 'columnar-table') {
|
|
18
|
-
return table;
|
|
19
|
-
}
|
|
20
|
-
const length = getTableLength(table);
|
|
21
|
-
const data = new Array<{[key: string]: unknown}>(length);
|
|
22
|
-
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
23
|
-
data[rowIndex] = getTableRowAsObject(table, rowIndex);
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
shape: 'columnar-table',
|
|
27
|
-
schema: table.schema,
|
|
28
|
-
data
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/** Convert any table into array row format *
|
|
34
|
-
export function makeArrayRowTable(table: TableLike): ArrayRowTable {
|
|
35
|
-
if (table.shape === 'array-row-table') {
|
|
36
|
-
return table;
|
|
37
|
-
}
|
|
38
|
-
const length = getTableLength(table);
|
|
39
|
-
const data = new Array<unknown[]>(length);
|
|
40
|
-
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
41
|
-
data[rowIndex] = getTableRowAsArray(table, rowIndex);
|
|
42
|
-
}
|
|
43
|
-
return {
|
|
44
|
-
shape: 'array-row-table',
|
|
45
|
-
schema: table.schema,
|
|
46
|
-
data
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/** Convert any table into object row format *
|
|
51
|
-
export function makeObjectRowTable(table: Table): ObjectRowTable {
|
|
52
|
-
if (table.shape === 'object-row-table') {
|
|
53
|
-
return table;
|
|
54
|
-
}
|
|
55
|
-
const length = getTableLength(table);
|
|
56
|
-
const data = new Array<{[key: string]: unknown}>(length);
|
|
57
|
-
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
58
|
-
data[rowIndex] = getTableRowAsObject(table, rowIndex);
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
shape: 'object-row-table',
|
|
62
|
-
schema: table.schema,
|
|
63
|
-
data
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
*/
|
|
14
|
+
export declare function makeTableFromData(data: arrow.Table): arrow.Table;
|
|
67
15
|
//# sourceMappingURL=make-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-table.d.ts","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/make-table.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"make-table.d.ts","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/make-table.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAQ,aAAa,EAAE,cAAc,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAIjG;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,GAAG,aAAa,CAAC;AACpE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;CAAC,EAAE,GAAG,cAAc,CAAC;AACvF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAC,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,CAAA;CAAC,GAAG,aAAa,CAAC;AAC/F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// loaders.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
-
import
|
|
4
|
+
import { isArrowTable } from "../../../../lib/loader-utils/native-arrow.js";
|
|
5
5
|
import { deduceTableSchema } from "../../schema/deduce-table-schema.js";
|
|
6
6
|
export function makeTableFromData(data) {
|
|
7
|
+
if (isArrowTable(data))
|
|
8
|
+
return data;
|
|
7
9
|
let table;
|
|
8
10
|
switch (getTableShapeFromData(data)) {
|
|
9
11
|
case 'array-row-table':
|
|
@@ -15,9 +17,6 @@ export function makeTableFromData(data) {
|
|
|
15
17
|
case 'columnar-table':
|
|
16
18
|
table = { shape: 'columnar-table', data: data };
|
|
17
19
|
break;
|
|
18
|
-
case 'arrow-table':
|
|
19
|
-
table = { shape: 'arrow-table', data: data };
|
|
20
|
-
break;
|
|
21
20
|
default:
|
|
22
21
|
throw new Error('table');
|
|
23
22
|
}
|
|
@@ -26,9 +25,6 @@ export function makeTableFromData(data) {
|
|
|
26
25
|
}
|
|
27
26
|
/** Helper function to get shape of data */
|
|
28
27
|
function getTableShapeFromData(data) {
|
|
29
|
-
if (data instanceof arrow.Table) {
|
|
30
|
-
return 'arrow-table';
|
|
31
|
-
}
|
|
32
28
|
if (Array.isArray(data)) {
|
|
33
29
|
if (data.length === 0) {
|
|
34
30
|
throw new Error('cannot deduce type of empty table');
|
|
@@ -47,56 +43,4 @@ function getTableShapeFromData(data) {
|
|
|
47
43
|
}
|
|
48
44
|
throw new Error('invalid table');
|
|
49
45
|
}
|
|
50
|
-
/** Convert any table into object row format *
|
|
51
|
-
export function makeColumnarTable(table: Table): ColumnarTable {
|
|
52
|
-
if (table.shape === 'columnar-table') {
|
|
53
|
-
return table;
|
|
54
|
-
}
|
|
55
|
-
const length = getTableLength(table);
|
|
56
|
-
const data = new Array<{[key: string]: unknown}>(length);
|
|
57
|
-
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
58
|
-
data[rowIndex] = getTableRowAsObject(table, rowIndex);
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
shape: 'columnar-table',
|
|
62
|
-
schema: table.schema,
|
|
63
|
-
data
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
/** Convert any table into array row format *
|
|
69
|
-
export function makeArrayRowTable(table: TableLike): ArrayRowTable {
|
|
70
|
-
if (table.shape === 'array-row-table') {
|
|
71
|
-
return table;
|
|
72
|
-
}
|
|
73
|
-
const length = getTableLength(table);
|
|
74
|
-
const data = new Array<unknown[]>(length);
|
|
75
|
-
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
76
|
-
data[rowIndex] = getTableRowAsArray(table, rowIndex);
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
shape: 'array-row-table',
|
|
80
|
-
schema: table.schema,
|
|
81
|
-
data
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/** Convert any table into object row format *
|
|
86
|
-
export function makeObjectRowTable(table: Table): ObjectRowTable {
|
|
87
|
-
if (table.shape === 'object-row-table') {
|
|
88
|
-
return table;
|
|
89
|
-
}
|
|
90
|
-
const length = getTableLength(table);
|
|
91
|
-
const data = new Array<{[key: string]: unknown}>(length);
|
|
92
|
-
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
93
|
-
data[rowIndex] = getTableRowAsObject(table, rowIndex);
|
|
94
|
-
}
|
|
95
|
-
return {
|
|
96
|
-
shape: 'object-row-table',
|
|
97
|
-
schema: table.schema,
|
|
98
|
-
data
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
*/
|
|
102
46
|
//# sourceMappingURL=make-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-table.js","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/make-table.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;
|
|
1
|
+
{"version":3,"file":"make-table.js","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/make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C;QAC3B,CAAC;QAED,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC7C,OAAO,kBAAkB,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QACrC,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -14,7 +14,7 @@ export function convertToObjectRow(arrayRow, headers) {
|
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
16
16
|
for (let i = 0; i < arrayRow.length; i++) {
|
|
17
|
-
const columnName = `column
|
|
17
|
+
const columnName = `column${i + 1}`;
|
|
18
18
|
objectRow[columnName] = arrayRow[i];
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -38,7 +38,7 @@ export function convertToArrayRow(objectRow, headers) {
|
|
|
38
38
|
export function inferHeadersFromArrayRow(arrayRow) {
|
|
39
39
|
const headers = [];
|
|
40
40
|
for (let i = 0; i < arrayRow.length; i++) {
|
|
41
|
-
const columnName = `column
|
|
41
|
+
const columnName = `column${i + 1}`;
|
|
42
42
|
headers.push(columnName);
|
|
43
43
|
}
|
|
44
44
|
return headers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row-utils.js","sourceRoot":"","sources":["../../../../../src/schema-utils/lib/table/tables/row-utils.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,4CAA4C;AAC5C,MAAM,UAAU,kBAAkB,CAChC,QAAmB,EACnB,OAAwB;IAExB,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;IAC9B,CAAC;IACD,MAAM,SAAS,GAAoC,EAAE,CAAC;IACtD,IAAI,OAAO,EAAE,CAAC;QACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAA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B,SAA0C,EAC1C,OAAwB;IAExB,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;IAC9B,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,wBAAwB,CAAC,QAAmB;IAC1D,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,yBAAyB,CAAC,GAAoC;IAC5E,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
+
import type { Table as NativeArrowTable } from 'apache-arrow';
|
|
1
2
|
import type { Table, ArrayRowTable, ObjectRowTable } from '@loaders.gl/core/schema';
|
|
2
|
-
|
|
3
|
+
/** Checks whether a value is a native Arrow table or a loaders.gl table. */
|
|
4
|
+
export declare function isTable(table: any): table is Table | NativeArrowTable;
|
|
3
5
|
/**
|
|
4
6
|
* Returns the length of the table (i.e. the number of rows)
|
|
5
7
|
*/
|
|
6
|
-
export declare function getTableLength(table: Table): number;
|
|
8
|
+
export declare function getTableLength(table: Table | NativeArrowTable): number;
|
|
7
9
|
/**
|
|
8
10
|
* Returns the number of columns in the table
|
|
9
11
|
* @throws Fails to deduce number of columns if the table has no schema and is empty
|
|
10
12
|
*/
|
|
11
|
-
export declare function getTableNumCols(table: Table): number;
|
|
13
|
+
export declare function getTableNumCols(table: Table | NativeArrowTable): number;
|
|
12
14
|
/** Get a table cell value at row index and column name */
|
|
13
|
-
export declare function getTableCell(table: Table, rowIndex: number, columnName: string): unknown;
|
|
15
|
+
export declare function getTableCell(table: Table | NativeArrowTable, rowIndex: number, columnName: string): unknown;
|
|
14
16
|
/** Get a table cell value at row index and column name */
|
|
15
|
-
export declare function getTableCellAt(table: Table, rowIndex: number, columnIndex: number): unknown;
|
|
17
|
+
export declare function getTableCellAt(table: Table | NativeArrowTable, rowIndex: number, columnIndex: number): unknown;
|
|
16
18
|
/** Deduce the table row shape */
|
|
17
|
-
export declare function getTableRowShape(table: Table): 'array-row-table' | 'object-row-table';
|
|
19
|
+
export declare function getTableRowShape(table: Table | NativeArrowTable): 'array-row-table' | 'object-row-table';
|
|
18
20
|
/** Get the index of a named table column. Requires the table to have a schema */
|
|
19
|
-
export declare function getTableColumnIndex(table: Table, columnName: string): number;
|
|
21
|
+
export declare function getTableColumnIndex(table: Table | NativeArrowTable, columnName: string): number;
|
|
20
22
|
/** Get the name of a table column by index. Requires the table to have a schema */
|
|
21
|
-
export declare function getTableColumnName(table: Table, columnIndex: number): string;
|
|
23
|
+
export declare function getTableColumnName(table: Table | NativeArrowTable, columnIndex: number): string;
|
|
22
24
|
/**
|
|
23
25
|
* Returns one row of the table in object format.
|
|
24
26
|
* @param target Optional parameter will be used if needed to store the row. Can be reused between calls to improve performance
|
|
25
27
|
* @returns an array representing the row. May be the original array in the row, a new object, or the target parameter
|
|
26
28
|
*/
|
|
27
|
-
export declare function getTableRowAsObject(table: Table, rowIndex: number, target?: {
|
|
29
|
+
export declare function getTableRowAsObject(table: Table | NativeArrowTable, rowIndex: number, target?: {
|
|
28
30
|
[columnName: string]: unknown;
|
|
29
31
|
}, copy?: 'copy'): {
|
|
30
32
|
[columnName: string]: unknown;
|
|
@@ -34,19 +36,19 @@ export declare function getTableRowAsObject(table: Table, rowIndex: number, targ
|
|
|
34
36
|
* @param target Optional parameter will be used if needed to store the row. Can be reused between calls to improve performance.
|
|
35
37
|
* @returns an array representing the row. May be the original array in the row, a new object, or the target parameter
|
|
36
38
|
*/
|
|
37
|
-
export declare function getTableRowAsArray(table: Table, rowIndex: number, target?: unknown[], copy?: 'copy'): unknown[];
|
|
39
|
+
export declare function getTableRowAsArray(table: Table | NativeArrowTable, rowIndex: number, target?: unknown[], copy?: 'copy'): unknown[];
|
|
38
40
|
/** Convert any table into array row format */
|
|
39
|
-
export declare function makeArrayRowTable(table: Table): ArrayRowTable;
|
|
41
|
+
export declare function makeArrayRowTable(table: Table | NativeArrowTable): ArrayRowTable;
|
|
40
42
|
/** Convert any table into object row format */
|
|
41
|
-
export declare function makeObjectRowTable(table: Table): ObjectRowTable;
|
|
43
|
+
export declare function makeObjectRowTable(table: Table | NativeArrowTable): ObjectRowTable;
|
|
42
44
|
/** Convert any table into object row format */
|
|
43
|
-
export declare function makeColumnarTable(table: Table): ObjectRowTable;
|
|
45
|
+
export declare function makeColumnarTable(table: Table | NativeArrowTable): ObjectRowTable;
|
|
44
46
|
/**
|
|
45
47
|
* Iterate over table rows
|
|
46
48
|
* @param table
|
|
47
49
|
* @param shape
|
|
48
50
|
*/
|
|
49
|
-
export declare function makeRowIterator(table: Table, shape: 'object-row-table' | 'array-row-table'): Iterable<unknown[] | {
|
|
51
|
+
export declare function makeRowIterator(table: Table | NativeArrowTable, shape: 'object-row-table' | 'array-row-table'): Iterable<unknown[] | {
|
|
50
52
|
[key: string]: unknown;
|
|
51
53
|
}>;
|
|
52
54
|
/**
|
|
@@ -54,13 +56,13 @@ export declare function makeRowIterator(table: Table, shape: 'object-row-table'
|
|
|
54
56
|
* @param table
|
|
55
57
|
* @param shape
|
|
56
58
|
*/
|
|
57
|
-
export declare function makeArrayRowIterator(table: Table, target?: unknown[]): Iterable<unknown[]>;
|
|
59
|
+
export declare function makeArrayRowIterator(table: Table | NativeArrowTable, target?: unknown[]): Iterable<unknown[]>;
|
|
58
60
|
/**
|
|
59
61
|
* Streaming processing: Iterate over table, yielding object rows
|
|
60
62
|
* @param table
|
|
61
63
|
* @param shape
|
|
62
64
|
*/
|
|
63
|
-
export declare function makeObjectRowIterator(table: Table, target?: {
|
|
65
|
+
export declare function makeObjectRowIterator(table: Table | NativeArrowTable, target?: {
|
|
64
66
|
[key: string]: unknown;
|
|
65
67
|
}): Iterable<{
|
|
66
68
|
[key: string]: unknown;
|