@luma.gl/graph 10.0.0-alpha.7 → 10.0.0-alpha.9

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.
Files changed (193) hide show
  1. package/dist/dist.dev.js +5096 -7269
  2. package/dist/dist.min.js +270 -83
  3. package/dist/experimental/index.cjs.map +2 -2
  4. package/dist/experimental/simulation/index.cjs.map +2 -2
  5. package/dist/gpu-core/compiled-gpu-graph.cjs +99 -14
  6. package/dist/gpu-core/compiled-gpu-graph.d.ts +26 -4
  7. package/dist/gpu-core/compiled-gpu-graph.d.ts.map +1 -1
  8. package/dist/gpu-core/compiled-gpu-graph.js +101 -13
  9. package/dist/gpu-core/compiled-gpu-graph.js.map +1 -1
  10. package/dist/gpu-core/gpu-command-graph-compiler.cjs +35 -3
  11. package/dist/gpu-core/gpu-command-graph-compiler.js +40 -4
  12. package/dist/gpu-core/gpu-command-graph-compiler.js.map +1 -1
  13. package/dist/gpu-core/gpu-command-graph-types.d.ts +2 -0
  14. package/dist/gpu-core/gpu-command-graph-types.d.ts.map +1 -1
  15. package/dist/gpu-core/gpu-compaction-operation.cjs +56 -0
  16. package/dist/gpu-core/gpu-compaction-operation.d.ts +20 -0
  17. package/dist/gpu-core/gpu-compaction-operation.d.ts.map +1 -0
  18. package/dist/gpu-core/gpu-compaction-operation.js +36 -0
  19. package/dist/gpu-core/gpu-compaction-operation.js.map +1 -0
  20. package/dist/gpu-core/gpu-compaction.cjs +35 -3
  21. package/dist/gpu-core/gpu-compaction.d.ts.map +1 -1
  22. package/dist/gpu-core/gpu-compaction.js +38 -3
  23. package/dist/gpu-core/gpu-compaction.js.map +1 -1
  24. package/dist/gpu-core/gpu-expression-operation.cjs +18 -2
  25. package/dist/gpu-core/gpu-expression-operation.d.ts +2 -2
  26. package/dist/gpu-core/gpu-expression-operation.d.ts.map +1 -1
  27. package/dist/gpu-core/gpu-expression-operation.js +20 -1
  28. package/dist/gpu-core/gpu-expression-operation.js.map +1 -1
  29. package/dist/gpu-core/gpu-expression-plan.cjs +140 -29
  30. package/dist/gpu-core/gpu-expression-plan.d.ts +26 -5
  31. package/dist/gpu-core/gpu-expression-plan.d.ts.map +1 -1
  32. package/dist/gpu-core/gpu-expression-plan.js +168 -34
  33. package/dist/gpu-core/gpu-expression-plan.js.map +1 -1
  34. package/dist/gpu-core/gpu-graph-compiler.cjs +100 -11
  35. package/dist/gpu-core/gpu-graph-compiler.d.ts +7 -3
  36. package/dist/gpu-core/gpu-graph-compiler.d.ts.map +1 -1
  37. package/dist/gpu-core/gpu-graph-compiler.js +109 -9
  38. package/dist/gpu-core/gpu-graph-compiler.js.map +1 -1
  39. package/dist/gpu-core/gpu-graph-declarations.cjs +120 -0
  40. package/dist/gpu-core/gpu-graph-declarations.d.ts +4 -0
  41. package/dist/gpu-core/gpu-graph-declarations.d.ts.map +1 -0
  42. package/dist/gpu-core/gpu-graph-declarations.js +110 -0
  43. package/dist/gpu-core/gpu-graph-declarations.js.map +1 -0
  44. package/dist/gpu-core/gpu-graph-validation.cjs +33 -2
  45. package/dist/gpu-core/gpu-graph-validation.d.ts.map +1 -1
  46. package/dist/gpu-core/gpu-graph-validation.js +32 -0
  47. package/dist/gpu-core/gpu-graph-validation.js.map +1 -1
  48. package/dist/gpu-core/gpu-graph-value.cjs +38 -3
  49. package/dist/gpu-core/gpu-graph-value.d.ts +50 -4
  50. package/dist/gpu-core/gpu-graph-value.d.ts.map +1 -1
  51. package/dist/gpu-core/gpu-graph-value.js +39 -1
  52. package/dist/gpu-core/gpu-graph-value.js.map +1 -1
  53. package/dist/gpu-core/gpu-graph.cjs +65 -0
  54. package/dist/gpu-core/gpu-graph.d.ts +15 -2
  55. package/dist/gpu-core/gpu-graph.d.ts.map +1 -1
  56. package/dist/gpu-core/gpu-graph.js +70 -0
  57. package/dist/gpu-core/gpu-graph.js.map +1 -1
  58. package/dist/gpu-core/gpu-operation-contract.cjs +5 -0
  59. package/dist/gpu-core/gpu-operation-contract.d.ts +10 -0
  60. package/dist/gpu-core/gpu-operation-contract.d.ts.map +1 -1
  61. package/dist/gpu-core/gpu-operation-contract.js +6 -1
  62. package/dist/gpu-core/gpu-operation-contract.js.map +1 -1
  63. package/dist/gpu-core/gpu-scan.cjs +11 -2
  64. package/dist/gpu-core/gpu-scan.d.ts.map +1 -1
  65. package/dist/gpu-core/gpu-scan.js +11 -2
  66. package/dist/gpu-core/gpu-scan.js.map +1 -1
  67. package/dist/gpu-core/gpu-texture-copy.cjs +53 -0
  68. package/dist/gpu-core/gpu-texture-copy.d.ts +7 -0
  69. package/dist/gpu-core/gpu-texture-copy.d.ts.map +1 -0
  70. package/dist/gpu-core/gpu-texture-copy.js +39 -0
  71. package/dist/gpu-core/gpu-texture-copy.js.map +1 -0
  72. package/dist/gpu-core/gpu-texture-plan.cjs +181 -0
  73. package/dist/gpu-core/gpu-texture-plan.d.ts +32 -0
  74. package/dist/gpu-core/gpu-texture-plan.d.ts.map +1 -0
  75. package/dist/gpu-core/gpu-texture-plan.js +215 -0
  76. package/dist/gpu-core/gpu-texture-plan.js.map +1 -0
  77. package/dist/gpu-core/gpu-transfer-lowering.cjs +109 -0
  78. package/dist/gpu-core/gpu-transfer-lowering.d.ts +9 -0
  79. package/dist/gpu-core/gpu-transfer-lowering.d.ts.map +1 -0
  80. package/dist/gpu-core/gpu-transfer-lowering.js +88 -0
  81. package/dist/gpu-core/gpu-transfer-lowering.js.map +1 -0
  82. package/dist/gpu-core/gpu-transfer-operation.cjs +100 -0
  83. package/dist/gpu-core/gpu-transfer-operation.d.ts +38 -0
  84. package/dist/gpu-core/gpu-transfer-operation.d.ts.map +1 -0
  85. package/dist/gpu-core/gpu-transfer-operation.js +84 -0
  86. package/dist/gpu-core/gpu-transfer-operation.js.map +1 -0
  87. package/dist/gpu-core/index.cjs +13 -0
  88. package/dist/gpu-core/index.cjs.map +3 -3
  89. package/dist/gpu-core/index.d.ts +11 -1
  90. package/dist/gpu-core/index.d.ts.map +1 -1
  91. package/dist/gpu-core/index.js +4 -1
  92. package/dist/gpu-core/index.js.map +1 -1
  93. package/dist/gpu-dggs/benchmarks.cjs.map +2 -2
  94. package/dist/gpu-graph/index.cjs +8 -0
  95. package/dist/gpu-graph/index.cjs.map +3 -3
  96. package/dist/gpu-graph/index.d.ts +5 -0
  97. package/dist/gpu-graph/index.d.ts.map +1 -1
  98. package/dist/gpu-graph/index.js +2 -0
  99. package/dist/gpu-graph/index.js.map +1 -1
  100. package/dist/gpu-graph-algorithms/benchmarks.cjs.map +3 -3
  101. package/dist/gpu-graph-algorithms/index.cjs.map +2 -2
  102. package/dist/gpu-physics/gpu-rigid-body-world.cjs +56 -17
  103. package/dist/gpu-physics/gpu-rigid-body-world.d.ts +1 -1
  104. package/dist/gpu-physics/gpu-rigid-body-world.d.ts.map +1 -1
  105. package/dist/gpu-physics/gpu-rigid-body-world.js +42 -2
  106. package/dist/gpu-physics/gpu-rigid-body-world.js.map +1 -1
  107. package/dist/gpu-physics/index.cjs.map +2 -2
  108. package/dist/gpu-physics/rigid-body-joints.cjs +6 -1
  109. package/dist/gpu-physics/rigid-body-joints.d.ts.map +1 -1
  110. package/dist/gpu-physics/rigid-body-joints.js +9 -1
  111. package/dist/gpu-physics/rigid-body-joints.js.map +1 -1
  112. package/dist/gpu-physics/rigid-body-parallel-shaders.cjs +4 -2
  113. package/dist/gpu-physics/rigid-body-parallel-shaders.d.ts.map +1 -1
  114. package/dist/gpu-physics/rigid-body-parallel-shaders.js +4 -2
  115. package/dist/gpu-physics/rigid-body-parallel-shaders.js.map +1 -1
  116. package/dist/gpu-physics/rigid-body-shaders.cjs +1 -0
  117. package/dist/gpu-physics/rigid-body-shaders.d.ts.map +1 -1
  118. package/dist/gpu-physics/rigid-body-shaders.js +1 -0
  119. package/dist/gpu-physics/rigid-body-shaders.js.map +1 -1
  120. package/dist/gpu-pointcloud/index.cjs.map +1 -1
  121. package/dist/gpu-simple-graph/compiled-gpu-expression-graph.cjs +54 -7
  122. package/dist/gpu-simple-graph/compiled-gpu-expression-graph.d.ts +11 -4
  123. package/dist/gpu-simple-graph/compiled-gpu-expression-graph.d.ts.map +1 -1
  124. package/dist/gpu-simple-graph/compiled-gpu-expression-graph.js +56 -4
  125. package/dist/gpu-simple-graph/compiled-gpu-expression-graph.js.map +1 -1
  126. package/dist/gpu-simple-graph/gpu-simple-graph.cjs +16 -0
  127. package/dist/gpu-simple-graph/gpu-simple-graph.d.ts +11 -4
  128. package/dist/gpu-simple-graph/gpu-simple-graph.d.ts.map +1 -1
  129. package/dist/gpu-simple-graph/gpu-simple-graph.js +18 -0
  130. package/dist/gpu-simple-graph/gpu-simple-graph.js.map +1 -1
  131. package/dist/gpu-simple-graph/gpu-transfer-execution.cjs +82 -0
  132. package/dist/gpu-simple-graph/gpu-transfer-execution.d.ts +7 -0
  133. package/dist/gpu-simple-graph/gpu-transfer-execution.d.ts.map +1 -0
  134. package/dist/gpu-simple-graph/gpu-transfer-execution.js +64 -0
  135. package/dist/gpu-simple-graph/gpu-transfer-execution.js.map +1 -0
  136. package/dist/gpu-simple-graph/index.cjs +3 -0
  137. package/dist/gpu-simple-graph/index.cjs.map +3 -3
  138. package/dist/gpu-simple-graph/index.d.ts +3 -0
  139. package/dist/gpu-simple-graph/index.d.ts.map +1 -1
  140. package/dist/gpu-simple-graph/index.js +1 -0
  141. package/dist/gpu-simple-graph/index.js.map +1 -1
  142. package/dist/gpu-sql/{lu-sql.cjs → gpu-sql.cjs} +68 -68
  143. package/dist/gpu-sql/{lu-sql.d.ts → gpu-sql.d.ts} +14 -14
  144. package/dist/gpu-sql/gpu-sql.d.ts.map +1 -0
  145. package/dist/gpu-sql/{lu-sql.js → gpu-sql.js} +68 -68
  146. package/dist/gpu-sql/gpu-sql.js.map +1 -0
  147. package/dist/gpu-sql/index.cjs +5 -5
  148. package/dist/gpu-sql/index.cjs.map +2 -2
  149. package/dist/gpu-sql/index.d.ts +2 -2
  150. package/dist/gpu-sql/index.d.ts.map +1 -1
  151. package/dist/gpu-sql/index.js +1 -1
  152. package/dist/gpu-sql/index.js.map +1 -1
  153. package/dist/index.cjs +13 -0
  154. package/dist/index.cjs.map +3 -3
  155. package/dist/index.d.ts +11 -1
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.js +4 -1
  158. package/dist/index.js.map +1 -1
  159. package/package.json +6 -7
  160. package/src/gpu-core/compiled-gpu-graph.ts +118 -15
  161. package/src/gpu-core/gpu-command-graph-compiler.ts +38 -6
  162. package/src/gpu-core/gpu-command-graph-types.ts +2 -0
  163. package/src/gpu-core/gpu-compaction-operation.ts +49 -0
  164. package/src/gpu-core/gpu-compaction.ts +47 -3
  165. package/src/gpu-core/gpu-expression-operation.ts +23 -2
  166. package/src/gpu-core/gpu-expression-plan.ts +247 -44
  167. package/src/gpu-core/gpu-graph-compiler.ts +130 -11
  168. package/src/gpu-core/gpu-graph-declarations.ts +137 -0
  169. package/src/gpu-core/gpu-graph-validation.ts +32 -0
  170. package/src/gpu-core/gpu-graph-value.ts +88 -4
  171. package/src/gpu-core/gpu-graph.ts +104 -2
  172. package/src/gpu-core/gpu-operation-contract.ts +18 -0
  173. package/src/gpu-core/gpu-scan.ts +15 -2
  174. package/src/gpu-core/gpu-texture-copy.ts +51 -0
  175. package/src/gpu-core/gpu-texture-plan.ts +248 -0
  176. package/src/gpu-core/gpu-transfer-lowering.ts +102 -0
  177. package/src/gpu-core/gpu-transfer-operation.ts +110 -0
  178. package/src/gpu-core/index.ts +22 -1
  179. package/src/gpu-graph/index.ts +15 -0
  180. package/src/gpu-physics/gpu-rigid-body-world.ts +44 -3
  181. package/src/gpu-physics/rigid-body-joints.ts +11 -2
  182. package/src/gpu-physics/rigid-body-parallel-shaders.ts +4 -2
  183. package/src/gpu-physics/rigid-body-shaders.ts +1 -0
  184. package/src/gpu-project/README.md +4 -4
  185. package/src/gpu-simple-graph/compiled-gpu-expression-graph.ts +90 -8
  186. package/src/gpu-simple-graph/gpu-simple-graph.ts +56 -3
  187. package/src/gpu-simple-graph/gpu-transfer-execution.ts +73 -0
  188. package/src/gpu-simple-graph/index.ts +9 -0
  189. package/src/gpu-sql/{lu-sql.ts → gpu-sql.ts} +134 -125
  190. package/src/gpu-sql/index.ts +2 -2
  191. package/src/index.ts +29 -1
  192. package/dist/gpu-sql/lu-sql.d.ts.map +0 -1
  193. package/dist/gpu-sql/lu-sql.js.map +0 -1
