@luma.gl/graph 10.0.0-alpha.8 → 10.0.0-beta.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/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/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 +1 -16
- package/dist/gpu-dataframe/gpu-data-frame-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-data-frame-query.js +1 -23
- package/dist/gpu-dataframe/gpu-data-frame-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.cjs +91 -2
- package/dist/gpu-dataframe/gpu-expression.d.ts +37 -0
- package/dist/gpu-dataframe/gpu-expression.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.js +106 -0
- package/dist/gpu-dataframe/gpu-expression.js.map +1 -1
- package/dist/gpu-dataframe/index.cjs +12 -2
- package/dist/gpu-dataframe/index.cjs.map +3 -3
- package/dist/gpu-dataframe/index.d.ts +4 -0
- package/dist/gpu-dataframe/index.d.ts.map +1 -1
- package/dist/gpu-dataframe/index.js +2 -0
- package/dist/gpu-dataframe/index.js.map +1 -1
- package/dist/gpu-dataframe/portable-expression.cjs +103 -0
- package/dist/gpu-dataframe/portable-expression.d.ts +19 -0
- package/dist/gpu-dataframe/portable-expression.d.ts.map +1 -0
- package/dist/gpu-dataframe/portable-expression.js +98 -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-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-h3/index.cjs.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.cjs +162 -2
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts +25 -0
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.js +181 -2
- package/dist/gpu-physics/gpu-rigid-body-world.js.map +1 -1
- package/dist/gpu-physics/index.cjs.map +2 -2
- package/dist/gpu-physics/index.d.ts +1 -0
- package/dist/gpu-physics/index.d.ts.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-shaders.cjs +2 -2
- 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 +2 -2
- package/dist/gpu-physics/rigid-body-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-vehicle.cjs +90 -0
- package/dist/gpu-physics/rigid-body-vehicle.d.ts +35 -0
- package/dist/gpu-physics/rigid-body-vehicle.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-vehicle.js +66 -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 +2 -2
- 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-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.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 +6 -0
- 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/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-sql/gpu-sql.cjs +376 -0
- package/dist/gpu-sql/gpu-sql.d.ts +36 -0
- package/dist/gpu-sql/gpu-sql.d.ts.map +1 -0
- package/dist/gpu-sql/gpu-sql.js +374 -0
- package/dist/gpu-sql/gpu-sql.js.map +1 -0
- package/dist/gpu-sql/index.cjs +5 -5
- package/dist/gpu-sql/index.cjs.map +3 -3
- package/dist/gpu-sql/index.d.ts +2 -2
- package/dist/gpu-sql/index.d.ts.map +1 -1
- package/dist/gpu-sql/index.js +1 -1
- package/dist/gpu-sql/index.js.map +1 -1
- 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 +21 -7
- 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/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 +6 -26
- package/src/gpu-dataframe/gpu-expression.ts +135 -0
- package/src/gpu-dataframe/index.ts +11 -0
- package/src/gpu-dataframe/portable-expression.ts +117 -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-physics/gpu-rigid-body-world.ts +227 -2
- package/src/gpu-physics/index.ts +1 -0
- package/src/gpu-physics/rigid-body-parallel-shaders.ts +32 -9
- package/src/gpu-physics/rigid-body-shaders.ts +3 -2
- package/src/gpu-physics/rigid-body-vehicle.ts +99 -0
- package/src/gpu-project/README.md +4 -4
- 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/geoarrow.ts +11 -0
- package/src/gpu-project/graph.ts +10 -0
- package/src/gpu-project/index.ts +2 -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.ts +163 -19
- package/src/gpu-simple-graph/index.ts +1 -0
- package/src/gpu-simple-graph/operation/gpu-data-evaluator.ts +24 -0
- package/src/gpu-simple-graph/operation/gpu-vector-evaluator.ts +7 -0
- 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/webgpu/convert-colors.ts +47 -13
- package/src/gpu-sql/gpu-sql.ts +494 -0
- package/src/gpu-sql/index.ts +2 -2
- package/src/gpu-tables/table/gpu-table.ts +2 -1
- package/src/index.ts +21 -0
- package/dist/gpu-sql/lu-sql.cjs +0 -499
- package/dist/gpu-sql/lu-sql.d.ts +0 -36
- package/dist/gpu-sql/lu-sql.d.ts.map +0 -1
- package/dist/gpu-sql/lu-sql.js +0 -497
- package/dist/gpu-sql/lu-sql.js.map +0 -1
- package/src/gpu-sql/lu-sql.ts +0 -599
package/dist/gpu-sql/lu-sql.cjs
DELETED
|
@@ -1,499 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var lu_sql_exports = {};
|
|
19
|
-
__export(lu_sql_exports, {
|
|
20
|
-
LuSQLContext: () => LuSQLContext,
|
|
21
|
-
LuSQLQuery: () => LuSQLQuery
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(lu_sql_exports);
|
|
24
|
-
var import_gpu_data_frame = require("../gpu-dataframe/gpu-data-frame.cjs");
|
|
25
|
-
var import_gpu_data_frame_query = require("../gpu-dataframe/gpu-data-frame-query.cjs");
|
|
26
|
-
var import_gpu_expression = require("../gpu-dataframe/gpu-expression.cjs");
|
|
27
|
-
const MAXIMUM_SQL_LENGTH = 65536;
|
|
28
|
-
const MAXIMUM_SQL_TOKENS = 4096;
|
|
29
|
-
const MAXIMUM_EXPRESSION_DEPTH = 64;
|
|
30
|
-
class LuSQLContext {
|
|
31
|
-
tables;
|
|
32
|
-
constructor(tables) {
|
|
33
|
-
const registered = {};
|
|
34
|
-
for (const [name, table] of Object.entries(tables)) {
|
|
35
|
-
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(name) || !(table instanceof import_gpu_data_frame.GPUDataFrame)) {
|
|
36
|
-
throw new Error("LuSQL requires valid names mapped to existing GPU dataframes");
|
|
37
|
-
}
|
|
38
|
-
const canonical = name.toLowerCase();
|
|
39
|
-
if (registered[canonical])
|
|
40
|
-
throw new Error(`LuSQL table "${name}" is already registered`);
|
|
41
|
-
registered[canonical] = table;
|
|
42
|
-
}
|
|
43
|
-
this.tables = Object.freeze(registered);
|
|
44
|
-
Object.freeze(this);
|
|
45
|
-
}
|
|
46
|
-
/** Parses and validates one immutable SELECT plan without touching registered GPU sources. */
|
|
47
|
-
query(source, options = {}) {
|
|
48
|
-
const parser = new LuSQLParser(source, options.parameters ?? {});
|
|
49
|
-
const statement = parser.parse();
|
|
50
|
-
return new LuSQLQuery(source, buildLuSQLPlan(this.tables, statement));
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
class LuSQLQuery {
|
|
54
|
-
/** Original application-owned SQL text, retained solely for diagnostics and inspection. */
|
|
55
|
-
sql;
|
|
56
|
-
plan;
|
|
57
|
-
/** @internal */
|
|
58
|
-
constructor(sql, plan) {
|
|
59
|
-
this.sql = sql;
|
|
60
|
-
this.plan = plan;
|
|
61
|
-
Object.freeze(this);
|
|
62
|
-
}
|
|
63
|
-
/** Compiles existing dataframe operations into the caller-owned GPU command graph. */
|
|
64
|
-
compile(graph) {
|
|
65
|
-
return this.plan.compile(graph);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function buildLuSQLPlan(tables, statement) {
|
|
69
|
-
const frame = tables[statement.table.toLowerCase()];
|
|
70
|
-
if (!frame)
|
|
71
|
-
throw new Error(`LuSQL table "${statement.table}" is not registered`);
|
|
72
|
-
let query = new import_gpu_data_frame_query.GPUDataFrameQuery(frame, [], frame.columnNames);
|
|
73
|
-
const qualifier = statement.alias ?? statement.table;
|
|
74
|
-
const resolve = (name) => resolveLuSQLColumn(name, qualifier, frame.columnNames);
|
|
75
|
-
if (statement.predicate) {
|
|
76
|
-
query = query.filter(new import_gpu_expression.GPUExpression(resolveLuSQLExpression(statement.predicate, resolve)));
|
|
77
|
-
}
|
|
78
|
-
const aggregates = statement.items.filter((item) => item.aggregate);
|
|
79
|
-
if (aggregates.length > 0) {
|
|
80
|
-
if (statement.join || statement.orderBy || statement.limit !== void 0) {
|
|
81
|
-
throw new Error("LuSQL aggregate queries do not yet support joins, ordering, or limits");
|
|
82
|
-
}
|
|
83
|
-
const definitions = {};
|
|
84
|
-
for (const item of aggregates) {
|
|
85
|
-
const name = item.alias ?? `${item.aggregate}_${item.aggregateColumn ?? "all"}`;
|
|
86
|
-
if (definitions[name])
|
|
87
|
-
throw new Error(`LuSQL aggregate alias "${name}" is duplicated`);
|
|
88
|
-
definitions[name] = item.aggregate === "count" ? "count" : { [item.aggregate]: resolve(item.aggregateColumn) };
|
|
89
|
-
}
|
|
90
|
-
if (statement.groupBy) {
|
|
91
|
-
const key = resolve(statement.groupBy);
|
|
92
|
-
const nonAggregates = statement.items.filter((item) => !item.aggregate);
|
|
93
|
-
if (nonAggregates.length !== 1 || resolveLuSQLProjectionName(nonAggregates[0], resolve) !== key) {
|
|
94
|
-
throw new Error("LuSQL grouped queries must select their single GROUP BY key");
|
|
95
|
-
}
|
|
96
|
-
return query.groupBy(key).aggregate(definitions);
|
|
97
|
-
}
|
|
98
|
-
if (aggregates.length !== statement.items.length) {
|
|
99
|
-
throw new Error("LuSQL global aggregates cannot mix ordinary source columns");
|
|
100
|
-
}
|
|
101
|
-
return query.aggregate(definitions);
|
|
102
|
-
}
|
|
103
|
-
if (statement.groupBy)
|
|
104
|
-
throw new Error("LuSQL GROUP BY requires at least one aggregation");
|
|
105
|
-
const selected = [];
|
|
106
|
-
for (const item of statement.items) {
|
|
107
|
-
if (item.star) {
|
|
108
|
-
if (statement.items.length !== 1)
|
|
109
|
-
throw new Error("LuSQL SELECT * cannot include other columns");
|
|
110
|
-
selected.push(...frame.columnNames);
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
const node = resolveLuSQLExpression(item.expression, resolve);
|
|
114
|
-
const name = item.alias ?? (node.kind === "column" ? node.name : void 0);
|
|
115
|
-
if (!name)
|
|
116
|
-
throw new Error("LuSQL computed SELECT expressions require an explicit AS alias");
|
|
117
|
-
if (selected.includes(name))
|
|
118
|
-
throw new Error(`LuSQL output column "${name}" is duplicated`);
|
|
119
|
-
if (node.kind !== "column" || node.name !== name) {
|
|
120
|
-
if (frame.columnNames.includes(name)) {
|
|
121
|
-
throw new Error(`LuSQL derived alias "${name}" conflicts with an existing source column`);
|
|
122
|
-
}
|
|
123
|
-
query = query.withColumn(name, new import_gpu_expression.GPUExpression(node));
|
|
124
|
-
}
|
|
125
|
-
selected.push(name);
|
|
126
|
-
}
|
|
127
|
-
if (statement.join) {
|
|
128
|
-
if (statement.orderBy || statement.limit !== void 0) {
|
|
129
|
-
throw new Error("LuSQL joined results do not yet support ORDER BY or LIMIT");
|
|
130
|
-
}
|
|
131
|
-
const right = tables[statement.join.table.toLowerCase()];
|
|
132
|
-
if (!right)
|
|
133
|
-
throw new Error(`LuSQL table "${statement.join.table}" is not registered`);
|
|
134
|
-
const leftKey = resolve(statement.join.left);
|
|
135
|
-
const rightQualifier = statement.join.alias ?? statement.join.table;
|
|
136
|
-
const rightKey = resolveLuSQLColumn(statement.join.right, rightQualifier, right.columnNames);
|
|
137
|
-
if (!selected.includes(leftKey)) {
|
|
138
|
-
throw new Error("LuSQL joins require the left join key to remain selected");
|
|
139
|
-
}
|
|
140
|
-
query = query.select(selected);
|
|
141
|
-
const options = { leftOn: leftKey, rightOn: rightKey };
|
|
142
|
-
switch (statement.join.type) {
|
|
143
|
-
case "left":
|
|
144
|
-
return query.leftJoin(right, options);
|
|
145
|
-
case "semi":
|
|
146
|
-
return query.semiJoin(right, options);
|
|
147
|
-
case "anti":
|
|
148
|
-
return query.antiJoin(right, options);
|
|
149
|
-
default:
|
|
150
|
-
return query.innerJoin(right, options);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
if (statement.orderBy) {
|
|
154
|
-
const orderColumn = selected.find((name) => name.toLowerCase() === statement.orderBy.column.toLowerCase()) ?? resolve(statement.orderBy.column);
|
|
155
|
-
if (!selected.includes(orderColumn)) {
|
|
156
|
-
throw new Error("LuSQL ORDER BY requires the sort column in the SELECT projection");
|
|
157
|
-
}
|
|
158
|
-
const sort = query.select(selected).sortByGlobal(orderColumn, {
|
|
159
|
-
direction: statement.orderBy.direction,
|
|
160
|
-
...statement.orderBy.nulls ? { nulls: statement.orderBy.nulls } : {}
|
|
161
|
-
});
|
|
162
|
-
return statement.limit === void 0 ? sort : sort.topK(statement.limit);
|
|
163
|
-
}
|
|
164
|
-
if (statement.limit !== void 0)
|
|
165
|
-
throw new Error("LuSQL LIMIT currently requires ORDER BY");
|
|
166
|
-
if (query.predicates.length === 0) {
|
|
167
|
-
const firstColumn = frame.columnNames[0];
|
|
168
|
-
if (!firstColumn)
|
|
169
|
-
throw new Error("LuSQL SELECT requires at least one GPU source column");
|
|
170
|
-
query = query.filter((0, import_gpu_expression.column)(firstColumn).isValid().or((0, import_gpu_expression.column)(firstColumn).isNull()));
|
|
171
|
-
}
|
|
172
|
-
return query.select(selected);
|
|
173
|
-
}
|
|
174
|
-
function resolveLuSQLProjectionName(item, resolve) {
|
|
175
|
-
var _a;
|
|
176
|
-
if (((_a = item.expression) == null ? void 0 : _a.kind) !== "column") {
|
|
177
|
-
throw new Error("LuSQL grouped source expressions must reference the group key directly");
|
|
178
|
-
}
|
|
179
|
-
return resolve(item.expression.name);
|
|
180
|
-
}
|
|
181
|
-
function resolveLuSQLColumn(name, qualifier, columns) {
|
|
182
|
-
const parts = name.split(".");
|
|
183
|
-
if (parts.length > 2 || parts.length === 2 && parts[0].toLowerCase() !== qualifier.toLowerCase()) {
|
|
184
|
-
throw new Error(`LuSQL column "${name}" has an unknown table qualifier`);
|
|
185
|
-
}
|
|
186
|
-
const requested = parts[parts.length - 1];
|
|
187
|
-
const matches = columns.filter((candidate) => candidate.toLowerCase() === requested.toLowerCase());
|
|
188
|
-
if (matches.length !== 1)
|
|
189
|
-
throw new Error(`LuSQL column "${name}" does not exist`);
|
|
190
|
-
return matches[0];
|
|
191
|
-
}
|
|
192
|
-
function resolveLuSQLExpression(expression, resolve) {
|
|
193
|
-
switch (expression.kind) {
|
|
194
|
-
case "column":
|
|
195
|
-
return { kind: "column", name: resolve(expression.name) };
|
|
196
|
-
case "unary":
|
|
197
|
-
return { ...expression, operand: resolveLuSQLExpression(expression.operand, resolve) };
|
|
198
|
-
case "binary":
|
|
199
|
-
return {
|
|
200
|
-
...expression,
|
|
201
|
-
left: resolveLuSQLExpression(expression.left, resolve),
|
|
202
|
-
right: resolveLuSQLExpression(expression.right, resolve)
|
|
203
|
-
};
|
|
204
|
-
default:
|
|
205
|
-
return expression;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
class LuSQLParser {
|
|
209
|
-
tokens;
|
|
210
|
-
parameters;
|
|
211
|
-
position = 0;
|
|
212
|
-
constructor(source, parameters) {
|
|
213
|
-
this.tokens = tokenizeLuSQL(source);
|
|
214
|
-
this.parameters = parameters;
|
|
215
|
-
}
|
|
216
|
-
parse() {
|
|
217
|
-
this.expectKeyword("SELECT");
|
|
218
|
-
const items = [];
|
|
219
|
-
do {
|
|
220
|
-
items.push(this.parseSelectItem());
|
|
221
|
-
} while (this.takeSymbol(","));
|
|
222
|
-
this.expectKeyword("FROM");
|
|
223
|
-
const table = this.parseIdentifier();
|
|
224
|
-
const alias = this.parseOptionalTableAlias();
|
|
225
|
-
const join = this.parseOptionalJoin();
|
|
226
|
-
const predicate = this.takeKeyword("WHERE") ? this.parseExpression(0) : void 0;
|
|
227
|
-
let groupBy;
|
|
228
|
-
if (this.takeKeyword("GROUP")) {
|
|
229
|
-
this.expectKeyword("BY");
|
|
230
|
-
groupBy = this.parseIdentifier();
|
|
231
|
-
if (this.takeSymbol(","))
|
|
232
|
-
throw new Error("LuSQL currently supports one GROUP BY column");
|
|
233
|
-
}
|
|
234
|
-
let orderBy;
|
|
235
|
-
if (this.takeKeyword("ORDER")) {
|
|
236
|
-
this.expectKeyword("BY");
|
|
237
|
-
const sortColumn = this.parseIdentifier();
|
|
238
|
-
const direction = this.takeKeyword("DESC") ? "descending" : (this.takeKeyword("ASC"), "ascending");
|
|
239
|
-
let nulls;
|
|
240
|
-
if (this.takeKeyword("NULLS")) {
|
|
241
|
-
nulls = this.takeKeyword("FIRST") ? "first" : this.expectKeyword("LAST") && "last";
|
|
242
|
-
}
|
|
243
|
-
orderBy = { column: sortColumn, direction, ...nulls ? { nulls } : {} };
|
|
244
|
-
if (this.takeSymbol(","))
|
|
245
|
-
throw new Error("LuSQL currently supports one ORDER BY column");
|
|
246
|
-
}
|
|
247
|
-
let limit;
|
|
248
|
-
if (this.takeKeyword("LIMIT")) {
|
|
249
|
-
const token = this.take();
|
|
250
|
-
if ((token == null ? void 0 : token.kind) !== "number" || !/^\d+$/.test(token.value)) {
|
|
251
|
-
throw new Error("LuSQL LIMIT requires a nonnegative integer");
|
|
252
|
-
}
|
|
253
|
-
limit = Number(token.value);
|
|
254
|
-
if (!Number.isSafeInteger(limit) || limit > 4294967295) {
|
|
255
|
-
throw new Error("LuSQL LIMIT must fit an unsigned 32-bit row count");
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
this.takeSymbol(";");
|
|
259
|
-
if (this.peek())
|
|
260
|
-
throw new Error(`LuSQL does not support unexpected token "${this.peek().value}"`);
|
|
261
|
-
return {
|
|
262
|
-
items,
|
|
263
|
-
table,
|
|
264
|
-
...alias ? { alias } : {},
|
|
265
|
-
...join ? { join } : {},
|
|
266
|
-
...predicate ? { predicate } : {},
|
|
267
|
-
...groupBy ? { groupBy } : {},
|
|
268
|
-
...orderBy ? { orderBy } : {},
|
|
269
|
-
...limit !== void 0 ? { limit } : {}
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
parseSelectItem() {
|
|
273
|
-
var _a;
|
|
274
|
-
if (this.takeSymbol("*"))
|
|
275
|
-
return { star: true };
|
|
276
|
-
const token = this.peek();
|
|
277
|
-
if ((token == null ? void 0 : token.kind) === "identifier" && /^(COUNT|SUM|MIN|MAX|AVG|MEAN)$/i.test(token.value) && ((_a = this.tokens[this.position + 1]) == null ? void 0 : _a.value) === "(") {
|
|
278
|
-
this.take();
|
|
279
|
-
this.expectSymbol("(");
|
|
280
|
-
const aggregate = token.value.toLowerCase();
|
|
281
|
-
const aggregateColumn = this.takeSymbol("*") ? void 0 : this.parseIdentifier();
|
|
282
|
-
this.expectSymbol(")");
|
|
283
|
-
if (!aggregateColumn && aggregate !== "count") {
|
|
284
|
-
throw new Error("LuSQL only permits COUNT(*) as a wildcard aggregation");
|
|
285
|
-
}
|
|
286
|
-
if (aggregateColumn && aggregate === "count") {
|
|
287
|
-
throw new Error("LuSQL currently supports COUNT(*) but not nullable COUNT(column)");
|
|
288
|
-
}
|
|
289
|
-
return {
|
|
290
|
-
aggregate: aggregate === "avg" ? "mean" : aggregate,
|
|
291
|
-
...aggregateColumn ? { aggregateColumn } : {},
|
|
292
|
-
...this.takeKeyword("AS") ? { alias: this.parseIdentifier() } : {}
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
const expression = this.parseExpression(0);
|
|
296
|
-
return {
|
|
297
|
-
...expression ? { expression } : {},
|
|
298
|
-
...this.takeKeyword("AS") ? { alias: this.parseIdentifier() } : {}
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
parseOptionalJoin() {
|
|
302
|
-
let type = "inner";
|
|
303
|
-
if (this.takeKeyword("LEFT")) {
|
|
304
|
-
this.takeKeyword("OUTER");
|
|
305
|
-
type = "left";
|
|
306
|
-
} else if (this.takeKeyword("SEMI")) {
|
|
307
|
-
type = "semi";
|
|
308
|
-
} else if (this.takeKeyword("ANTI")) {
|
|
309
|
-
type = "anti";
|
|
310
|
-
} else {
|
|
311
|
-
this.takeKeyword("INNER");
|
|
312
|
-
}
|
|
313
|
-
if (!this.takeKeyword("JOIN")) {
|
|
314
|
-
if (type !== "inner")
|
|
315
|
-
throw new Error("LuSQL join modifier must be followed by JOIN");
|
|
316
|
-
return void 0;
|
|
317
|
-
}
|
|
318
|
-
const table = this.parseIdentifier();
|
|
319
|
-
const alias = this.parseOptionalTableAlias();
|
|
320
|
-
this.expectKeyword("ON");
|
|
321
|
-
const left = this.parseIdentifier();
|
|
322
|
-
this.expectSymbol("=");
|
|
323
|
-
const right = this.parseIdentifier();
|
|
324
|
-
return { type, table, ...alias ? { alias } : {}, left, right };
|
|
325
|
-
}
|
|
326
|
-
parseExpression(depth, minimumPrecedence = 0) {
|
|
327
|
-
if (depth > MAXIMUM_EXPRESSION_DEPTH)
|
|
328
|
-
throw new Error("LuSQL expression nesting exceeds its safe limit");
|
|
329
|
-
let expression = this.parseUnary(depth + 1);
|
|
330
|
-
while (true) {
|
|
331
|
-
if (minimumPrecedence <= 3 && this.takeKeyword("IS")) {
|
|
332
|
-
const negated = this.takeKeyword("NOT");
|
|
333
|
-
this.expectKeyword("NULL");
|
|
334
|
-
expression = {
|
|
335
|
-
kind: "unary",
|
|
336
|
-
operator: negated ? "is-valid" : "is-null",
|
|
337
|
-
operand: expression
|
|
338
|
-
};
|
|
339
|
-
continue;
|
|
340
|
-
}
|
|
341
|
-
const token = this.peek();
|
|
342
|
-
const operation = token ? getLuSQLBinaryOperator(token.value) : void 0;
|
|
343
|
-
if (!operation || operation.precedence < minimumPrecedence)
|
|
344
|
-
break;
|
|
345
|
-
this.take();
|
|
346
|
-
expression = {
|
|
347
|
-
kind: "binary",
|
|
348
|
-
operator: operation.operator,
|
|
349
|
-
left: expression,
|
|
350
|
-
right: this.parseExpression(depth + 1, operation.precedence + 1)
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
return expression;
|
|
354
|
-
}
|
|
355
|
-
parseUnary(depth) {
|
|
356
|
-
if (this.takeKeyword("NOT")) {
|
|
357
|
-
return { kind: "unary", operator: "not", operand: this.parseExpression(depth, 3) };
|
|
358
|
-
}
|
|
359
|
-
if (this.takeSymbol("-")) {
|
|
360
|
-
return { kind: "unary", operator: "negate", operand: this.parseUnary(depth + 1) };
|
|
361
|
-
}
|
|
362
|
-
if (this.takeSymbol("(")) {
|
|
363
|
-
const expression = this.parseExpression(depth + 1);
|
|
364
|
-
this.expectSymbol(")");
|
|
365
|
-
return expression;
|
|
366
|
-
}
|
|
367
|
-
const token = this.take();
|
|
368
|
-
if (!token)
|
|
369
|
-
throw new Error("LuSQL expected an expression");
|
|
370
|
-
if (token.kind === "number") {
|
|
371
|
-
const value = Number(token.value);
|
|
372
|
-
if (!Number.isFinite(value))
|
|
373
|
-
throw new Error("LuSQL numeric literals must be finite");
|
|
374
|
-
return (0, import_gpu_expression.literal)(value).node;
|
|
375
|
-
}
|
|
376
|
-
if (token.kind === "parameter") {
|
|
377
|
-
if (!Object.hasOwn(this.parameters, token.value)) {
|
|
378
|
-
throw new Error(`LuSQL parameter ":${token.value}" requires an explicit default`);
|
|
379
|
-
}
|
|
380
|
-
return (0, import_gpu_expression.parameter)(token.value, this.parameters[token.value]).node;
|
|
381
|
-
}
|
|
382
|
-
if (token.kind === "identifier") {
|
|
383
|
-
if (/^NULL$/i.test(token.value))
|
|
384
|
-
return (0, import_gpu_expression.literal)(null).node;
|
|
385
|
-
if (/^TRUE$/i.test(token.value))
|
|
386
|
-
return (0, import_gpu_expression.literal)(true).node;
|
|
387
|
-
if (/^FALSE$/i.test(token.value))
|
|
388
|
-
return (0, import_gpu_expression.literal)(false).node;
|
|
389
|
-
return (0, import_gpu_expression.column)(token.value).node;
|
|
390
|
-
}
|
|
391
|
-
throw new Error(`LuSQL does not support expression token "${token.value}"`);
|
|
392
|
-
}
|
|
393
|
-
parseOptionalTableAlias() {
|
|
394
|
-
if (this.takeKeyword("AS"))
|
|
395
|
-
return this.parseIdentifier();
|
|
396
|
-
const token = this.peek();
|
|
397
|
-
return (token == null ? void 0 : token.kind) === "identifier" && !/^(WHERE|GROUP|ORDER|LIMIT|JOIN|INNER|LEFT|OUTER|SEMI|ANTI|ON)$/i.test(token.value) ? this.parseIdentifier() : void 0;
|
|
398
|
-
}
|
|
399
|
-
parseIdentifier() {
|
|
400
|
-
const token = this.take();
|
|
401
|
-
if ((token == null ? void 0 : token.kind) !== "identifier")
|
|
402
|
-
throw new Error("LuSQL expected a table or column identifier");
|
|
403
|
-
return token.value;
|
|
404
|
-
}
|
|
405
|
-
expectKeyword(keyword) {
|
|
406
|
-
if (!this.takeKeyword(keyword))
|
|
407
|
-
throw new Error(`LuSQL expected ${keyword}`);
|
|
408
|
-
return true;
|
|
409
|
-
}
|
|
410
|
-
takeKeyword(keyword) {
|
|
411
|
-
const token = this.peek();
|
|
412
|
-
if ((token == null ? void 0 : token.kind) !== "identifier" || token.value.toUpperCase() !== keyword)
|
|
413
|
-
return false;
|
|
414
|
-
this.position++;
|
|
415
|
-
return true;
|
|
416
|
-
}
|
|
417
|
-
expectSymbol(symbol) {
|
|
418
|
-
if (!this.takeSymbol(symbol))
|
|
419
|
-
throw new Error(`LuSQL expected "${symbol}"`);
|
|
420
|
-
}
|
|
421
|
-
takeSymbol(symbol) {
|
|
422
|
-
const token = this.peek();
|
|
423
|
-
if ((token == null ? void 0 : token.kind) !== "symbol" || token.value !== symbol)
|
|
424
|
-
return false;
|
|
425
|
-
this.position++;
|
|
426
|
-
return true;
|
|
427
|
-
}
|
|
428
|
-
take() {
|
|
429
|
-
const token = this.tokens[this.position];
|
|
430
|
-
if (token)
|
|
431
|
-
this.position++;
|
|
432
|
-
return token;
|
|
433
|
-
}
|
|
434
|
-
peek() {
|
|
435
|
-
return this.tokens[this.position];
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
function tokenizeLuSQL(source) {
|
|
439
|
-
if (typeof source !== "string" || source.length === 0 || source.length > MAXIMUM_SQL_LENGTH) {
|
|
440
|
-
throw new Error("LuSQL requires a nonempty, safely bounded SELECT statement");
|
|
441
|
-
}
|
|
442
|
-
const expression = /\s+|(?:--[^\n\r]*)|(?::([A-Za-z_][A-Za-z0-9_]*))|([A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)?)|(\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)|(<=|>=|<>|!=|[(),;*+\-/=<>])/gy;
|
|
443
|
-
const tokens = [];
|
|
444
|
-
let cursor = 0;
|
|
445
|
-
while (cursor < source.length) {
|
|
446
|
-
expression.lastIndex = cursor;
|
|
447
|
-
const match = expression.exec(source);
|
|
448
|
-
if (!match)
|
|
449
|
-
throw new Error(`LuSQL contains an unsupported token at character ${cursor}`);
|
|
450
|
-
cursor = expression.lastIndex;
|
|
451
|
-
if (match[1])
|
|
452
|
-
tokens.push({ kind: "parameter", value: match[1] });
|
|
453
|
-
else if (match[2])
|
|
454
|
-
tokens.push({ kind: "identifier", value: match[2] });
|
|
455
|
-
else if (match[3])
|
|
456
|
-
tokens.push({ kind: "number", value: match[3] });
|
|
457
|
-
else if (match[4])
|
|
458
|
-
tokens.push({ kind: "symbol", value: match[4] });
|
|
459
|
-
if (tokens.length > MAXIMUM_SQL_TOKENS)
|
|
460
|
-
throw new Error("LuSQL statement exceeds its safe token limit");
|
|
461
|
-
}
|
|
462
|
-
return tokens;
|
|
463
|
-
}
|
|
464
|
-
function getLuSQLBinaryOperator(value) {
|
|
465
|
-
switch (value.toUpperCase()) {
|
|
466
|
-
case "OR":
|
|
467
|
-
return { operator: "or", precedence: 1 };
|
|
468
|
-
case "AND":
|
|
469
|
-
return { operator: "and", precedence: 2 };
|
|
470
|
-
case "=":
|
|
471
|
-
return { operator: "equal", precedence: 3 };
|
|
472
|
-
case "!=":
|
|
473
|
-
case "<>":
|
|
474
|
-
return { operator: "not-equal", precedence: 3 };
|
|
475
|
-
case ">":
|
|
476
|
-
return { operator: "greater-than", precedence: 3 };
|
|
477
|
-
case ">=":
|
|
478
|
-
return { operator: "greater-than-or-equal", precedence: 3 };
|
|
479
|
-
case "<":
|
|
480
|
-
return { operator: "less-than", precedence: 3 };
|
|
481
|
-
case "<=":
|
|
482
|
-
return { operator: "less-than-or-equal", precedence: 3 };
|
|
483
|
-
case "+":
|
|
484
|
-
return { operator: "add", precedence: 4 };
|
|
485
|
-
case "-":
|
|
486
|
-
return { operator: "subtract", precedence: 4 };
|
|
487
|
-
case "*":
|
|
488
|
-
return { operator: "multiply", precedence: 5 };
|
|
489
|
-
case "/":
|
|
490
|
-
return { operator: "divide", precedence: 5 };
|
|
491
|
-
default:
|
|
492
|
-
return void 0;
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
496
|
-
0 && (module.exports = {
|
|
497
|
-
LuSQLContext,
|
|
498
|
-
LuSQLQuery
|
|
499
|
-
});
|
package/dist/gpu-sql/lu-sql.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { GPUCommandGraph } from '@luma.gl/graph/gpu-core';
|
|
2
|
-
import { GPUDataFrame as LuDataFrame } from "../gpu-dataframe/gpu-data-frame.js";
|
|
3
|
-
import type { CompiledGPUDataFrameQuery as CompiledLuDataFrameQuery, GPUDataFrameQueryParameters as LuDataFrameQueryParameters } from "../gpu-dataframe/gpu-query-compiler.js";
|
|
4
|
-
/** Explicit GPU dataframe registrations; Arrow remains exclusively an adapter boundary. */
|
|
5
|
-
export type LuSQLTables = Readonly<Record<string, LuDataFrame>>;
|
|
6
|
-
/** Defaults for named SQL parameters such as `:minimumFare`; values remain caller-controlled. */
|
|
7
|
-
export type LuSQLQueryOptions = Readonly<{
|
|
8
|
-
parameters?: LuDataFrameQueryParameters;
|
|
9
|
-
}>;
|
|
10
|
-
type LuSQLCompiledPlan = Readonly<{
|
|
11
|
-
compile: (graph: GPUCommandGraph<LuDataFrameQueryParameters>) => CompiledLuDataFrameQuery;
|
|
12
|
-
}>;
|
|
13
|
-
/**
|
|
14
|
-
* Dependency-free SQL frontend over explicitly registered, already GPU-resident dataframes.
|
|
15
|
-
*
|
|
16
|
-
* Parsing and planning never upload data, submit work, or read GPU buffers. Arrow upload/output
|
|
17
|
-
* remain explicit `@luma.gl/graph/arrow` operations around the shared GPU table execution core.
|
|
18
|
-
*/
|
|
19
|
-
export declare class LuSQLContext {
|
|
20
|
-
private readonly tables;
|
|
21
|
-
constructor(tables: LuSQLTables);
|
|
22
|
-
/** Parses and validates one immutable SELECT plan without touching registered GPU sources. */
|
|
23
|
-
query(source: string, options?: LuSQLQueryOptions): LuSQLQuery;
|
|
24
|
-
}
|
|
25
|
-
/** Immutable SQL plan lowered directly into existing reusable GPU dataframe command graphs. */
|
|
26
|
-
export declare class LuSQLQuery {
|
|
27
|
-
/** Original application-owned SQL text, retained solely for diagnostics and inspection. */
|
|
28
|
-
readonly sql: string;
|
|
29
|
-
private readonly plan;
|
|
30
|
-
/** @internal */
|
|
31
|
-
constructor(sql: string, plan: LuSQLCompiledPlan);
|
|
32
|
-
/** Compiles existing dataframe operations into the caller-owned GPU command graph. */
|
|
33
|
-
compile(graph: GPUCommandGraph<LuDataFrameQueryParameters>): CompiledLuDataFrameQuery;
|
|
34
|
-
}
|
|
35
|
-
export {};
|
|
36
|
-
//# sourceMappingURL=lu-sql.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lu-sql.d.ts","sourceRoot":"","sources":["../../src/gpu-sql/lu-sql.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAC,YAAY,IAAI,WAAW,EAAC,2CAAwC;AAU5E,OAAO,KAAK,EACV,yBAAyB,IAAI,wBAAwB,EACrD,2BAA2B,IAAI,0BAA0B,EAC1D,+CAA4C;AAM7C,2FAA2F;AAC3F,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAEhE,iGAAiG;AACjG,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IAAC,UAAU,CAAC,EAAE,0BAA0B,CAAA;CAAC,CAAC,CAAC;AA+BpF,KAAK,iBAAiB,GAAG,QAAQ,CAAC;IAChC,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,0BAA0B,CAAC,KAAK,wBAAwB,CAAC;CAC3F,CAAC,CAAC;AA2BH;;;;;GAKG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;gBAEnD,MAAM,EAAE,WAAW;IAc/B,8FAA8F;IAC9F,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,UAAU;CAKnE;AAED,+FAA+F;AAC/F,qBAAa,UAAU;IACrB,2FAA2F;IAC3F,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAoB;IAEzC,gBAAgB;gBACJ,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB;IAMhD,sFAAsF;IACtF,OAAO,CAAC,KAAK,EAAE,eAAe,CAAC,0BAA0B,CAAC,GAAG,wBAAwB;CAGtF"}
|