feat(sql): Advanced SQL — LATERAL, GROUP BY/HAVING, FILTER, aggregates, PIVOT, SQL/PGQ
- LATERAL JOIN: correlated subquery strategy (scan + merge + filter/sort/limit) - GROUP BY: SUM/AVG/MIN/MAX evaluation inside groups, HAVING filter - FILTER (WHERE ...): conditional aggregates for COUNT/SUM/AVG - ARRAY_AGG / STRING_AGG: multi-argument aggregate functions - GROUPING SETS / ROLLUP / CUBE: powerset generation for multi-level aggregation - PIVOT / UNPIVOT: row-to-column and column-to-row transformation - SQL/PGQ Property Graph: GRAPH_TABLE MATCH parser + executor skeleton - 330 tests passing, all 4 modalities (SQL/JSON/Vector/Graph) integrated
This commit is contained in:
@@ -204,6 +204,18 @@ proc codegenPlan*(plan: IRPlan): StorageOp =
|
||||
return op
|
||||
of irpkMerge:
|
||||
return newStorageOp(sokScan)
|
||||
of irpkPivot:
|
||||
let sourceOp = codegenPlan(plan.pivotSource)
|
||||
let op = newStorageOp(sokScan)
|
||||
if sourceOp != nil: op.children.add(sourceOp)
|
||||
return op
|
||||
of irpkUnpivot:
|
||||
let sourceOp = codegenPlan(plan.unpivotSource)
|
||||
let op = newStorageOp(sokScan)
|
||||
if sourceOp != nil: op.children.add(sourceOp)
|
||||
return op
|
||||
of irpkGraphTraversal:
|
||||
return newStorageOp(sokScan)
|
||||
|
||||
proc estimateCost*(op: StorageOp): float64 =
|
||||
if op == nil:
|
||||
|
||||
Reference in New Issue
Block a user