@@ -4,19 +4,19 @@
4
4
  // SPDX-FileComment: Independently implemented for WebGPU; inspired by relational SQL semantics.
5
5
 
6
6
  import type {GPUCommandGraph} from '@luma.gl/graph/gpu-core';
7
- import {GPUDataFrame as LuDataFrame} from '../gpu-dataframe/gpu-data-frame';
8
- import {GPUDataFrameQuery as LuDataFrameQuery} from '../gpu-dataframe/gpu-data-frame-query';
7
+ import {GPUDataFrame} from '../gpu-dataframe/gpu-data-frame';
8
+ import {GPUDataFrameQuery} from '../gpu-dataframe/gpu-data-frame-query';
9
9
  import {
10
- GPUExpression as LuExpression,
10
+ GPUExpression,
11
11
  column,
12
12
  literal,
13
13
  parameter,
14
- type GPUExpressionNode as LuExpressionNode
14
+ type GPUExpressionNode
15
15
  } from '../gpu-dataframe/gpu-expression';
16
- import type {GPUDataFrameJoinType as LuDataFrameJoinType} from '../gpu-dataframe/gpu-join-query';
16
+ import type {GPUDataFrameJoinType} from '../gpu-dataframe/gpu-join-query';
17
17
  import type {
18
- CompiledGPUDataFrameQuery as CompiledLuDataFrameQuery,
19
- GPUDataFrameQueryParameters as LuDataFrameQueryParameters
18
+ CompiledGPUDataFrameQuery,
19
+ GPUDataFrameQueryParameters
20
20
  } from '../gpu-dataframe/gpu-query-compiler';
