@luma.gl/graph 10.0.0-alpha.9 → 10.0.0-beta.2
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/LICENSE +4 -4
- package/THIRD-PARTY-NOTICES.md +19 -0
- package/dist/arrow/arrow-colors.cjs +99 -18
- package/dist/arrow/arrow-colors.d.ts +27 -10
- package/dist/arrow/arrow-colors.d.ts.map +1 -1
- package/dist/arrow/arrow-colors.js +107 -24
- package/dist/arrow/arrow-colors.js.map +1 -1
- package/dist/arrow/arrow-utils/arrow-paths.cjs +4 -3
- package/dist/arrow/arrow-utils/arrow-paths.d.ts.map +1 -1
- package/dist/arrow/arrow-utils/arrow-paths.js +5 -4
- package/dist/arrow/arrow-utils/arrow-paths.js.map +1 -1
- package/dist/arrow/cpu/arrow-coordinate-projection.cjs +30 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.d.ts +5 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.d.ts.map +1 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.js +9 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.js.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.cjs +31 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.d.ts +2 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.d.ts.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.js +5 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.js.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.cjs +99 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.d.ts +9 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.d.ts.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.js +100 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.js.map +1 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.cjs +9 -371
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.d.ts +8 -28
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.d.ts.map +1 -1
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.js +4 -381
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.js.map +1 -1
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.cjs +11 -11
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.d.ts +2 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.d.ts.map +1 -1
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.js +4 -4
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.js.map +1 -1
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.cjs +2 -2
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.js +1 -1
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.js.map +1 -1
- package/dist/arrow/gpu/arrow-column-gpu-vector.cjs +27 -8
- package/dist/arrow/gpu/arrow-column-gpu-vector.d.ts +11 -1
- package/dist/arrow/gpu/arrow-column-gpu-vector.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-column-gpu-vector.js +33 -8
- package/dist/arrow/gpu/arrow-column-gpu-vector.js.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-table-conversion.cjs +68 -3
- package/dist/arrow/gpu/arrow-gpu-table-conversion.d.ts +9 -2
- package/dist/arrow/gpu/arrow-gpu-table-conversion.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-table-conversion.js +76 -3
- package/dist/arrow/gpu/arrow-gpu-table-conversion.js.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.cjs +8 -6
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.d.ts +1 -0
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.js +17 -7
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.js.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.cjs +35 -5
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.d.ts +6 -1
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.js +40 -5
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.js.map +1 -1
- package/dist/arrow/index.cjs +19 -2
- package/dist/arrow/index.cjs.map +3 -3
- package/dist/arrow/index.d.ts +5 -2
- package/dist/arrow/index.d.ts.map +1 -1
- package/dist/arrow/index.js +4 -1
- package/dist/arrow/index.js.map +1 -1
- package/dist/arrow/internal.cjs.map +2 -2
- package/dist/dist.dev.js +3820 -1646
- package/dist/dist.min.js +450 -136
- package/dist/experimental/index.cjs.map +1 -1
- package/dist/experimental/simulation/index.cjs.map +1 -1
- package/dist/experimental-models.cjs +21 -0
- package/dist/experimental-models.d.ts +2 -0
- package/dist/experimental-models.d.ts.map +1 -0
- package/dist/experimental-models.js +5 -0
- package/dist/experimental-models.js.map +1 -0
- package/dist/experimental-simulation.cjs +21 -0
- package/dist/experimental-simulation.d.ts +2 -0
- package/dist/experimental-simulation.d.ts.map +1 -0
- package/dist/experimental-simulation.js +5 -0
- package/dist/experimental-simulation.js.map +1 -0
- package/dist/geospatial/gpu-point-spatial-query.cjs +2 -15
- package/dist/geospatial/gpu-point-spatial-query.d.ts.map +1 -1
- package/dist/geospatial/gpu-point-spatial-query.js +2 -15
- package/dist/geospatial/gpu-point-spatial-query.js.map +1 -1
- package/dist/geospatial/index.cjs.map +2 -2
- package/dist/gpu-a5/index.cjs.map +1 -1
- package/dist/gpu-core/compiled-gpu-graph.cjs +47 -0
- package/dist/gpu-core/compiled-gpu-graph.d.ts +5 -0
- package/dist/gpu-core/compiled-gpu-graph.d.ts.map +1 -1
- package/dist/gpu-core/compiled-gpu-graph.js +54 -1
- package/dist/gpu-core/compiled-gpu-graph.js.map +1 -1
- package/dist/gpu-core/gpu-command-graph-compiler.cjs +11 -2
- package/dist/gpu-core/gpu-command-graph-compiler.d.ts +2 -1
- package/dist/gpu-core/gpu-command-graph-compiler.d.ts.map +1 -1
- package/dist/gpu-core/gpu-command-graph-compiler.js +13 -2
- package/dist/gpu-core/gpu-command-graph-compiler.js.map +1 -1
- package/dist/gpu-core/gpu-command-graph-types.d.ts +16 -1
- package/dist/gpu-core/gpu-command-graph-types.d.ts.map +1 -1
- package/dist/gpu-core/gpu-command-graph-types.js.map +1 -1
- package/dist/gpu-core/gpu-command-graph.cjs +34 -11
- package/dist/gpu-core/gpu-command-graph.d.ts +17 -8
- package/dist/gpu-core/gpu-command-graph.d.ts.map +1 -1
- package/dist/gpu-core/gpu-command-graph.js +39 -11
- package/dist/gpu-core/gpu-command-graph.js.map +1 -1
- package/dist/gpu-core/gpu-cpu-execution.cjs +279 -0
- package/dist/gpu-core/gpu-cpu-execution.d.ts +22 -0
- package/dist/gpu-core/gpu-cpu-execution.d.ts.map +1 -0
- package/dist/gpu-core/gpu-cpu-execution.js +294 -0
- package/dist/gpu-core/gpu-cpu-execution.js.map +1 -0
- package/dist/gpu-core/gpu-cpu-operation.cjs +54 -0
- package/dist/gpu-core/gpu-cpu-operation.d.ts +40 -0
- package/dist/gpu-core/gpu-cpu-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-cpu-operation.js +35 -0
- package/dist/gpu-core/gpu-cpu-operation.js.map +1 -0
- package/dist/gpu-core/gpu-dispatch-utils.cjs +7 -3
- package/dist/gpu-core/gpu-dispatch-utils.d.ts +2 -0
- package/dist/gpu-core/gpu-dispatch-utils.d.ts.map +1 -1
- package/dist/gpu-core/gpu-dispatch-utils.js +4 -1
- package/dist/gpu-core/gpu-dispatch-utils.js.map +1 -1
- package/dist/gpu-core/gpu-expression-operation.cjs +2 -2
- package/dist/gpu-core/gpu-expression-operation.d.ts +1 -1
- package/dist/gpu-core/gpu-expression-operation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-expression-operation.js +1 -1
- package/dist/gpu-core/gpu-expression-operation.js.map +1 -1
- package/dist/gpu-core/gpu-expression-plan.cjs +5 -1
- package/dist/gpu-core/gpu-expression-plan.d.ts +3 -2
- package/dist/gpu-core/gpu-expression-plan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-expression-plan.js +7 -1
- package/dist/gpu-core/gpu-expression-plan.js.map +1 -1
- package/dist/gpu-core/gpu-graph-compiler.cjs +48 -0
- package/dist/gpu-core/gpu-graph-compiler.d.ts +1 -0
- package/dist/gpu-core/gpu-graph-compiler.d.ts.map +1 -1
- package/dist/gpu-core/gpu-graph-compiler.js +50 -0
- package/dist/gpu-core/gpu-graph-compiler.js.map +1 -1
- package/dist/gpu-core/gpu-graph.d.ts +2 -2
- package/dist/gpu-core/gpu-graph.d.ts.map +1 -1
- package/dist/gpu-core/gpu-graph.js.map +1 -1
- package/dist/gpu-core/gpu-grid-aggregation.cjs +2 -5
- package/dist/gpu-core/gpu-grid-aggregation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-aggregation.js +2 -5
- package/dist/gpu-core/gpu-grid-aggregation.js.map +1 -1
- package/dist/gpu-core/gpu-grid-binning.cjs +2 -5
- package/dist/gpu-core/gpu-grid-binning.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-binning.js +2 -5
- package/dist/gpu-core/gpu-grid-binning.js.map +1 -1
- package/dist/gpu-core/gpu-grid-coordinate.cjs +41 -0
- package/dist/gpu-core/gpu-grid-coordinate.d.ts +7 -0
- package/dist/gpu-core/gpu-grid-coordinate.d.ts.map +1 -0
- package/dist/gpu-core/gpu-grid-coordinate.js +24 -0
- package/dist/gpu-core/gpu-grid-coordinate.js.map +1 -0
- package/dist/gpu-core/gpu-grid-index-internals.cjs +2 -15
- package/dist/gpu-core/gpu-grid-index-internals.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-index-internals.js +2 -15
- package/dist/gpu-core/gpu-grid-index-internals.js.map +1 -1
- package/dist/gpu-core/gpu-grid-index-query.cjs +2 -16
- package/dist/gpu-core/gpu-grid-index-query.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-index-query.js +2 -16
- package/dist/gpu-core/gpu-grid-index-query.js.map +1 -1
- package/dist/gpu-core/gpu-group-aggregation.cjs +7 -15
- package/dist/gpu-core/gpu-group-aggregation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-group-aggregation.js +7 -18
- package/dist/gpu-core/gpu-group-aggregation.js.map +1 -1
- package/dist/gpu-core/gpu-operation.d.ts +4 -4
- package/dist/gpu-core/gpu-operation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-operation.js.map +1 -1
- package/dist/gpu-core/gpu-reduction.cjs +6 -14
- package/dist/gpu-core/gpu-reduction.d.ts.map +1 -1
- package/dist/gpu-core/gpu-reduction.js +6 -15
- package/dist/gpu-core/gpu-reduction.js.map +1 -1
- package/dist/gpu-core/gpu-render-operation.cjs +39 -0
- package/dist/gpu-core/gpu-render-operation.d.ts +21 -0
- package/dist/gpu-core/gpu-render-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-render-operation.js +22 -0
- package/dist/gpu-core/gpu-render-operation.js.map +1 -0
- package/dist/gpu-core/gpu-scan.cjs +46 -32
- package/dist/gpu-core/gpu-scan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-scan.js +56 -44
- package/dist/gpu-core/gpu-scan.js.map +1 -1
- package/dist/gpu-core/gpu-segmented-reduction.cjs +12 -9
- package/dist/gpu-core/gpu-segmented-reduction.d.ts +1 -1
- package/dist/gpu-core/gpu-segmented-reduction.d.ts.map +1 -1
- package/dist/gpu-core/gpu-segmented-reduction.js +12 -9
- package/dist/gpu-core/gpu-segmented-reduction.js.map +1 -1
- package/dist/gpu-core/gpu-segmented-scan.cjs +73 -16
- package/dist/gpu-core/gpu-segmented-scan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-segmented-scan.js +73 -16
- package/dist/gpu-core/gpu-segmented-scan.js.map +1 -1
- package/dist/gpu-core/gpu-semantic-aggregation-operation.cjs +112 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.d.ts +71 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.js +92 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.js.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.cjs +267 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.d.ts +29 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.d.ts.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.js +260 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.js.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-operation.cjs +85 -0
- package/dist/gpu-core/gpu-shader-pass-operation.d.ts +32 -0
- package/dist/gpu-core/gpu-shader-pass-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-operation.js +74 -0
- package/dist/gpu-core/gpu-shader-pass-operation.js.map +1 -0
- package/dist/gpu-core/gpu-texture-plan.d.ts +3 -2
- package/dist/gpu-core/gpu-texture-plan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-texture-plan.js.map +1 -1
- package/dist/gpu-core/index.cjs +32 -0
- package/dist/gpu-core/index.cjs.map +3 -3
- package/dist/gpu-core/index.d.ts +21 -1
- package/dist/gpu-core/index.d.ts.map +1 -1
- package/dist/gpu-core/index.js +10 -0
- package/dist/gpu-core/index.js.map +1 -1
- package/dist/gpu-data/color-conversion.cjs +105 -0
- package/dist/gpu-data/color-conversion.d.ts +30 -0
- package/dist/gpu-data/color-conversion.d.ts.map +1 -0
- package/dist/gpu-data/color-conversion.js +109 -0
- package/dist/gpu-data/color-conversion.js.map +1 -0
- package/dist/gpu-data/cpu-data.cjs +60 -0
- package/dist/gpu-data/cpu-data.d.ts +28 -0
- package/dist/gpu-data/cpu-data.d.ts.map +1 -0
- package/dist/gpu-data/cpu-data.js +41 -0
- package/dist/gpu-data/cpu-data.js.map +1 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.cjs +98 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.d.ts +9 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.d.ts.map +1 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.js +85 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.js.map +1 -0
- package/dist/gpu-data/cpu-vector.cjs +42 -0
- package/dist/gpu-data/cpu-vector.d.ts +17 -0
- package/dist/gpu-data/cpu-vector.d.ts.map +1 -0
- package/dist/gpu-data/cpu-vector.js +21 -0
- package/dist/gpu-data/cpu-vector.js.map +1 -0
- package/dist/gpu-data/gpu-data-buffer-props.cjs +41 -0
- package/dist/gpu-data/gpu-data-buffer-props.d.ts +5 -0
- package/dist/gpu-data/gpu-data-buffer-props.d.ts.map +1 -0
- package/dist/gpu-data/gpu-data-buffer-props.js +19 -0
- package/dist/gpu-data/gpu-data-buffer-props.js.map +1 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.cjs +50 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.d.ts +41 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.d.ts.map +1 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.js +45 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.js.map +1 -0
- package/dist/gpu-data/index.cjs +21 -2
- package/dist/gpu-data/index.cjs.map +3 -3
- package/dist/gpu-data/index.d.ts +6 -0
- package/dist/gpu-data/index.d.ts.map +1 -1
- package/dist/gpu-data/index.js +5 -0
- package/dist/gpu-data/index.js.map +1 -1
- package/dist/gpu-dataframe/gpu-data-frame-query.cjs +8 -19
- package/dist/gpu-dataframe/gpu-data-frame-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-data-frame-query.js +14 -26
- package/dist/gpu-dataframe/gpu-data-frame-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-expression-shader.cjs +87 -5
- package/dist/gpu-dataframe/gpu-expression-shader.d.ts +2 -1
- package/dist/gpu-dataframe/gpu-expression-shader.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-expression-shader.js +101 -5
- package/dist/gpu-dataframe/gpu-expression-shader.js.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.cjs +177 -2
- package/dist/gpu-dataframe/gpu-expression.d.ts +60 -2
- package/dist/gpu-dataframe/gpu-expression.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.js +187 -0
- package/dist/gpu-dataframe/gpu-expression.js.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-query.cjs +2 -2
- package/dist/gpu-dataframe/gpu-global-aggregation-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-query.js +5 -3
- package/dist/gpu-dataframe/gpu-global-aggregation-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-global-sort-compiler.cjs +23 -11
- package/dist/gpu-dataframe/gpu-global-sort-compiler.d.ts +1 -1
- package/dist/gpu-dataframe/gpu-global-sort-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-global-sort-compiler.js +24 -12
- package/dist/gpu-dataframe/gpu-global-sort-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-group-by-query.cjs +2 -2
- package/dist/gpu-dataframe/gpu-group-by-query.js +5 -3
- package/dist/gpu-dataframe/gpu-group-by-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-join-compiler.cjs +0 -2
- package/dist/gpu-dataframe/gpu-join-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-join-compiler.js +0 -2
- package/dist/gpu-dataframe/gpu-join-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-query-compiler.cjs +3 -1
- package/dist/gpu-dataframe/gpu-query-compiler.d.ts +0 -1
- package/dist/gpu-dataframe/gpu-query-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-query-compiler.js +3 -1
- package/dist/gpu-dataframe/gpu-query-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-query.cjs +13 -5
- package/dist/gpu-dataframe/gpu-sort-query.d.ts +4 -1
- package/dist/gpu-dataframe/gpu-sort-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-query.js +14 -5
- package/dist/gpu-dataframe/gpu-sort-query.js.map +1 -1
- package/dist/gpu-dataframe/index.cjs +20 -2
- package/dist/gpu-dataframe/index.cjs.map +3 -3
- package/dist/gpu-dataframe/index.d.ts +6 -2
- package/dist/gpu-dataframe/index.d.ts.map +1 -1
- package/dist/gpu-dataframe/index.js +3 -1
- package/dist/gpu-dataframe/index.js.map +1 -1
- package/dist/gpu-dataframe/portable-expression.cjs +167 -0
- package/dist/gpu-dataframe/portable-expression.d.ts +21 -0
- package/dist/gpu-dataframe/portable-expression.d.ts.map +1 -0
- package/dist/gpu-dataframe/portable-expression.js +162 -0
- package/dist/gpu-dataframe/portable-expression.js.map +1 -0
- package/dist/gpu-dggs/benchmarks.cjs.map +1 -1
- package/dist/gpu-dggs/index.cjs.map +1 -1
- package/dist/gpu-dggs-benchmarks.cjs +21 -0
- package/dist/gpu-dggs-benchmarks.d.ts +2 -0
- package/dist/gpu-dggs-benchmarks.d.ts.map +1 -0
- package/dist/gpu-dggs-benchmarks.js +5 -0
- package/dist/gpu-dggs-benchmarks.js.map +1 -0
- package/dist/gpu-geometry/index.cjs.map +1 -1
- package/dist/gpu-graph/index.cjs +8 -0
- package/dist/gpu-graph/index.cjs.map +3 -3
- package/dist/gpu-graph/index.d.ts +4 -0
- package/dist/gpu-graph/index.d.ts.map +1 -1
- package/dist/gpu-graph/index.js +2 -0
- package/dist/gpu-graph/index.js.map +1 -1
- package/dist/gpu-graph-algorithms/benchmarks.cjs.map +2 -2
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.cjs +2 -15
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.d.ts.map +1 -1
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.js +2 -15
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.js.map +1 -1
- package/dist/gpu-graph-algorithms/index.cjs.map +2 -2
- package/dist/gpu-graph-algorithms-benchmarks.cjs +21 -0
- package/dist/gpu-graph-algorithms-benchmarks.d.ts +2 -0
- package/dist/gpu-graph-algorithms-benchmarks.d.ts.map +1 -0
- package/dist/gpu-graph-algorithms-benchmarks.js +5 -0
- package/dist/gpu-graph-algorithms-benchmarks.js.map +1 -0
- package/dist/gpu-h3/index.cjs.map +1 -1
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.cjs +116 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.d.ts +42 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.d.ts.map +1 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.js +90 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.js.map +1 -0
- package/dist/gpu-physics/gpu-physics-ensemble.cjs +97 -5
- package/dist/gpu-physics/gpu-physics-ensemble.d.ts +31 -2
- package/dist/gpu-physics/gpu-physics-ensemble.d.ts.map +1 -1
- package/dist/gpu-physics/gpu-physics-ensemble.js +99 -3
- package/dist/gpu-physics/gpu-physics-ensemble.js.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.cjs +568 -77
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts +86 -0
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.js +617 -76
- package/dist/gpu-physics/gpu-rigid-body-world.js.map +1 -1
- package/dist/gpu-physics/index.cjs +23 -2
- package/dist/gpu-physics/index.cjs.map +3 -3
- package/dist/gpu-physics/index.d.ts +9 -2
- package/dist/gpu-physics/index.d.ts.map +1 -1
- package/dist/gpu-physics/index.js +6 -1
- package/dist/gpu-physics/index.js.map +1 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.cjs +21 -8
- package/dist/gpu-physics/rigid-body-bounds-shaders.d.ts +2 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.js +15 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-convex-shaders.cjs +3 -2
- package/dist/gpu-physics/rigid-body-convex-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-convex-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-convex-shaders.js +3 -2
- package/dist/gpu-physics/rigid-body-convex-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-reset.cjs +36 -7
- package/dist/gpu-physics/rigid-body-ensemble-reset.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-reset.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-reset.js +42 -7
- package/dist/gpu-physics/rigid-body-ensemble-reset.js.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.cjs +23 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.d.ts +4 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.js +25 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.js.map +1 -1
- package/dist/gpu-physics/rigid-body-geometry.cjs +41 -4
- package/dist/gpu-physics/rigid-body-geometry.d.ts +10 -1
- package/dist/gpu-physics/rigid-body-geometry.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-geometry.js +44 -3
- package/dist/gpu-physics/rigid-body-geometry.js.map +1 -1
- package/dist/gpu-physics/rigid-body-height-field-shader.cjs +80 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.d.ts +3 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.js +56 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.js.map +1 -0
- package/dist/gpu-physics/rigid-body-height-field.cjs +166 -0
- package/dist/gpu-physics/rigid-body-height-field.d.ts +55 -0
- package/dist/gpu-physics/rigid-body-height-field.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-height-field.js +184 -0
- package/dist/gpu-physics/rigid-body-height-field.js.map +1 -0
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.cjs +4 -2
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.js +4 -2
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-mesh.cjs +72 -17
- package/dist/gpu-physics/rigid-body-mesh.d.ts +3 -0
- package/dist/gpu-physics/rigid-body-mesh.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-mesh.js +76 -20
- package/dist/gpu-physics/rigid-body-mesh.js.map +1 -1
- package/dist/gpu-physics/rigid-body-parallel-shaders.cjs +24 -9
- package/dist/gpu-physics/rigid-body-parallel-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-parallel-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-parallel-shaders.js +28 -9
- package/dist/gpu-physics/rigid-body-parallel-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-properties.cjs +4 -4
- package/dist/gpu-physics/rigid-body-properties.d.ts +6 -0
- package/dist/gpu-physics/rigid-body-properties.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-properties.js +1 -1
- package/dist/gpu-physics/rigid-body-properties.js.map +1 -1
- package/dist/gpu-physics/rigid-body-publication.cjs +2 -2
- package/dist/gpu-physics/rigid-body-publication.js +1 -1
- package/dist/gpu-physics/rigid-body-publication.js.map +1 -1
- package/dist/gpu-physics/rigid-body-query-geometry.cjs +22 -4
- package/dist/gpu-physics/rigid-body-query-geometry.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-query-geometry.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-query-geometry.js +22 -4
- package/dist/gpu-physics/rigid-body-query-geometry.js.map +1 -1
- package/dist/gpu-physics/rigid-body-shaders.cjs +12 -6
- package/dist/gpu-physics/rigid-body-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-shaders.js +15 -7
- package/dist/gpu-physics/rigid-body-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-shape-properties.cjs +2 -0
- package/dist/gpu-physics/rigid-body-shape-properties.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-shape-properties.js +2 -0
- package/dist/gpu-physics/rigid-body-shape-properties.js.map +1 -1
- package/dist/gpu-physics/rigid-body-terrain-atlas.cjs +287 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.d.ts +87 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.js +275 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.js.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.cjs +240 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.d.ts +76 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.js +247 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.js.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.cjs +215 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.d.ts +25 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.js +218 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.js.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.cjs +263 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.d.ts +97 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.js +250 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.js.map +1 -0
- package/dist/gpu-physics/rigid-body-triggers.cjs +1 -0
- package/dist/gpu-physics/rigid-body-triggers.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-triggers.js +1 -0
- package/dist/gpu-physics/rigid-body-triggers.js.map +1 -1
- package/dist/gpu-physics/rigid-body-vehicle.cjs +145 -0
- package/dist/gpu-physics/rigid-body-vehicle.d.ts +47 -0
- package/dist/gpu-physics/rigid-body-vehicle.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-vehicle.js +119 -0
- package/dist/gpu-physics/rigid-body-vehicle.js.map +1 -0
- package/dist/gpu-pointcloud/index.cjs.map +1 -1
- package/dist/gpu-project/benchmarks.cjs.map +2 -2
- package/dist/gpu-project/coordinate-projection-graph.cjs +59 -0
- package/dist/gpu-project/coordinate-projection-graph.d.ts +23 -0
- package/dist/gpu-project/coordinate-projection-graph.d.ts.map +1 -0
- package/dist/gpu-project/coordinate-projection-graph.js +40 -0
- package/dist/gpu-project/coordinate-projection-graph.js.map +1 -0
- package/dist/gpu-project/cpu-geoarrow.cjs +112 -0
- package/dist/gpu-project/cpu-geoarrow.d.ts +10 -0
- package/dist/gpu-project/cpu-geoarrow.d.ts.map +1 -0
- package/dist/gpu-project/cpu-geoarrow.js +103 -0
- package/dist/gpu-project/cpu-geoarrow.js.map +1 -0
- package/dist/gpu-project/cpu-geometry-pipelines.cjs +134 -0
- package/dist/gpu-project/cpu-geometry-pipelines.d.ts +19 -0
- package/dist/gpu-project/cpu-geometry-pipelines.d.ts.map +1 -0
- package/dist/gpu-project/cpu-geometry-pipelines.js +114 -0
- package/dist/gpu-project/cpu-geometry-pipelines.js.map +1 -0
- package/dist/gpu-project/cpu-projection-operation.cjs +54 -0
- package/dist/gpu-project/cpu-projection-operation.d.ts +14 -0
- package/dist/gpu-project/cpu-projection-operation.d.ts.map +1 -0
- package/dist/gpu-project/cpu-projection-operation.js +37 -0
- package/dist/gpu-project/cpu-projection-operation.js.map +1 -0
- package/dist/gpu-project/crs.cjs.map +3 -3
- package/dist/gpu-project/crs.d.ts +1 -1
- package/dist/gpu-project/geoarrow.cjs +36 -0
- package/dist/gpu-project/geoarrow.cjs.map +6 -0
- package/dist/gpu-project/geoarrow.d.ts +3 -0
- package/dist/gpu-project/geoarrow.d.ts.map +1 -0
- package/dist/gpu-project/geoarrow.js +7 -0
- package/dist/gpu-project/geoarrow.js.map +1 -0
- package/dist/gpu-project/graph.cjs +27 -0
- package/dist/gpu-project/graph.cjs.map +6 -0
- package/dist/gpu-project/graph.d.ts +2 -0
- package/dist/gpu-project/graph.d.ts.map +1 -0
- package/dist/gpu-project/graph.js +6 -0
- package/dist/gpu-project/graph.js.map +1 -0
- package/dist/gpu-project/index.cjs +3 -0
- package/dist/gpu-project/index.cjs.map +3 -3
- package/dist/gpu-project/index.d.ts +1 -0
- package/dist/gpu-project/index.d.ts.map +1 -1
- package/dist/gpu-project/index.js +1 -0
- package/dist/gpu-project/index.js.map +1 -1
- package/dist/gpu-project/projection-crs-benchmark.cjs +2 -2
- package/dist/gpu-project/projection-crs-benchmark.d.ts +1 -1
- package/dist/gpu-project/projection-crs-benchmark.js +1 -1
- package/dist/gpu-project/projection-crs-input.cjs +7 -7
- package/dist/gpu-project/projection-crs-input.d.ts +1 -1
- package/dist/gpu-project/projection-crs-input.js +4 -4
- package/dist/gpu-project/projection-engine.d.ts +2 -2
- package/dist/gpu-project-benchmarks.cjs +21 -0
- package/dist/gpu-project-benchmarks.d.ts +2 -0
- package/dist/gpu-project-benchmarks.d.ts.map +1 -0
- package/dist/gpu-project-benchmarks.js +5 -0
- package/dist/gpu-project-benchmarks.js.map +1 -0
- package/dist/gpu-project-crs.cjs +21 -0
- package/dist/gpu-project-crs.d.ts +2 -0
- package/dist/gpu-project-crs.d.ts.map +1 -0
- package/dist/gpu-project-crs.js +5 -0
- package/dist/gpu-project-crs.js.map +1 -0
- package/dist/gpu-project-geoarrow.cjs +21 -0
- package/dist/gpu-project-geoarrow.d.ts +2 -0
- package/dist/gpu-project-geoarrow.d.ts.map +1 -0
- package/dist/gpu-project-geoarrow.js +5 -0
- package/dist/gpu-project-geoarrow.js.map +1 -0
- package/dist/gpu-project-graph.cjs +21 -0
- package/dist/gpu-project-graph.d.ts +2 -0
- package/dist/gpu-project-graph.d.ts.map +1 -0
- package/dist/gpu-project-graph.js +5 -0
- package/dist/gpu-project-graph.js.map +1 -0
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.cjs +75 -5
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.d.ts +5 -1
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.d.ts.map +1 -1
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.js +86 -6
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.js.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.cjs +9 -0
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.d.ts +2 -0
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.js +10 -0
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.js.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-transfer.d.ts +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-transfer.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-value.d.ts +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-value.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph.cjs +126 -10
- package/dist/gpu-simple-graph/gpu-simple-graph.d.ts +36 -11
- package/dist/gpu-simple-graph/gpu-simple-graph.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph.js +137 -12
- package/dist/gpu-simple-graph/gpu-simple-graph.js.map +1 -1
- package/dist/gpu-simple-graph/index.cjs.map +3 -3
- package/dist/gpu-simple-graph/index.d.ts +1 -1
- package/dist/gpu-simple-graph/index.d.ts.map +1 -1
- package/dist/gpu-simple-graph/index.js.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.cjs +25 -0
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.d.ts +7 -1
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.js +28 -0
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.js.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.cjs +7 -0
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.d.ts +2 -0
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.js +7 -0
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.js.map +1 -1
- package/dist/gpu-simple-graph/operation/operation.d.ts +1 -1
- package/dist/gpu-simple-graph/operation/operation.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/convert-colors.cjs +6 -6
- package/dist/gpu-simple-graph/operations/convert-colors.d.ts +5 -1
- package/dist/gpu-simple-graph/operations/convert-colors.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/convert-colors.js +12 -7
- package/dist/gpu-simple-graph/operations/convert-colors.js.map +1 -1
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.cjs +16 -33
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.js +22 -35
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.js.map +1 -1
- package/dist/gpu-simple-graph/operations/cpu/index.cjs.map +3 -3
- package/dist/gpu-simple-graph/operations/webgl/index.cjs.map +3 -3
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.cjs +31 -13
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.js +42 -13
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.js.map +1 -1
- package/dist/gpu-simple-graph/operations/webgpu/index.cjs.map +1 -1
- package/dist/gpu-simple-graph-cpu.cjs +21 -0
- package/dist/gpu-simple-graph-cpu.d.ts +2 -0
- package/dist/gpu-simple-graph-cpu.d.ts.map +1 -0
- package/dist/gpu-simple-graph-cpu.js +5 -0
- package/dist/gpu-simple-graph-cpu.js.map +1 -0
- package/dist/gpu-simple-graph-webgl.cjs +21 -0
- package/dist/gpu-simple-graph-webgl.d.ts +2 -0
- package/dist/gpu-simple-graph-webgl.d.ts.map +1 -0
- package/dist/gpu-simple-graph-webgl.js +5 -0
- package/dist/gpu-simple-graph-webgl.js.map +1 -0
- package/dist/gpu-simple-graph-webgpu.cjs +21 -0
- package/dist/gpu-simple-graph-webgpu.d.ts +2 -0
- package/dist/gpu-simple-graph-webgpu.d.ts.map +1 -0
- package/dist/gpu-simple-graph-webgpu.js +5 -0
- package/dist/gpu-simple-graph-webgpu.js.map +1 -0
- package/dist/gpu-sql/gpu-sql.cjs +159 -328
- package/dist/gpu-sql/gpu-sql.d.ts +1 -1
- package/dist/gpu-sql/gpu-sql.d.ts.map +1 -1
- package/dist/gpu-sql/gpu-sql.js +186 -340
- package/dist/gpu-sql/gpu-sql.js.map +1 -1
- package/dist/gpu-sql/index.cjs.map +3 -3
- package/dist/gpu-tables/index.cjs.map +2 -2
- package/dist/gpu-tables/table/gpu-table.cjs +2 -2
- package/dist/gpu-tables/table/gpu-table.d.ts.map +1 -1
- package/dist/gpu-tables/table/gpu-table.js +2 -2
- package/dist/gpu-tables/table/gpu-table.js.map +1 -1
- package/dist/gpu-timeseries/index.cjs.map +1 -1
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +30 -16
- package/src/arrow/arrow-colors.ts +194 -33
- package/src/arrow/arrow-utils/arrow-paths.ts +5 -3
- package/src/arrow/cpu/arrow-coordinate-projection.ts +18 -0
- package/src/arrow/cpu/arrow-cpu-pipelines.ts +9 -0
- package/src/arrow/cpu/arrow-cpu-vector-adapters.ts +153 -0
- package/src/arrow/geoarrow/arrow-geoarrow-adapter.ts +21 -493
- package/src/arrow/geoarrow/arrow-geoarrow-conversion.ts +7 -5
- package/src/arrow/geoarrow/arrow-polygon-tessellation.ts +1 -1
- package/src/arrow/gpu/arrow-column-gpu-vector.ts +67 -14
- package/src/arrow/gpu/arrow-gpu-table-conversion.ts +96 -4
- package/src/arrow/gpu/arrow-gpu-vector-adapters.ts +20 -7
- package/src/arrow/gpu/arrow-gpu-vector-conversion.ts +49 -6
- package/src/arrow/index.ts +14 -0
- package/src/experimental-models.ts +5 -0
- package/src/experimental-simulation.ts +5 -0
- package/src/geospatial/gpu-point-spatial-query.ts +2 -15
- package/src/gpu-core/compiled-gpu-graph.ts +73 -1
- package/src/gpu-core/gpu-command-graph-compiler.ts +25 -2
- package/src/gpu-core/gpu-command-graph-types.ts +20 -0
- package/src/gpu-core/gpu-command-graph.ts +48 -11
- package/src/gpu-core/gpu-cpu-execution.ts +345 -0
- package/src/gpu-core/gpu-cpu-operation.ts +65 -0
- package/src/gpu-core/gpu-dispatch-utils.ts +13 -1
- package/src/gpu-core/gpu-expression-operation.ts +1 -1
- package/src/gpu-core/gpu-expression-plan.ts +11 -3
- package/src/gpu-core/gpu-graph-compiler.ts +61 -0
- package/src/gpu-core/gpu-graph.ts +3 -3
- package/src/gpu-core/gpu-grid-aggregation.ts +2 -5
- package/src/gpu-core/gpu-grid-binning.ts +2 -5
- package/src/gpu-core/gpu-grid-coordinate.ts +24 -0
- package/src/gpu-core/gpu-grid-index-internals.ts +2 -15
- package/src/gpu-core/gpu-grid-index-query.ts +2 -16
- package/src/gpu-core/gpu-group-aggregation.ts +38 -50
- package/src/gpu-core/gpu-operation.ts +9 -7
- package/src/gpu-core/gpu-reduction.ts +32 -42
- package/src/gpu-core/gpu-render-operation.ts +42 -0
- package/src/gpu-core/gpu-scan.ts +59 -45
- package/src/gpu-core/gpu-segmented-reduction.ts +20 -10
- package/src/gpu-core/gpu-segmented-scan.ts +82 -17
- package/src/gpu-core/gpu-semantic-aggregation-operation.ts +150 -0
- package/src/gpu-core/gpu-shader-pass-kernel.ts +307 -0
- package/src/gpu-core/gpu-shader-pass-operation.ts +103 -0
- package/src/gpu-core/gpu-texture-plan.ts +3 -2
- package/src/gpu-core/index.ts +39 -0
- package/src/gpu-data/color-conversion.ts +158 -0
- package/src/gpu-data/cpu-data.ts +62 -0
- package/src/gpu-data/cpu-gpu-vector-transfer.ts +110 -0
- package/src/gpu-data/cpu-vector.ts +31 -0
- package/src/gpu-data/gpu-data-buffer-props.ts +25 -0
- package/src/gpu-data/gpu-vector-wgsl-layout.ts +79 -0
- package/src/gpu-data/index.ts +15 -0
- package/src/gpu-dataframe/gpu-data-frame-query.ts +24 -31
- package/src/gpu-dataframe/gpu-expression-shader.ts +128 -7
- package/src/gpu-dataframe/gpu-expression.ts +259 -1
- package/src/gpu-dataframe/gpu-global-aggregation-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-global-aggregation-query.ts +5 -3
- package/src/gpu-dataframe/gpu-global-sort-compiler.ts +26 -12
- package/src/gpu-dataframe/gpu-group-aggregation-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-group-by-query.ts +5 -3
- package/src/gpu-dataframe/gpu-histogram-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-join-compiler.ts +0 -2
- package/src/gpu-dataframe/gpu-query-compiler.ts +3 -3
- package/src/gpu-dataframe/gpu-sort-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-sort-query.ts +31 -5
- package/src/gpu-dataframe/index.ts +26 -2
- package/src/gpu-dataframe/portable-expression.ts +194 -0
- package/src/gpu-dggs-benchmarks.ts +5 -0
- package/src/gpu-graph/index.ts +17 -0
- package/src/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.ts +2 -15
- package/src/gpu-graph-algorithms-benchmarks.ts +5 -0
- package/src/gpu-physics/gpu-physics-ensemble-terrain.ts +114 -0
- package/src/gpu-physics/gpu-physics-ensemble.ts +147 -4
- package/src/gpu-physics/gpu-rigid-body-world.ts +797 -102
- package/src/gpu-physics/index.ts +38 -0
- package/src/gpu-physics/rigid-body-bounds-shaders.ts +16 -1
- package/src/gpu-physics/rigid-body-convex-shaders.ts +3 -2
- package/src/gpu-physics/rigid-body-ensemble-reset.ts +48 -8
- package/src/gpu-physics/rigid-body-ensemble-transaction.ts +34 -1
- package/src/gpu-physics/rigid-body-geometry.ts +49 -4
- package/src/gpu-physics/rigid-body-height-field-shader.ts +56 -0
- package/src/gpu-physics/rigid-body-height-field.ts +257 -0
- package/src/gpu-physics/rigid-body-mesh-query-shaders.ts +4 -2
- package/src/gpu-physics/rigid-body-mesh.ts +97 -26
- package/src/gpu-physics/rigid-body-parallel-shaders.ts +32 -9
- package/src/gpu-physics/rigid-body-properties.ts +5 -2
- package/src/gpu-physics/rigid-body-publication.ts +1 -1
- package/src/gpu-physics/rigid-body-query-geometry.ts +22 -4
- package/src/gpu-physics/rigid-body-shaders.ts +19 -7
- package/src/gpu-physics/rigid-body-shape-properties.ts +2 -0
- package/src/gpu-physics/rigid-body-terrain-atlas.ts +378 -0
- package/src/gpu-physics/rigid-body-terrain-lod.ts +332 -0
- package/src/gpu-physics/rigid-body-terrain-stitch.ts +286 -0
- package/src/gpu-physics/rigid-body-terrain-stream.ts +323 -0
- package/src/gpu-physics/rigid-body-triggers.ts +1 -0
- package/src/gpu-physics/rigid-body-vehicle.ts +166 -0
- package/src/gpu-project/README.md +2 -2
- package/src/gpu-project/coordinate-projection-graph.ts +59 -0
- package/src/gpu-project/cpu-geoarrow.ts +135 -0
- package/src/gpu-project/cpu-geometry-pipelines.ts +159 -0
- package/src/gpu-project/cpu-projection-operation.ts +49 -0
- package/src/gpu-project/crs.ts +2 -2
- package/src/gpu-project/geoarrow.ts +11 -0
- package/src/gpu-project/graph.ts +10 -0
- package/src/gpu-project/index.ts +2 -0
- package/src/gpu-project/projection-crs-benchmark.ts +2 -2
- package/src/gpu-project/projection-crs-input.ts +4 -4
- package/src/gpu-project/projection-engine.ts +2 -2
- package/src/gpu-project-benchmarks.ts +5 -0
- package/src/gpu-project-crs.ts +5 -0
- package/src/gpu-project-geoarrow.ts +5 -0
- package/src/gpu-project-graph.ts +5 -0
- package/src/gpu-simple-graph/compiled-gpu-expression-graph.ts +97 -6
- package/src/gpu-simple-graph/gpu-simple-graph-lowering.ts +11 -0
- package/src/gpu-simple-graph/gpu-simple-graph-transfer.ts +1 -1
- package/src/gpu-simple-graph/gpu-simple-graph-value.ts +1 -1
- package/src/gpu-simple-graph/gpu-simple-graph.ts +163 -19
- package/src/gpu-simple-graph/index.ts +1 -0
- package/src/gpu-simple-graph/operation/gpu-data-evaluator.ts +25 -1
- package/src/gpu-simple-graph/operation/gpu-vector-evaluator.ts +7 -0
- package/src/gpu-simple-graph/operation/operation.ts +1 -1
- package/src/gpu-simple-graph/operations/convert-colors.ts +22 -7
- package/src/gpu-simple-graph/operations/cpu/convert-colors.ts +31 -48
- package/src/gpu-simple-graph/operations/swizzle.ts +1 -1
- package/src/gpu-simple-graph/operations/webgpu/convert-colors.ts +47 -13
- package/src/gpu-simple-graph-cpu.ts +5 -0
- package/src/gpu-simple-graph-webgl.ts +5 -0
- package/src/gpu-simple-graph-webgpu.ts +5 -0
- package/src/gpu-sql/gpu-sql.ts +238 -354
- package/src/gpu-tables/table/gpu-table.ts +2 -1
- package/src/index.ts +21 -0
package/dist/gpu-sql/gpu-sql.js
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
// SPDX-FileComment: Independently implemented for WebGPU; inspired by relational SQL semantics.
|
|
5
|
+
import { parseSQLSelectStatement } from '@math.gl/sql/parser';
|
|
5
6
|
import { GPUDataFrame } from "../gpu-dataframe/gpu-data-frame.js";
|
|
6
7
|
import { GPUDataFrameQuery } from "../gpu-dataframe/gpu-data-frame-query.js";
|
|
7
|
-
import { GPUExpression, column,
|
|
8
|
-
|
|
9
|
-
const MAXIMUM_SQL_TOKENS = 4_096;
|
|
10
|
-
const MAXIMUM_EXPRESSION_DEPTH = 64;
|
|
8
|
+
import { GPUExpression, column, isGPUScalarFunction, parameter } from "../gpu-dataframe/gpu-expression.js";
|
|
9
|
+
import { lowerPortableExpression } from "../gpu-dataframe/portable-expression.js";
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
11
|
+
* SQL frontend over explicitly registered, already GPU-resident dataframes.
|
|
13
12
|
*
|
|
14
13
|
* Parsing and planning never upload data, submit work, or read GPU buffers. Arrow upload/output
|
|
15
14
|
* remain explicit `@luma.gl/graph/arrow` operations around the shared GPU table execution core.
|
|
@@ -32,9 +31,8 @@ export class GPUSQLContext {
|
|
|
32
31
|
}
|
|
33
32
|
/** Parses and validates one immutable SELECT plan without touching registered GPU sources. */
|
|
34
33
|
query(source, options = {}) {
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
return new GPUSQLQuery(source, buildGPUSQLPlan(this.tables, statement));
|
|
34
|
+
const statement = parseGPUSQLStatement(source);
|
|
35
|
+
return new GPUSQLQuery(source, buildGPUSQLPlan(this.tables, statement, options.parameters ?? {}));
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
/** Immutable SQL plan lowered directly into existing reusable GPU dataframe command graphs. */
|
|
@@ -53,30 +51,34 @@ export class GPUSQLQuery {
|
|
|
53
51
|
return this.plan.compile(graph);
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
|
-
function buildGPUSQLPlan(tables, statement) {
|
|
54
|
+
function buildGPUSQLPlan(tables, statement, parameters) {
|
|
57
55
|
const frame = tables[statement.table.toLowerCase()];
|
|
58
56
|
if (!frame)
|
|
59
57
|
throw new Error(`GPUSQL table "${statement.table}" is not registered`);
|
|
60
58
|
let query = new GPUDataFrameQuery(frame, [], frame.columnNames);
|
|
61
59
|
const qualifier = statement.alias ?? statement.table;
|
|
62
|
-
const resolve = (
|
|
60
|
+
const resolve = (reference) => resolveGPUSQLColumn(reference, qualifier, frame.columnNames);
|
|
63
61
|
if (statement.predicate) {
|
|
64
|
-
query = query.filter(new GPUExpression(
|
|
62
|
+
query = query.filter(new GPUExpression(lowerSQLExpression(statement.predicate, parameters, resolve)));
|
|
65
63
|
}
|
|
66
64
|
const aggregates = statement.items.filter(item => item.aggregate);
|
|
67
65
|
if (aggregates.length > 0) {
|
|
68
|
-
if (statement.join ||
|
|
69
|
-
|
|
66
|
+
if (statement.join ||
|
|
67
|
+
statement.orderBy ||
|
|
68
|
+
statement.limit !== undefined ||
|
|
69
|
+
statement.offset !== undefined) {
|
|
70
|
+
throw new Error('GPUSQL aggregate queries do not yet support joins, ordering, or pagination');
|
|
70
71
|
}
|
|
71
72
|
const definitions = {};
|
|
72
73
|
for (const item of aggregates) {
|
|
73
|
-
const
|
|
74
|
+
const inputColumn = item.aggregateColumn && resolve(item.aggregateColumn);
|
|
75
|
+
const name = item.alias ?? `${item.aggregate}_${inputColumn ?? 'all'}`;
|
|
74
76
|
if (definitions[name])
|
|
75
77
|
throw new Error(`GPUSQL aggregate alias "${name}" is duplicated`);
|
|
76
78
|
definitions[name] =
|
|
77
79
|
item.aggregate === 'count'
|
|
78
80
|
? 'count'
|
|
79
|
-
: { [item.aggregate]:
|
|
81
|
+
: { [item.aggregate]: inputColumn };
|
|
80
82
|
}
|
|
81
83
|
if (statement.groupBy) {
|
|
82
84
|
const key = resolve(statement.groupBy);
|
|
@@ -102,7 +104,7 @@ function buildGPUSQLPlan(tables, statement) {
|
|
|
102
104
|
selected.push(...frame.columnNames);
|
|
103
105
|
continue;
|
|
104
106
|
}
|
|
105
|
-
const node =
|
|
107
|
+
const node = lowerSQLExpression(item.expression, parameters, resolve);
|
|
106
108
|
const name = item.alias ?? (node.kind === 'column' ? node.name : undefined);
|
|
107
109
|
if (!name)
|
|
108
110
|
throw new Error('GPUSQL computed SELECT expressions require an explicit AS alias');
|
|
@@ -117,15 +119,20 @@ function buildGPUSQLPlan(tables, statement) {
|
|
|
117
119
|
selected.push(name);
|
|
118
120
|
}
|
|
119
121
|
if (statement.join) {
|
|
120
|
-
if (statement.orderBy || statement.limit !== undefined) {
|
|
121
|
-
throw new Error('GPUSQL joined results do not yet support ORDER BY or
|
|
122
|
+
if (statement.orderBy || statement.limit !== undefined || statement.offset !== undefined) {
|
|
123
|
+
throw new Error('GPUSQL joined results do not yet support ORDER BY or pagination');
|
|
122
124
|
}
|
|
123
125
|
const right = tables[statement.join.table.toLowerCase()];
|
|
124
126
|
if (!right)
|
|
125
127
|
throw new Error(`GPUSQL table "${statement.join.table}" is not registered`);
|
|
126
|
-
const leftKey = resolve(statement.join.left);
|
|
127
128
|
const rightQualifier = statement.join.alias ?? statement.join.table;
|
|
128
|
-
const
|
|
129
|
+
const { left: firstOperand, right: secondOperand } = statement.join;
|
|
130
|
+
const matchesLeft = (reference) => matchesGPUSQLColumn(reference, qualifier, frame.columnNames);
|
|
131
|
+
const matchesRight = (reference) => matchesGPUSQLColumn(reference, rightQualifier, right.columnNames);
|
|
132
|
+
const forward = matchesLeft(firstOperand) && matchesRight(secondOperand);
|
|
133
|
+
const reversed = !forward && matchesLeft(secondOperand) && matchesRight(firstOperand);
|
|
134
|
+
const leftKey = resolve(reversed ? secondOperand : firstOperand);
|
|
135
|
+
const rightKey = resolveGPUSQLColumn(reversed ? firstOperand : secondOperand, rightQualifier, right.columnNames);
|
|
129
136
|
if (!selected.includes(leftKey)) {
|
|
130
137
|
throw new Error('GPUSQL joins require the left join key to remain selected');
|
|
131
138
|
}
|
|
@@ -143,355 +150,194 @@ function buildGPUSQLPlan(tables, statement) {
|
|
|
143
150
|
}
|
|
144
151
|
}
|
|
145
152
|
if (statement.orderBy) {
|
|
146
|
-
const
|
|
147
|
-
|
|
153
|
+
const { column: requested, direction, nulls } = statement.orderBy;
|
|
154
|
+
const orderColumn = requested.qualifier === undefined && selected.includes(requested.name)
|
|
155
|
+
? requested.name
|
|
156
|
+
: resolve(requested);
|
|
148
157
|
if (!selected.includes(orderColumn)) {
|
|
149
158
|
throw new Error('GPUSQL ORDER BY requires the sort column in the SELECT projection');
|
|
150
159
|
}
|
|
151
160
|
const sort = query.select(selected).sortByGlobal(orderColumn, {
|
|
152
|
-
direction
|
|
153
|
-
...(
|
|
161
|
+
direction,
|
|
162
|
+
...(nulls ? { nulls } : {})
|
|
154
163
|
});
|
|
155
|
-
return statement.limit === undefined
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
throw new Error('GPUSQL LIMIT currently requires ORDER BY');
|
|
159
|
-
if (query.predicates.length === 0) {
|
|
160
|
-
const firstColumn = frame.columnNames[0];
|
|
161
|
-
if (!firstColumn)
|
|
162
|
-
throw new Error('GPUSQL SELECT requires at least one GPU source column');
|
|
163
|
-
query = query.filter(column(firstColumn).isValid().or(column(firstColumn).isNull()));
|
|
164
|
+
return statement.limit === undefined && statement.offset === undefined
|
|
165
|
+
? sort
|
|
166
|
+
: sort.page(statement.offset ?? 0, statement.limit);
|
|
164
167
|
}
|
|
168
|
+
if (statement.limit !== undefined || statement.offset !== undefined)
|
|
169
|
+
throw new Error('GPUSQL LIMIT or OFFSET currently requires ORDER BY');
|
|
165
170
|
return query.select(selected);
|
|
166
171
|
}
|
|
172
|
+
/** Resolves the only non-aggregate item in a grouped projection. */
|
|
167
173
|
function resolveGPUSQLProjectionName(item, resolve) {
|
|
168
|
-
if (item.expression?.
|
|
174
|
+
if (item.expression?.type !== 'Identifier' && item.expression?.type !== 'MemberExpression') {
|
|
169
175
|
throw new Error('GPUSQL grouped source expressions must reference the group key directly');
|
|
170
176
|
}
|
|
171
|
-
return resolve(item.expression
|
|
177
|
+
return resolve(readGPUSQLColumn(item.expression));
|
|
172
178
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
throw new Error(`GPUSQL column "${name}" does not exist`);
|
|
183
|
-
return matches[0];
|
|
179
|
+
/** Formats the source spelling for diagnostics. */
|
|
180
|
+
function formatGPUSQLColumn({ name, qualifier }) {
|
|
181
|
+
return qualifier === undefined ? name : qualifier + '.' + name;
|
|
182
|
+
}
|
|
183
|
+
/** Checks whether a join operand can bind to one side of the join. */
|
|
184
|
+
function matchesGPUSQLColumn(reference, qualifier, columns) {
|
|
185
|
+
return ((reference.qualifier === undefined ||
|
|
186
|
+
reference.qualifier.toLowerCase() === qualifier.toLowerCase()) &&
|
|
187
|
+
columns.includes(reference.name));
|
|
184
188
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
return { ...expression, operand: resolveGPUSQLExpression(expression.operand, resolve) };
|
|
191
|
-
case 'binary':
|
|
192
|
-
return {
|
|
193
|
-
...expression,
|
|
194
|
-
left: resolveGPUSQLExpression(expression.left, resolve),
|
|
195
|
-
right: resolveGPUSQLExpression(expression.right, resolve)
|
|
196
|
-
};
|
|
197
|
-
default:
|
|
198
|
-
return expression;
|
|
189
|
+
/** Binds a parsed reference to an exact dataframe field. */
|
|
190
|
+
function resolveGPUSQLColumn(reference, qualifier, columns) {
|
|
191
|
+
if (reference.qualifier !== undefined &&
|
|
192
|
+
reference.qualifier.toLowerCase() !== qualifier.toLowerCase()) {
|
|
193
|
+
throw new Error('GPUSQL column "' + formatGPUSQLColumn(reference) + '" has an unknown table qualifier');
|
|
199
194
|
}
|
|
195
|
+
if (!columns.includes(reference.name)) {
|
|
196
|
+
throw new Error('GPUSQL column "' + formatGPUSQLColumn(reference) + '" does not exist');
|
|
197
|
+
}
|
|
198
|
+
return reference.name;
|
|
200
199
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
200
|
+
/** Parses the SQL subset supported by the GPU relational planner. */
|
|
201
|
+
function parseGPUSQLStatement(source) {
|
|
202
|
+
const statement = parseSQLSelectStatement(source, {
|
|
203
|
+
parseParameter: name => ({ type: 'Identifier', name, gpuSQLParameter: true })
|
|
204
|
+
});
|
|
205
|
+
if (statement.offset !== undefined && statement.offset > 0xffffffff) {
|
|
206
|
+
throw new Error('GPUSQL OFFSET must fit an unsigned 32-bit row count');
|
|
208
207
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
items.push(this.parseSelectItem());
|
|
214
|
-
} while (this.takeSymbol(','));
|
|
215
|
-
this.expectKeyword('FROM');
|
|
216
|
-
const table = this.parseIdentifier();
|
|
217
|
-
const alias = this.parseOptionalTableAlias();
|
|
218
|
-
const join = this.parseOptionalJoin();
|
|
219
|
-
const predicate = this.takeKeyword('WHERE') ? this.parseExpression(0) : undefined;
|
|
220
|
-
let groupBy;
|
|
221
|
-
if (this.takeKeyword('GROUP')) {
|
|
222
|
-
this.expectKeyword('BY');
|
|
223
|
-
groupBy = this.parseIdentifier();
|
|
224
|
-
if (this.takeSymbol(','))
|
|
225
|
-
throw new Error('GPUSQL currently supports one GROUP BY column');
|
|
226
|
-
}
|
|
227
|
-
let orderBy;
|
|
228
|
-
if (this.takeKeyword('ORDER')) {
|
|
229
|
-
this.expectKeyword('BY');
|
|
230
|
-
const sortColumn = this.parseIdentifier();
|
|
231
|
-
const direction = this.takeKeyword('DESC')
|
|
232
|
-
? 'descending'
|
|
233
|
-
: (this.takeKeyword('ASC'), 'ascending');
|
|
234
|
-
let nulls;
|
|
235
|
-
if (this.takeKeyword('NULLS')) {
|
|
236
|
-
nulls = this.takeKeyword('FIRST') ? 'first' : this.expectKeyword('LAST') && 'last';
|
|
237
|
-
}
|
|
238
|
-
orderBy = { column: sortColumn, direction, ...(nulls ? { nulls } : {}) };
|
|
239
|
-
if (this.takeSymbol(','))
|
|
240
|
-
throw new Error('GPUSQL currently supports one ORDER BY column');
|
|
241
|
-
}
|
|
242
|
-
let limit;
|
|
243
|
-
if (this.takeKeyword('LIMIT')) {
|
|
244
|
-
const token = this.take();
|
|
245
|
-
if (token?.kind !== 'number' || !/^\d+$/.test(token.value)) {
|
|
246
|
-
throw new Error('GPUSQL LIMIT requires a nonnegative integer');
|
|
247
|
-
}
|
|
248
|
-
limit = Number(token.value);
|
|
249
|
-
if (!Number.isSafeInteger(limit) || limit > 0xffffffff) {
|
|
250
|
-
throw new Error('GPUSQL LIMIT must fit an unsigned 32-bit row count');
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
this.takeSymbol(';');
|
|
254
|
-
if (this.peek())
|
|
255
|
-
throw new Error(`GPUSQL does not support unexpected token "${this.peek().value}"`);
|
|
256
|
-
return {
|
|
257
|
-
items,
|
|
258
|
-
table,
|
|
259
|
-
...(alias ? { alias } : {}),
|
|
260
|
-
...(join ? { join } : {}),
|
|
261
|
-
...(predicate ? { predicate } : {}),
|
|
262
|
-
...(groupBy ? { groupBy } : {}),
|
|
263
|
-
...(orderBy ? { orderBy } : {}),
|
|
264
|
-
...(limit !== undefined ? { limit } : {})
|
|
265
|
-
};
|
|
208
|
+
if (statement.joins.length > 1)
|
|
209
|
+
throw new Error('GPUSQL currently supports one JOIN');
|
|
210
|
+
if ((statement.groupBy?.length ?? 0) > 1) {
|
|
211
|
+
throw new Error('GPUSQL currently supports one GROUP BY column');
|
|
266
212
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
return { star: true };
|
|
270
|
-
const token = this.peek();
|
|
271
|
-
if (token?.kind === 'identifier' &&
|
|
272
|
-
/^(COUNT|SUM|MIN|MAX|AVG|MEAN)$/i.test(token.value) &&
|
|
273
|
-
this.tokens[this.position + 1]?.value === '(') {
|
|
274
|
-
this.take();
|
|
275
|
-
this.expectSymbol('(');
|
|
276
|
-
const aggregate = token.value.toLowerCase();
|
|
277
|
-
const aggregateColumn = this.takeSymbol('*') ? undefined : this.parseIdentifier();
|
|
278
|
-
this.expectSymbol(')');
|
|
279
|
-
if (!aggregateColumn && aggregate !== 'count') {
|
|
280
|
-
throw new Error('GPUSQL only permits COUNT(*) as a wildcard aggregation');
|
|
281
|
-
}
|
|
282
|
-
if (aggregateColumn && aggregate === 'count') {
|
|
283
|
-
throw new Error('GPUSQL currently supports COUNT(*) but not nullable COUNT(column)');
|
|
284
|
-
}
|
|
285
|
-
return {
|
|
286
|
-
aggregate: aggregate === 'avg' ? 'mean' : aggregate,
|
|
287
|
-
...(aggregateColumn ? { aggregateColumn } : {}),
|
|
288
|
-
...(this.takeKeyword('AS') ? { alias: this.parseIdentifier() } : {})
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
const expression = this.parseExpression(0);
|
|
292
|
-
return {
|
|
293
|
-
...(expression ? { expression } : {}),
|
|
294
|
-
...(this.takeKeyword('AS') ? { alias: this.parseIdentifier() } : {})
|
|
295
|
-
};
|
|
213
|
+
if ((statement.orderBy?.length ?? 0) > 1) {
|
|
214
|
+
throw new Error('GPUSQL currently supports one ORDER BY column');
|
|
296
215
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
if (this.takeKeyword('LEFT')) {
|
|
300
|
-
this.takeKeyword('OUTER');
|
|
301
|
-
type = 'left';
|
|
302
|
-
}
|
|
303
|
-
else if (this.takeKeyword('SEMI')) {
|
|
304
|
-
type = 'semi';
|
|
305
|
-
}
|
|
306
|
-
else if (this.takeKeyword('ANTI')) {
|
|
307
|
-
type = 'anti';
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
this.takeKeyword('INNER');
|
|
311
|
-
}
|
|
312
|
-
if (!this.takeKeyword('JOIN')) {
|
|
313
|
-
if (type !== 'inner')
|
|
314
|
-
throw new Error('GPUSQL join modifier must be followed by JOIN');
|
|
315
|
-
return undefined;
|
|
316
|
-
}
|
|
317
|
-
const table = this.parseIdentifier();
|
|
318
|
-
const alias = this.parseOptionalTableAlias();
|
|
319
|
-
this.expectKeyword('ON');
|
|
320
|
-
const left = this.parseIdentifier();
|
|
321
|
-
this.expectSymbol('=');
|
|
322
|
-
const right = this.parseIdentifier();
|
|
323
|
-
return { type, table, ...(alias ? { alias } : {}), left, right };
|
|
216
|
+
if (statement.limit !== undefined && statement.limit > 0xffffffff) {
|
|
217
|
+
throw new Error('GPUSQL LIMIT must fit an unsigned 32-bit row count');
|
|
324
218
|
}
|
|
325
|
-
|
|
326
|
-
if (
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
219
|
+
const items = statement.select?.map(({ expression, alias }) => {
|
|
220
|
+
if (expression.type === 'CallExpression' && expression.callee.type === 'Identifier') {
|
|
221
|
+
const name = String(expression.callee['name']).toLowerCase();
|
|
222
|
+
const aggregate = name === 'avg' ? 'mean' : name;
|
|
223
|
+
switch (aggregate) {
|
|
224
|
+
case 'count':
|
|
225
|
+
case 'sum':
|
|
226
|
+
case 'min':
|
|
227
|
+
case 'max':
|
|
228
|
+
case 'mean': {
|
|
229
|
+
if (expression.arguments.length !== 1) {
|
|
230
|
+
throw new Error('GPUSQL aggregates require one argument');
|
|
231
|
+
}
|
|
232
|
+
const argument = expression.arguments[0];
|
|
233
|
+
const wildcard = argument.type === 'Identifier' && argument['sqlWildcard'] === true;
|
|
234
|
+
if ((aggregate === 'count') !== wildcard) {
|
|
235
|
+
throw new Error('GPUSQL only permits COUNT(*) as a wildcard aggregation');
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
aggregate,
|
|
239
|
+
...(wildcard ? {} : { aggregateColumn: readGPUSQLColumn(argument) }),
|
|
240
|
+
alias
|
|
241
|
+
};
|
|
242
|
+
}
|
|
339
243
|
}
|
|
340
|
-
const token = this.peek();
|
|
341
|
-
const operation = token ? getGPUSQLBinaryOperator(token.value) : undefined;
|
|
342
|
-
if (!operation || operation.precedence < minimumPrecedence)
|
|
343
|
-
break;
|
|
344
|
-
this.take();
|
|
345
|
-
expression = {
|
|
346
|
-
kind: 'binary',
|
|
347
|
-
operator: operation.operator,
|
|
348
|
-
left: expression,
|
|
349
|
-
right: this.parseExpression(depth + 1, operation.precedence + 1)
|
|
350
|
-
};
|
|
351
244
|
}
|
|
352
|
-
return expression;
|
|
245
|
+
return { expression, alias };
|
|
246
|
+
}) ?? [{ star: true }];
|
|
247
|
+
const join = statement.joins[0];
|
|
248
|
+
if (statement.from.inputTable !== undefined || join?.table.inputTable !== undefined) {
|
|
249
|
+
throw new Error('GPUSQL does not support table functions');
|
|
353
250
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
if (
|
|
359
|
-
|
|
251
|
+
let loweredJoin;
|
|
252
|
+
if (join) {
|
|
253
|
+
if (join.unnest)
|
|
254
|
+
throw new Error('GPUSQL does not support JOIN UNNEST');
|
|
255
|
+
if (join.type === 'cross')
|
|
256
|
+
throw new Error('GPUSQL does not support CROSS JOIN');
|
|
257
|
+
if (join.on.type !== 'BinaryExpression' || join.on.operator !== '==') {
|
|
258
|
+
throw new Error('GPUSQL JOIN requires equality between two columns');
|
|
360
259
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
throw new Error('GPUSQL expected an expression');
|
|
369
|
-
if (token.kind === 'number') {
|
|
370
|
-
const value = Number(token.value);
|
|
371
|
-
if (!Number.isFinite(value))
|
|
372
|
-
throw new Error('GPUSQL numeric literals must be finite');
|
|
373
|
-
return literal(value).node;
|
|
374
|
-
}
|
|
375
|
-
if (token.kind === 'parameter') {
|
|
376
|
-
if (!Object.hasOwn(this.parameters, token.value)) {
|
|
377
|
-
throw new Error(`GPUSQL parameter ":${token.value}" requires an explicit default`);
|
|
378
|
-
}
|
|
379
|
-
return parameter(token.value, this.parameters[token.value]).node;
|
|
380
|
-
}
|
|
381
|
-
if (token.kind === 'identifier') {
|
|
382
|
-
if (/^NULL$/i.test(token.value))
|
|
383
|
-
return literal(null).node;
|
|
384
|
-
if (/^TRUE$/i.test(token.value))
|
|
385
|
-
return literal(true).node;
|
|
386
|
-
if (/^FALSE$/i.test(token.value))
|
|
387
|
-
return literal(false).node;
|
|
388
|
-
return column(token.value).node;
|
|
389
|
-
}
|
|
390
|
-
throw new Error(`GPUSQL does not support expression token "${token.value}"`);
|
|
391
|
-
}
|
|
392
|
-
parseOptionalTableAlias() {
|
|
393
|
-
if (this.takeKeyword('AS'))
|
|
394
|
-
return this.parseIdentifier();
|
|
395
|
-
const token = this.peek();
|
|
396
|
-
return token?.kind === 'identifier' &&
|
|
397
|
-
!/^(WHERE|GROUP|ORDER|LIMIT|JOIN|INNER|LEFT|OUTER|SEMI|ANTI|ON)$/i.test(token.value)
|
|
398
|
-
? this.parseIdentifier()
|
|
399
|
-
: undefined;
|
|
400
|
-
}
|
|
401
|
-
parseIdentifier() {
|
|
402
|
-
const token = this.take();
|
|
403
|
-
if (token?.kind !== 'identifier')
|
|
404
|
-
throw new Error('GPUSQL expected a table or column identifier');
|
|
405
|
-
return token.value;
|
|
406
|
-
}
|
|
407
|
-
expectKeyword(keyword) {
|
|
408
|
-
if (!this.takeKeyword(keyword))
|
|
409
|
-
throw new Error(`GPUSQL expected ${keyword}`);
|
|
410
|
-
return true;
|
|
411
|
-
}
|
|
412
|
-
takeKeyword(keyword) {
|
|
413
|
-
const token = this.peek();
|
|
414
|
-
if (token?.kind !== 'identifier' || token.value.toUpperCase() !== keyword)
|
|
415
|
-
return false;
|
|
416
|
-
this.position++;
|
|
417
|
-
return true;
|
|
418
|
-
}
|
|
419
|
-
expectSymbol(symbol) {
|
|
420
|
-
if (!this.takeSymbol(symbol))
|
|
421
|
-
throw new Error(`GPUSQL expected "${symbol}"`);
|
|
422
|
-
}
|
|
423
|
-
takeSymbol(symbol) {
|
|
424
|
-
const token = this.peek();
|
|
425
|
-
if (token?.kind !== 'symbol' || token.value !== symbol)
|
|
426
|
-
return false;
|
|
427
|
-
this.position++;
|
|
428
|
-
return true;
|
|
429
|
-
}
|
|
430
|
-
take() {
|
|
431
|
-
const token = this.tokens[this.position];
|
|
432
|
-
if (token)
|
|
433
|
-
this.position++;
|
|
434
|
-
return token;
|
|
435
|
-
}
|
|
436
|
-
peek() {
|
|
437
|
-
return this.tokens[this.position];
|
|
260
|
+
loweredJoin = {
|
|
261
|
+
type: join.type,
|
|
262
|
+
table: join.table.name,
|
|
263
|
+
alias: join.table.alias,
|
|
264
|
+
left: readGPUSQLColumn(join.on.left),
|
|
265
|
+
right: readGPUSQLColumn(join.on.right)
|
|
266
|
+
};
|
|
438
267
|
}
|
|
268
|
+
const sort = statement.orderBy?.[0];
|
|
269
|
+
return {
|
|
270
|
+
items,
|
|
271
|
+
table: statement.from.name,
|
|
272
|
+
alias: statement.from.alias,
|
|
273
|
+
join: loweredJoin,
|
|
274
|
+
predicate: statement.where,
|
|
275
|
+
groupBy: statement.groupBy?.[0] && readGPUSQLColumn(statement.groupBy[0]),
|
|
276
|
+
orderBy: sort && {
|
|
277
|
+
column: readGPUSQLColumn(sort.expression),
|
|
278
|
+
direction: sort.direction === 'desc' ? 'descending' : 'ascending',
|
|
279
|
+
nulls: sort.nulls
|
|
280
|
+
},
|
|
281
|
+
offset: statement.offset,
|
|
282
|
+
limit: statement.limit
|
|
283
|
+
};
|
|
439
284
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
285
|
+
/** Reads a source column name or a two-part qualified column reference. */
|
|
286
|
+
function readGPUSQLColumn(node) {
|
|
287
|
+
const expression = node;
|
|
288
|
+
if (expression.type === 'Identifier' && !('gpuSQLParameter' in expression)) {
|
|
289
|
+
return { name: expression.name };
|
|
443
290
|
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
if (match[1])
|
|
454
|
-
tokens.push({ kind: 'parameter', value: match[1] });
|
|
455
|
-
else if (match[2])
|
|
456
|
-
tokens.push({ kind: 'identifier', value: match[2] });
|
|
457
|
-
else if (match[3])
|
|
458
|
-
tokens.push({ kind: 'number', value: match[3] });
|
|
459
|
-
else if (match[4])
|
|
460
|
-
tokens.push({ kind: 'symbol', value: match[4] });
|
|
461
|
-
if (tokens.length > MAXIMUM_SQL_TOKENS)
|
|
462
|
-
throw new Error('GPUSQL statement exceeds its safe token limit');
|
|
291
|
+
if (expression.type === 'MemberExpression' && !expression.computed) {
|
|
292
|
+
const object = expression.object;
|
|
293
|
+
const property = expression.property;
|
|
294
|
+
if (object.type === 'Identifier' &&
|
|
295
|
+
property.type === 'Identifier' &&
|
|
296
|
+
!('gpuSQLParameter' in object) &&
|
|
297
|
+
!('gpuSQLParameter' in property)) {
|
|
298
|
+
return { qualifier: object.name, name: property.name };
|
|
299
|
+
}
|
|
463
300
|
}
|
|
464
|
-
|
|
301
|
+
throw new Error('GPUSQL expected a table or column identifier');
|
|
465
302
|
}
|
|
466
|
-
function
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
default:
|
|
303
|
+
function lowerSQLExpression(node, parameters, resolve) {
|
|
304
|
+
const expression = node;
|
|
305
|
+
try {
|
|
306
|
+
return lowerPortableExpression(expression, leaf => {
|
|
307
|
+
if (leaf.type === 'Identifier' && 'gpuSQLParameter' in leaf) {
|
|
308
|
+
const name = leaf.name;
|
|
309
|
+
if (!Object.hasOwn(parameters, name)) {
|
|
310
|
+
throw new Error(`GPUSQL parameter ":${name}" requires an explicit default`);
|
|
311
|
+
}
|
|
312
|
+
return parameter(name, parameters[name]).node;
|
|
313
|
+
}
|
|
314
|
+
if (leaf.type === 'Identifier' || leaf.type === 'MemberExpression') {
|
|
315
|
+
return column(resolve(readGPUSQLColumn(leaf))).node;
|
|
316
|
+
}
|
|
317
|
+
if (leaf.type === 'CallExpression' && leaf.callee.type === 'Identifier') {
|
|
318
|
+
const name = leaf.callee['name'];
|
|
319
|
+
const functionName = typeof name === 'string' && leaf['sqlFunction'] === true ? name.toLowerCase() : name;
|
|
320
|
+
if (name !== 'isNull' &&
|
|
321
|
+
name !== 'isNotNull' &&
|
|
322
|
+
name !== 'in' &&
|
|
323
|
+
name !== 'cast' &&
|
|
324
|
+
functionName !== 'coalesce' &&
|
|
325
|
+
functionName !== 'nullif' &&
|
|
326
|
+
!isGPUScalarFunction(functionName)) {
|
|
327
|
+
throw new Error(`GPUSQL does not support SQL expression "${name}"`);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
494
330
|
return undefined;
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
catch (error) {
|
|
334
|
+
if (error instanceof Error &&
|
|
335
|
+
error.message === 'Unsupported portable GPU dataframe expression') {
|
|
336
|
+
throw new Error(`GPUSQL does not support SQL expression "${expression.type}"`, {
|
|
337
|
+
cause: error
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
throw error;
|
|
495
341
|
}
|
|
496
342
|
}
|
|
497
343
|
//# sourceMappingURL=gpu-sql.js.map
|