21
21
 
22
22
  const MAXIMUM_SQL_LENGTH = 65_536;
@@ -24,31 +24,34 @@ const MAXIMUM_SQL_TOKENS = 4_096;
24
24
  const MAXIMUM_EXPRESSION_DEPTH = 64;
25
25
 
26
26
  /** Explicit GPU dataframe registrations; Arrow remains exclusively an adapter boundary. */
27
- export type LuSQLTables = Readonly<Record<string, LuDataFrame>>;
27
+ export type GPUSQLTables = Readonly<Record<string, GPUDataFrame>>;
28
28
 
29
29
  /** Defaults for named SQL parameters such as `:minimumFare`; values remain caller-controlled. */
30
- export type LuSQLQueryOptions = Readonly<{parameters?: LuDataFrameQueryParameters}>;
30
+ export type GPUSQLQueryOptions = Readonly<{parameters?: GPUDataFrameQueryParameters}>;
31
31
 
32
- type LuSQLToken = Readonly<{kind: 'identifier' | 'number' | 'parameter' | 'symbol'; value: string}>;
33
- type LuSQLSelectItem = Readonly<{
34
- expression?: LuExpressionNode;
32
+ type GPUSQLToken = Readonly<{
33
+ kind: 'identifier' | 'number' | 'parameter' | 'symbol';
34
+ value: string;
35
+ }>;
36
+ type GPUSQLSelectItem = Readonly<{
37
+ expression?: GPUExpressionNode;
35
38
  aggregate?: 'count' | 'sum' | 'min' | 'max' | 'mean';
36
39
  aggregateColumn?: string;
37
40
  alias?: string;
38
41
  star?: boolean;
39
42
  }>;
40
- type LuSQLStatement = Readonly<{
41
- items: readonly LuSQLSelectItem[];
43
+ type GPUSQLStatement = Readonly<{
44
+ items: readonly GPUSQLSelectItem[];
42
45
  table: string;
43
46
  alias?: string;
44
47
  join?: Readonly<{
45
- type: LuDataFrameJoinType;
48
+ type: GPUDataFrameJoinType;
46
49
  table: string;
47
50
  alias?: string;
48
51
  left: string;
49
52
  right: string;
50
53
  }>;
51
- predicate?: LuExpressionNode;
54
+ predicate?: GPUExpressionNode;
52
55
  groupBy?: string;
53
56
  orderBy?: Readonly<{
54
57
  column: string;
@@ -58,33 +61,39 @@ type LuSQLStatement = Readonly<{
58
61
  limit?: number;
59
62
  }>;
60
63
 
61
- type LuSQLCompiledPlan = Readonly<{
62
- compile: (graph: GPUCommandGraph<LuDataFrameQueryParameters>) => CompiledLuDataFrameQuery;
64
+ type GPUSQLCompiledPlan = Readonly<{
65
+ compile: (graph: GPUCommandGraph<GPUDataFrameQueryParameters>) => CompiledGPUDataFrameQuery;
63
66
  }>;
64
67
 
65
- type LuSQLAggregationDefinitions = Record<
68
+ type GPUSQLAggregationDefinitions = Record<
66
69
  string,
67
70
  'count' | {sum: string} | {min: string} | {max: string} | {mean: string}
68
71
  >;
69
72
 
70
73
  /** Runtime-validated SQL names cross the strongly typed dataframe boundary exactly once. */
71
- type LuSQLDynamicQuery = LuSQLCompiledPlan & {
72
- predicates: readonly LuExpression<boolean, string>[];
73
- filter: (predicate: LuExpression<boolean, string>) => LuSQLDynamicQuery;
74
- select: (names: readonly string[]) => LuSQLDynamicQuery;
75
- withColumn: (name: string, expression: LuExpression<number | null, string>) => LuSQLDynamicQuery;
74
+ type GPUSQLDynamicQuery = GPUSQLCompiledPlan & {
75
+ predicates: readonly GPUExpression<boolean, string>[];
76
+ filter: (predicate: GPUExpression<boolean, string>) => GPUSQLDynamicQuery;
77
+ select: (names: readonly string[]) => GPUSQLDynamicQuery;
78
+ withColumn: (
79
+ name: string,
80
+ expression: GPUExpression<number | null, string>
81
+ ) => GPUSQLDynamicQuery;
76
82
  groupBy: (key: string) => {
77
- aggregate: (definitions: LuSQLAggregationDefinitions) => LuSQLCompiledPlan;
83
+ aggregate: (definitions: GPUSQLAggregationDefinitions) => GPUSQLCompiledPlan;
78
84
  };
79
- aggregate: (definitions: LuSQLAggregationDefinitions) => LuSQLCompiledPlan;
85
+ aggregate: (definitions: GPUSQLAggregationDefinitions) => GPUSQLCompiledPlan;
80
86
  sortByGlobal: (
81
87
  name: string,
82
88
  options: {direction: 'ascending' | 'descending'; nulls?: 'first' | 'last'}
83
- ) => LuSQLCompiledPlan & {topK: (limit: number) => LuSQLCompiledPlan};
84
- innerJoin: (right: LuDataFrame, options: {leftOn: string; rightOn: string}) => LuSQLCompiledPlan;
85
- leftJoin: (right: LuDataFrame, options: {leftOn: string; rightOn: string}) => LuSQLCompiledPlan;
86
- semiJoin: (right: LuDataFrame, options: {leftOn: string; rightOn: string}) => LuSQLCompiledPlan;
87
- antiJoin: (right: LuDataFrame, options: {leftOn: string; rightOn: string}) => LuSQLCompiledPlan;
89
+ ) => GPUSQLCompiledPlan & {topK: (limit: number) => GPUSQLCompiledPlan};
90
+ innerJoin: (
91
+ right: GPUDataFrame,
92
+ options: {leftOn: string; rightOn: string}
93
+ ) => GPUSQLCompiledPlan;
94
+ leftJoin: (right: GPUDataFrame, options: {leftOn: string; rightOn: string}) => GPUSQLCompiledPlan;
95
+ semiJoin: (right: GPUDataFrame, options: {leftOn: string; rightOn: string}) => GPUSQLCompiledPlan;
96
+ antiJoin: (right: GPUDataFrame, options: {leftOn: string; rightOn: string}) => GPUSQLCompiledPlan;
88
97
  };
89
98
 
90
99
  /**
@@ -93,17 +102,17 @@ type LuSQLDynamicQuery = LuSQLCompiledPlan & {
93
102
  * Parsing and planning never upload data, submit work, or read GPU buffers. Arrow upload/output
94
103
  * remain explicit `@luma.gl/graph/arrow` operations around the shared GPU table execution core.
95
104
  */
96
- export class LuSQLContext {
97
- private readonly tables: Readonly<Record<string, LuDataFrame>>;
105
+ export class GPUSQLContext {
106
+ private readonly tables: Readonly<Record<string, GPUDataFrame>>;
98
107
 
99
- constructor(tables: LuSQLTables) {
100
- const registered: Record<string, LuDataFrame> = {};
108
+ constructor(tables: GPUSQLTables) {
109
+ const registered: Record<string, GPUDataFrame> = {};
101
110
  for (const [name, table] of Object.entries(tables)) {
102
- if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(name) || !(table instanceof LuDataFrame)) {
103
- throw new Error('LuSQL requires valid names mapped to existing GPU dataframes');
111
+ if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(name) || !(table instanceof GPUDataFrame)) {
112
+ throw new Error('GPUSQL requires valid names mapped to existing GPU dataframes');
104
113
  }
105
114
  const canonical = name.toLowerCase();
106
- if (registered[canonical]) throw new Error(`LuSQL table "${name}" is already registered`);
115
+ if (registered[canonical]) throw new Error(`GPUSQL table "${name}" is already registered`);
107
116
  registered[canonical] = table;
108
117
  }
109
118
  this.tables = Object.freeze(registered);
@@ -111,56 +120,56 @@ export class LuSQLContext {
111
120
  }
112
121
 
113
122
  /** Parses and validates one immutable SELECT plan without touching registered GPU sources. */
114
- query(source: string, options: LuSQLQueryOptions = {}): LuSQLQuery {
115
- const parser = new LuSQLParser(source, options.parameters ?? {});
123
+ query(source: string, options: GPUSQLQueryOptions = {}): GPUSQLQuery {
124
+ const parser = new GPUSQLParser(source, options.parameters ?? {});
116
125
  const statement = parser.parse();
117
- return new LuSQLQuery(source, buildLuSQLPlan(this.tables, statement));
126
+ return new GPUSQLQuery(source, buildGPUSQLPlan(this.tables, statement));
118
127
  }
119
128
  }
120
129
 
121
130
  /** Immutable SQL plan lowered directly into existing reusable GPU dataframe command graphs. */
122
- export class LuSQLQuery {
131
+ export class GPUSQLQuery {
123
132
  /** Original application-owned SQL text, retained solely for diagnostics and inspection. */
124
133
  readonly sql: string;
125
- private readonly plan: LuSQLCompiledPlan;
134
+ private readonly plan: GPUSQLCompiledPlan;
126
135
 
127
136
  /** @internal */
128
- constructor(sql: string, plan: LuSQLCompiledPlan) {
137
+ constructor(sql: string, plan: GPUSQLCompiledPlan) {
129
138
  this.sql = sql;
130
139
  this.plan = plan;
131
140
  Object.freeze(this);
132
141
  }
133
142
 
134
143
  /** Compiles existing dataframe operations into the caller-owned GPU command graph. */
135
- compile(graph: GPUCommandGraph<LuDataFrameQueryParameters>): CompiledLuDataFrameQuery {
144
+ compile(graph: GPUCommandGraph<GPUDataFrameQueryParameters>): CompiledGPUDataFrameQuery {
136
145
  return this.plan.compile(graph);
137
146
  }
138
147
  }
139
148
 
140
- function buildLuSQLPlan(
141
- tables: Readonly<Record<string, LuDataFrame>>,
142
- statement: LuSQLStatement
143
- ): LuSQLCompiledPlan {
149
+ function buildGPUSQLPlan(
150
+ tables: Readonly<Record<string, GPUDataFrame>>,
151
+ statement: GPUSQLStatement
152
+ ): GPUSQLCompiledPlan {
144
153
  const frame = tables[statement.table.toLowerCase()];
145
- if (!frame) throw new Error(`LuSQL table "${statement.table}" is not registered`);
146
- let query = new LuDataFrameQuery(frame, [], frame.columnNames) as unknown as LuSQLDynamicQuery;
154
+ if (!frame) throw new Error(`GPUSQL table "${statement.table}" is not registered`);
155
+ let query = new GPUDataFrameQuery(frame, [], frame.columnNames) as unknown as GPUSQLDynamicQuery;
147
156
  const qualifier = statement.alias ?? statement.table;
148
- const resolve = (name: string): string => resolveLuSQLColumn(name, qualifier, frame.columnNames);
157
+ const resolve = (name: string): string => resolveGPUSQLColumn(name, qualifier, frame.columnNames);
149
158
  if (statement.predicate) {
150
159
  query = query.filter(
151
- new LuExpression<boolean, string>(resolveLuSQLExpression(statement.predicate, resolve))
160
+ new GPUExpression<boolean, string>(resolveGPUSQLExpression(statement.predicate, resolve))
152
161
  );
153
162
  }
154
163
 
155
164
  const aggregates = statement.items.filter(item => item.aggregate);
156
165
  if (aggregates.length > 0) {
157
166
  if (statement.join || statement.orderBy || statement.limit !== undefined) {
158
- throw new Error('LuSQL aggregate queries do not yet support joins, ordering, or limits');
167
+ throw new Error('GPUSQL aggregate queries do not yet support joins, ordering, or limits');
159
168
  }
160
- const definitions: LuSQLAggregationDefinitions = {};
169
+ const definitions: GPUSQLAggregationDefinitions = {};
161
170
  for (const item of aggregates) {
162
171
  const name = item.alias ?? `${item.aggregate}_${item.aggregateColumn ?? 'all'}`;
163
- if (definitions[name]) throw new Error(`LuSQL aggregate alias "${name}" is duplicated`);
172
+ if (definitions[name]) throw new Error(`GPUSQL aggregate alias "${name}" is duplicated`);
164
173
  definitions[name] =
165
174
  item.aggregate === 'count'
166
175
  ? 'count'
@@ -175,51 +184,51 @@ function buildLuSQLPlan(
175
184
  const nonAggregates = statement.items.filter(item => !item.aggregate);
176
185
  if (
177
186
  nonAggregates.length !== 1 ||
178
- resolveLuSQLProjectionName(nonAggregates[0], resolve) !== key
187
+ resolveGPUSQLProjectionName(nonAggregates[0], resolve) !== key
179
188
  ) {
180
- throw new Error('LuSQL grouped queries must select their single GROUP BY key');
189
+ throw new Error('GPUSQL grouped queries must select their single GROUP BY key');
181
190
  }
182
191
  return query.groupBy(key).aggregate(definitions);
183
192
  }
184
193
  if (aggregates.length !== statement.items.length) {
185
- throw new Error('LuSQL global aggregates cannot mix ordinary source columns');
194
+ throw new Error('GPUSQL global aggregates cannot mix ordinary source columns');
186
195
  }
187
196
  return query.aggregate(definitions);
188
197
  }
189
- if (statement.groupBy) throw new Error('LuSQL GROUP BY requires at least one aggregation');
198
+ if (statement.groupBy) throw new Error('GPUSQL GROUP BY requires at least one aggregation');
190
199
 
191
200
  const selected: string[] = [];
192
201
  for (const item of statement.items) {
193
202
  if (item.star) {
194
203
  if (statement.items.length !== 1)
195
- throw new Error('LuSQL SELECT * cannot include other columns');
204
+ throw new Error('GPUSQL SELECT * cannot include other columns');
196
205
  selected.push(...frame.columnNames);
197
206
  continue;
198
207
  }
199
- const node = resolveLuSQLExpression(item.expression!, resolve);
208
+ const node = resolveGPUSQLExpression(item.expression!, resolve);
200
209
  const name = item.alias ?? (node.kind === 'column' ? node.name : undefined);
201
- if (!name) throw new Error('LuSQL computed SELECT expressions require an explicit AS alias');
202
- if (selected.includes(name)) throw new Error(`LuSQL output column "${name}" is duplicated`);
210
+ if (!name) throw new Error('GPUSQL computed SELECT expressions require an explicit AS alias');
211
+ if (selected.includes(name)) throw new Error(`GPUSQL output column "${name}" is duplicated`);
203
212
  if (node.kind !== 'column' || node.name !== name) {
204
213
  if (frame.columnNames.includes(name)) {
205
- throw new Error(`LuSQL derived alias "${name}" conflicts with an existing source column`);
214
+ throw new Error(`GPUSQL derived alias "${name}" conflicts with an existing source column`);
206
215
  }
207
- query = query.withColumn(name, new LuExpression<number | null, string>(node));
216
+ query = query.withColumn(name, new GPUExpression<number | null, string>(node));
208
217
  }
209
218
  selected.push(name);
210
219
  }
211
220
 
212
221
  if (statement.join) {
213
222
  if (statement.orderBy || statement.limit !== undefined) {
214
- throw new Error('LuSQL joined results do not yet support ORDER BY or LIMIT');
223
+ throw new Error('GPUSQL joined results do not yet support ORDER BY or LIMIT');
215
224
  }
216
225
  const right = tables[statement.join.table.toLowerCase()];
217
- if (!right) throw new Error(`LuSQL table "${statement.join.table}" is not registered`);
226
+ if (!right) throw new Error(`GPUSQL table "${statement.join.table}" is not registered`);
218
227
  const leftKey = resolve(statement.join.left);
219
228
  const rightQualifier = statement.join.alias ?? statement.join.table;
220
- const rightKey = resolveLuSQLColumn(statement.join.right, rightQualifier, right.columnNames);
229
+ const rightKey = resolveGPUSQLColumn(statement.join.right, rightQualifier, right.columnNames);
221
230
  if (!selected.includes(leftKey)) {
222
- throw new Error('LuSQL joins require the left join key to remain selected');
231
+ throw new Error('GPUSQL joins require the left join key to remain selected');
223
232
  }
224
233
  query = query.select(selected);
225
234
  const options = {leftOn: leftKey, rightOn: rightKey};
@@ -240,7 +249,7 @@ function buildLuSQLPlan(
240
249
  selected.find(name => name.toLowerCase() === statement.orderBy!.column.toLowerCase()) ??
241
250
  resolve(statement.orderBy.column);
242
251
  if (!selected.includes(orderColumn)) {
243
- throw new Error('LuSQL ORDER BY requires the sort column in the SELECT projection');
252
+ throw new Error('GPUSQL ORDER BY requires the sort column in the SELECT projection');
244
253
  }
245
254
  const sort = query.select(selected).sortByGlobal(orderColumn, {
246
255
  direction: statement.orderBy.direction,
@@ -248,72 +257,72 @@ function buildLuSQLPlan(
248
257
  });
249
258
  return statement.limit === undefined ? sort : sort.topK(statement.limit);
250
259
  }
251
- if (statement.limit !== undefined) throw new Error('LuSQL LIMIT currently requires ORDER BY');
260
+ if (statement.limit !== undefined) throw new Error('GPUSQL LIMIT currently requires ORDER BY');
252
261
  if (query.predicates.length === 0) {
253
262
  const firstColumn = frame.columnNames[0];
254
- if (!firstColumn) throw new Error('LuSQL SELECT requires at least one GPU source column');
263
+ if (!firstColumn) throw new Error('GPUSQL SELECT requires at least one GPU source column');
255
264
  query = query.filter(column(firstColumn).isValid().or(column(firstColumn).isNull()));
256
265
  }
257
266
  return query.select(selected);
258
267
  }
259
268
 
260
- function resolveLuSQLProjectionName(
261
- item: LuSQLSelectItem,
269
+ function resolveGPUSQLProjectionName(
270
+ item: GPUSQLSelectItem,
262
271
  resolve: (name: string) => string
263
272
  ): string {
264
273
  if (item.expression?.kind !== 'column') {
265
- throw new Error('LuSQL grouped source expressions must reference the group key directly');
274
+ throw new Error('GPUSQL grouped source expressions must reference the group key directly');
266
275
  }
267
276
  return resolve(item.expression.name);
268
277
  }
269
278
 
270
- function resolveLuSQLColumn(name: string, qualifier: string, columns: readonly string[]): string {
279
+ function resolveGPUSQLColumn(name: string, qualifier: string, columns: readonly string[]): string {
271
280
  const parts = name.split('.');
272
281
  if (
273
282
  parts.length > 2 ||
274
283
  (parts.length === 2 && parts[0].toLowerCase() !== qualifier.toLowerCase())
275
284
  ) {
276
- throw new Error(`LuSQL column "${name}" has an unknown table qualifier`);
285
+ throw new Error(`GPUSQL column "${name}" has an unknown table qualifier`);
277
286
  }
278
287
  const requested = parts[parts.length - 1];
279
288
  const matches = columns.filter(candidate => candidate.toLowerCase() === requested.toLowerCase());
280
- if (matches.length !== 1) throw new Error(`LuSQL column "${name}" does not exist`);
289
+ if (matches.length !== 1) throw new Error(`GPUSQL column "${name}" does not exist`);
281
290
  return matches[0];
282
291
  }
283
292
 
284
- function resolveLuSQLExpression(
285
- expression: LuExpressionNode,
293
+ function resolveGPUSQLExpression(
294
+ expression: GPUExpressionNode,
286
295
  resolve: (name: string) => string
287
- ): LuExpressionNode {
296
+ ): GPUExpressionNode {
288
297
  switch (expression.kind) {
289
298
  case 'column':
290
299
  return {kind: 'column', name: resolve(expression.name)};
291
300
  case 'unary':
292
- return {...expression, operand: resolveLuSQLExpression(expression.operand, resolve)};
301
+ return {...expression, operand: resolveGPUSQLExpression(expression.operand, resolve)};
293
302
  case 'binary':
294
303
  return {
295
304
  ...expression,
296
- left: resolveLuSQLExpression(expression.left, resolve),
297
- right: resolveLuSQLExpression(expression.right, resolve)
305
+ left: resolveGPUSQLExpression(expression.left, resolve),
306
+ right: resolveGPUSQLExpression(expression.right, resolve)
298
307
  };
299
308
  default:
300
309
  return expression;
301
310
  }
302
311
  }
303
312
 
304
- class LuSQLParser {
305
- private readonly tokens: readonly LuSQLToken[];
306
- private readonly parameters: LuDataFrameQueryParameters;
313
+ class GPUSQLParser {
314
+ private readonly tokens: readonly GPUSQLToken[];
315
+ private readonly parameters: GPUDataFrameQueryParameters;
307
316
  private position = 0;
308
317
 
309
- constructor(source: string, parameters: LuDataFrameQueryParameters) {
310
- this.tokens = tokenizeLuSQL(source);
318
+ constructor(source: string, parameters: GPUDataFrameQueryParameters) {
319
+ this.tokens = tokenizeGPUSQL(source);
311
320
  this.parameters = parameters;
312
321
  }
313
322
 
314
- parse(): LuSQLStatement {
323
+ parse(): GPUSQLStatement {
315
324
  this.expectKeyword('SELECT');
316
- const items: LuSQLSelectItem[] = [];
325
+ const items: GPUSQLSelectItem[] = [];
317
326
  do {
318
327
  items.push(this.parseSelectItem());
319
328
  } while (this.takeSymbol(','));
@@ -326,9 +335,9 @@ class LuSQLParser {
326
335
  if (this.takeKeyword('GROUP')) {
327
336
  this.expectKeyword('BY');
328
337
  groupBy = this.parseIdentifier();
329
- if (this.takeSymbol(',')) throw new Error('LuSQL currently supports one GROUP BY column');
338
+ if (this.takeSymbol(',')) throw new Error('GPUSQL currently supports one GROUP BY column');
330
339
  }
331
- let orderBy: LuSQLStatement['orderBy'];
340
+ let orderBy: GPUSQLStatement['orderBy'];
332
341
  if (this.takeKeyword('ORDER')) {
333
342
  this.expectKeyword('BY');
334
343
  const sortColumn = this.parseIdentifier();
@@ -340,22 +349,22 @@ class LuSQLParser {
340
349
  nulls = this.takeKeyword('FIRST') ? 'first' : this.expectKeyword('LAST') && 'last';
341
350
  }
342
351
  orderBy = {column: sortColumn, direction, ...(nulls ? {nulls} : {})};
343
- if (this.takeSymbol(',')) throw new Error('LuSQL currently supports one ORDER BY column');
352
+ if (this.takeSymbol(',')) throw new Error('GPUSQL currently supports one ORDER BY column');
344
353
  }
345
354
  let limit: number | undefined;
346
355
  if (this.takeKeyword('LIMIT')) {
347
356
  const token = this.take();
348
357
  if (token?.kind !== 'number' || !/^\d+$/.test(token.value)) {
349
- throw new Error('LuSQL LIMIT requires a nonnegative integer');
358
+ throw new Error('GPUSQL LIMIT requires a nonnegative integer');
350
359
  }
351
360
  limit = Number(token.value);
352
361
  if (!Number.isSafeInteger(limit) || limit > 0xffffffff) {
353
- throw new Error('LuSQL LIMIT must fit an unsigned 32-bit row count');
362
+ throw new Error('GPUSQL LIMIT must fit an unsigned 32-bit row count');
354
363
  }
355
364
  }
356
365
  this.takeSymbol(';');
357
366
  if (this.peek())
358
- throw new Error(`LuSQL does not support unexpected token "${this.peek()!.value}"`);
367
+ throw new Error(`GPUSQL does not support unexpected token "${this.peek()!.value}"`);
359
368
  return {
360
369
  items,
361
370
  table,
@@ -368,7 +377,7 @@ class LuSQLParser {
368
377
  };
369
378
  }
370
379
 
371
- private parseSelectItem(): LuSQLSelectItem {
380
+ private parseSelectItem(): GPUSQLSelectItem {
372
381
  if (this.takeSymbol('*')) return {star: true};
373
382
  const token = this.peek();
374
383
  if (
@@ -382,13 +391,13 @@ class LuSQLParser {
382
391
  const aggregateColumn = this.takeSymbol('*') ? undefined : this.parseIdentifier();
383
392
  this.expectSymbol(')');
384
393
  if (!aggregateColumn && aggregate !== 'count') {
385
- throw new Error('LuSQL only permits COUNT(*) as a wildcard aggregation');
394
+ throw new Error('GPUSQL only permits COUNT(*) as a wildcard aggregation');
386
395
  }
387
396
  if (aggregateColumn && aggregate === 'count') {
388
- throw new Error('LuSQL currently supports COUNT(*) but not nullable COUNT(column)');
397
+ throw new Error('GPUSQL currently supports COUNT(*) but not nullable COUNT(column)');
389
398
  }
390
399
  return {
391
- aggregate: aggregate === 'avg' ? 'mean' : (aggregate as LuSQLSelectItem['aggregate']),
400
+ aggregate: aggregate === 'avg' ? 'mean' : (aggregate as GPUSQLSelectItem['aggregate']),
392
401
  ...(aggregateColumn ? {aggregateColumn} : {}),
393
402
  ...(this.takeKeyword('AS') ? {alias: this.parseIdentifier()} : {})
394
403
  };
@@ -400,8 +409,8 @@ class LuSQLParser {
400
409
  };
401
410
  }
402
411
 
403
- private parseOptionalJoin(): LuSQLStatement['join'] {
404
- let type: LuDataFrameJoinType = 'inner';
412
+ private parseOptionalJoin(): GPUSQLStatement['join'] {
413
+ let type: GPUDataFrameJoinType = 'inner';
405
414
  if (this.takeKeyword('LEFT')) {
406
415
  this.takeKeyword('OUTER');
407
416
  type = 'left';
@@ -413,7 +422,7 @@ class LuSQLParser {
413
422
  this.takeKeyword('INNER');
414
423
  }
415
424
  if (!this.takeKeyword('JOIN')) {
416
- if (type !== 'inner') throw new Error('LuSQL join modifier must be followed by JOIN');
425
+ if (type !== 'inner') throw new Error('GPUSQL join modifier must be followed by JOIN');
417
426
  return undefined;
418
427
  }
419
428
  const table = this.parseIdentifier();
@@ -425,9 +434,9 @@ class LuSQLParser {
425
434
  return {type, table, ...(alias ? {alias} : {}), left, right};
426
435
  }
427
436
 
428
- private parseExpression(depth: number, minimumPrecedence = 0): LuExpressionNode {
437
+ private parseExpression(depth: number, minimumPrecedence = 0): GPUExpressionNode {
429
438
  if (depth > MAXIMUM_EXPRESSION_DEPTH)
430
- throw new Error('LuSQL expression nesting exceeds its safe limit');
439
+ throw new Error('GPUSQL expression nesting exceeds its safe limit');
431
440
  let expression = this.parseUnary(depth + 1);
432
441
  while (true) {
433
442
  if (minimumPrecedence <= 3 && this.takeKeyword('IS')) {
@@ -441,7 +450,7 @@ class LuSQLParser {
441
450
  continue;
442
451
  }
443
452
  const token = this.peek();
444
- const operation = token ? getLuSQLBinaryOperator(token.value) : undefined;
453
+ const operation = token ? getGPUSQLBinaryOperator(token.value) : undefined;
445
454
  if (!operation || operation.precedence < minimumPrecedence) break;
446
455
  this.take();
447
456
  expression = {
@@ -454,7 +463,7 @@ class LuSQLParser {
454
463
  return expression;
455
464
  }
456
465
 
457
- private parseUnary(depth: number): LuExpressionNode {
466
+ private parseUnary(depth: number): GPUExpressionNode {
458
467
  if (this.takeKeyword('NOT')) {
459
468
  return {kind: 'unary', operator: 'not', operand: this.parseExpression(depth, 3)};
460
469
  }
@@ -467,15 +476,15 @@ class LuSQLParser {
467
476
  return expression;
468
477
  }
469
478
  const token = this.take();
470
- if (!token) throw new Error('LuSQL expected an expression');
479
+ if (!token) throw new Error('GPUSQL expected an expression');
471
480
  if (token.kind === 'number') {
472
481
  const value = Number(token.value);
473
- if (!Number.isFinite(value)) throw new Error('LuSQL numeric literals must be finite');
482
+ if (!Number.isFinite(value)) throw new Error('GPUSQL numeric literals must be finite');
474
483
  return literal(value).node;
475
484
  }
476
485
  if (token.kind === 'parameter') {
477
486
  if (!Object.hasOwn(this.parameters, token.value)) {
478
- throw new Error(`LuSQL parameter ":${token.value}" requires an explicit default`);
487
+ throw new Error(`GPUSQL parameter ":${token.value}" requires an explicit default`);
479
488
  }
480
489
  return parameter(token.value, this.parameters[token.value]).node;
481
490
  }
@@ -485,7 +494,7 @@ class LuSQLParser {
485
494
  if (/^FALSE$/i.test(token.value)) return literal(false).node;
486
495
  return column(token.value).node;
487
496
  }
488
- throw new Error(`LuSQL does not support expression token "${token.value}"`);
497
+ throw new Error(`GPUSQL does not support expression token "${token.value}"`);
489
498
  }
490
499
 
491
500
  private parseOptionalTableAlias(): string | undefined {
@@ -500,12 +509,12 @@ class LuSQLParser {
500
509
  private parseIdentifier(): string {
501
510
  const token = this.take();
502
511
  if (token?.kind !== 'identifier')
503
- throw new Error('LuSQL expected a table or column identifier');
512
+ throw new Error('GPUSQL expected a table or column identifier');
504
513
  return token.value;
505
514
  }
506
515
 
507
516
  private expectKeyword(keyword: string): true {
508
- if (!this.takeKeyword(keyword)) throw new Error(`LuSQL expected ${keyword}`);
517
+ if (!this.takeKeyword(keyword)) throw new Error(`GPUSQL expected ${keyword}`);
509
518
  return true;
510
519
  }
511
520
 
@@ -517,7 +526,7 @@ class LuSQLParser {
517
526
  }
518
527
 
519
528
  private expectSymbol(symbol: string): void {
520
- if (!this.takeSymbol(symbol)) throw new Error(`LuSQL expected "${symbol}"`);
529
+ if (!this.takeSymbol(symbol)) throw new Error(`GPUSQL expected "${symbol}"`);
521
530
  }
522
531
 
523
532
  private takeSymbol(symbol: string): boolean {
@@ -527,43 +536,43 @@ class LuSQLParser {
527
536
  return true;
528
537
  }
529
538
 
530
- private take(): LuSQLToken | undefined {
539
+ private take(): GPUSQLToken | undefined {
531
540
  const token = this.tokens[this.position];
532
541
  if (token) this.position++;
533
542
  return token;
534
543
  }
535
544
 
536
- private peek(): LuSQLToken | undefined {
545
+ private peek(): GPUSQLToken | undefined {
537
546
  return this.tokens[this.position];
538
547
  }
539
548
  }
540
549
 
541
- function tokenizeLuSQL(source: string): LuSQLToken[] {
550
+ function tokenizeGPUSQL(source: string): GPUSQLToken[] {
542
551
  if (typeof source !== 'string' || source.length === 0 || source.length > MAXIMUM_SQL_LENGTH) {
543
- throw new Error('LuSQL requires a nonempty, safely bounded SELECT statement');
552
+ throw new Error('GPUSQL requires a nonempty, safely bounded SELECT statement');
544
553
  }
545
554
  const expression =
546
555
  /\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;
547
- const tokens: LuSQLToken[] = [];
556
+ const tokens: GPUSQLToken[] = [];
548
557
  let cursor = 0;
549
558
  while (cursor < source.length) {
550
559
  expression.lastIndex = cursor;
551
560
  const match = expression.exec(source);
552
- if (!match) throw new Error(`LuSQL contains an unsupported token at character ${cursor}`);
561
+ if (!match) throw new Error(`GPUSQL contains an unsupported token at character ${cursor}`);
553
562
  cursor = expression.lastIndex;
554
563
  if (match[1]) tokens.push({kind: 'parameter', value: match[1]});
555
564
  else if (match[2]) tokens.push({kind: 'identifier', value: match[2]});
556
565
  else if (match[3]) tokens.push({kind: 'number', value: match[3]});
557
566
  else if (match[4]) tokens.push({kind: 'symbol', value: match[4]});
558
567
  if (tokens.length > MAXIMUM_SQL_TOKENS)
559
- throw new Error('LuSQL statement exceeds its safe token limit');
568
+ throw new Error('GPUSQL statement exceeds its safe token limit');
560
569
  }
561
570
  return tokens;
562
571
  }
563
572
 
564
- function getLuSQLBinaryOperator(value: string):
573
+ function getGPUSQLBinaryOperator(value: string):
565
574
  | Readonly<{
566
- operator: Extract<LuExpressionNode, {kind: 'binary'}>['operator'];
575
+ operator: Extract<GPUExpressionNode, {kind: 'binary'}>['operator'];
567
576
  precedence: number;
568
577
  }>
569
578
  | undefined {
@@ -2,5 +2,5 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
4
 
5
- export {LuSQLContext, LuSQLQuery} from './lu-sql';
6
- export type {LuSQLQueryOptions, LuSQLTables} from './lu-sql';
5
+ export {GPUSQLContext, GPUSQLQuery} from './gpu-sql';
6
+ export type {GPUSQLQueryOptions, GPUSQLTables} from './gpu-sql';
package/src/index.ts CHANGED
@@ -164,7 +164,7 @@ export type {
164
164
  GPUExpressionOperationProps,
165
165
  GPUExpressionAST
166
166
  } from './gpu-core/gpu-expression-operation';
167
- export {CompiledGPUGraph} from './gpu-core/compiled-gpu-graph';
167
+ export {CompiledGPUGraph, PreparedGPUGraphExecution} from './gpu-core/compiled-gpu-graph';
168
168
  export type {
169
169
  GPUGraphCompileOptions,
170
170
  GPUGraphRunBindings,
@@ -178,3 +178,31 @@ export type {
178
178
  GPUOperationVectorShape
179
179
  } from './gpu-core/gpu-operation-contract';
180
180
  export type {GPUOperation} from './gpu-core/gpu-operation';
181
+
182
+ export {gpuGraph} from './gpu-core/gpu-graph-value';
183
+ export type {
184
+ GPUGraphScalarDescriptor,
185
+ GPUGraphVectorDescriptor,
186
+ GPUGraphValueDescriptor,
187
+ GPUGraphValueRole
188
+ } from './gpu-core/gpu-graph-value';
189
+ export type {GPUGraphExecutionBindings} from './gpu-core/gpu-expression-plan';
190
+ export type {
191
+ GPUOperationOutputDeclarations,
192
+ GPUOperationContractContext
193
+ } from './gpu-core/gpu-operation-contract';
194
+
195
+ export {GPUUploadOperation, GPUCopyOperation} from './gpu-core/gpu-transfer-operation';
196
+ export type {
197
+ GPUUploadOperationProps,
198
+ GPUCopyOperationProps
199
+ } from './gpu-core/gpu-transfer-operation';
200
+ export {GPUCompactionOperation} from './gpu-core/gpu-compaction-operation';
201
+ export type {GPUCompactionOperationProps} from './gpu-core/gpu-compaction-operation';
202
+
203
+ export type {GPUGraphTextureDescriptor, GPUGraphTextureExtent} from './gpu-core/gpu-graph-value';
204
+ export type {
205
+ GPUGraphTextureBinding,
206
+ GPUGraphOutput,
207
+ GPUGraphOutputs
208
+ } from './gpu-core/gpu-texture-plan';