| 1 |
HAVING clause is not yet implemented |
Non-empty having rejected wholesale. Decoded Vec<HavingClause> already lands in having_clauses_from_proto (currently #[allow(dead_code)]); execution is "flip the gate + thread into the dispatchers." |
| 2 |
SELECT SUM is not yet implemented ✅ Done in #3661. Drive drive_document_sum_query dispatcher routes (mode × range × group_by × prove) to dedicated executors (point_lookup, total, range_no_proof, range_proof, range_distinct_proof, range_aggregate_carrier_proof, per_in_value). Response shape: data.sums.aggregate_sum (single) / data.sums.entries (per-group), proven via grovedb's verify_aggregate_sum_query. |
|
| 3 |
SELECT AVG is not yet implemented ✅ Done in #3661. AVG composes count + sum walks under the hood (no separate grovedb primitive); the dispatcher resolves each AVG shape to its matching SUM mode and the client folds sum / count. Response shape: data.averages.aggregate_average / data.averages.entries. Single-aggregate fold uses checked_add on both u64 (count) and i64 (sum) axes; per-group flat-map fold likewise. |
|
| 4 |
SELECT MIN is not yet implemented |
Per-group/global MIN executor needed (semantically distinct from HavingRanking::Min which is cross-group). Waits on a grovedb min/max primitive — the order-by-then-LIMIT-1 emulation has the wrong proof shape for the cryptographic verifier. |
| 5 |
SELECT MAX is not yet implemented |
Symmetric to MIN. Same grovedb-primitive dependency. |
| 6 |
SELECT COUNT(field) is not yet implemented |
Counting non-null values of a specific field; today only COUNT(*) (empty field) is evaluated. Needs a non-null counter walk that doesn't exist in grovedb. |
| 7 |
GROUP BY with SELECT DOCUMENTS is not yet implemented |
Documents-fetch path doesn't accept grouping. |
| 8 |
GROUP BY on field '<x>' which is not constrained by an In or range where clause is not yet implemented |
Single-field GROUP BY on a field not present in WHERE. |
| 9 |
two-field GROUP BY outside the (In, range) compound shape is not yet implemented |
Only the canonical compound (in_field, range_field) ordering is wired; other orderings need a new merk walk. |
| 10 |
GROUP BY with more than two fields is not yet implemented |
group_by.len() > 2. Probably permanent in current architecture; flag for confirmation. |
| 11 |
OFFSET pagination is not yet implemented |
Wire-reserved optional uint32 offset = 12;. Cursor pagination via start_after / start_at is the supported path today. |
| 12 |
multi-projection SELECT is not yet implemented |
Wire: repeated Select selects. Today selects.len() > 1 rejected. Response shape needs a parallel repeated AggregateValue values field when this lands. |
| 13 |
start_after / start_at with SELECT COUNT is not yet implemented |
Paginating count results — workaround today is narrowing the range clause. |
| 14 |
ORDER BY on aggregate keys is not yet implemented |
Wire: OrderClause.target.aggregate. Drive's OrderClause only carries a plain field: String; extension needs a new OrderTarget enum at the drive level. Overlaps HavingRanking::Top/Bottom for top-N selection but more general. |
Status
DocumentSum/DocumentAverage+DocumentSplitSums/DocumentSplitAveragesFromProof impls; ABCI routing throughSelectFunction::Sum/::Avg; wasm-sdk bindingsgetDocumentsSum/getDocumentsAverage+ theirWithProofInfovariants). The polymorphicAggregateValueresponse variant didn't end up needed — SUM and AVG ride dedicateddata.sums/data.averagesresponse slots alongsidedata.counts.Background
PR #3654 lands the v1
getDocumentsSQL-shaped wire surface (SELECT/WHERE/GROUP BY/HAVING/ORDER BY/LIMIT/OFFSET), but ships several pieces as wire-only: the proto carries them so callers can encode the shape and the future server capability can land without another wire-format change, but the server rejects them at routing time withQuerySyntaxError::Unsupported("… is not yet implemented").This tracker collects every
not_yet_implementedintroduced by that PR so each can be picked up as a focused follow-up.Inventory of
not_yet_implementedrejections (rs-drive-abci v1 handler)HAVING clause is not yet implementedhavingrejected wholesale. DecodedVec<HavingClause>already lands inhaving_clauses_from_proto(currently#[allow(dead_code)]); execution is "flip the gate + thread into the dispatchers."✅ Done in #3661. DriveSELECT SUM is not yet implementeddrive_document_sum_querydispatcher routes (mode × range × group_by × prove) to dedicated executors (point_lookup,total,range_no_proof,range_proof,range_distinct_proof,range_aggregate_carrier_proof,per_in_value). Response shape:data.sums.aggregate_sum(single) /data.sums.entries(per-group), proven via grovedb'sverify_aggregate_sum_query.✅ Done in #3661. AVG composes count + sum walks under the hood (no separate grovedb primitive); the dispatcher resolves each AVG shape to its matching SUM mode and the client foldsSELECT AVG is not yet implementedsum / count. Response shape:data.averages.aggregate_average/data.averages.entries. Single-aggregate fold useschecked_addon both u64 (count) and i64 (sum) axes; per-group flat-map fold likewise.SELECT MIN is not yet implementedHavingRanking::Minwhich is cross-group). Waits on a grovedb min/max primitive — the order-by-then-LIMIT-1 emulation has the wrong proof shape for the cryptographic verifier.SELECT MAX is not yet implementedSELECT COUNT(field) is not yet implementedCOUNT(*)(emptyfield) is evaluated. Needs a non-null counter walk that doesn't exist in grovedb.GROUP BY with SELECT DOCUMENTS is not yet implementedGROUP BY on field '<x>' which is not constrained by an In or range where clause is not yet implementedWHERE.two-field GROUP BY outside the (In, range) compound shape is not yet implemented(in_field, range_field)ordering is wired; other orderings need a new merk walk.GROUP BY with more than two fields is not yet implementedgroup_by.len() > 2. Probably permanent in current architecture; flag for confirmation.OFFSET pagination is not yet implementedoptional uint32 offset = 12;. Cursor pagination viastart_after/start_atis the supported path today.multi-projection SELECT is not yet implementedrepeated Select selects. Todayselects.len() > 1rejected. Response shape needs a parallelrepeated AggregateValue valuesfield when this lands.start_after / start_at with SELECT COUNT is not yet implementedORDER BY on aggregate keys is not yet implementedOrderClause.target.aggregate. Drive'sOrderClauseonly carries a plainfield: String; extension needs a newOrderTargetenum at the drive level. OverlapsHavingRanking::Top/Bottomfor top-N selection but more general.Dependencies between items
(2) (3) (4) (5) all need a shared numeric-aggregate executor in drive + a polymorphic(2) and (3) landed in feat(drive): document sum + average proof primitives, with SDK fan-out scaffolding and reproducible benchmarks #3661 via dedicatedAggregateValueresponse variant.data.sums/data.averagesresponse slots — the polymorphicAggregateValuevariant turned out unnecessary for the SUM/AVG-only case. (4) MIN and (5) MAX still wait on a grovedb min/max primitive (separate from the SUM/AVG plumbing).OrderClauseshape; once done,HavingRanking::Top/Bottomcould potentially be consolidated through this path. The SUM/AVG ranking infrastructure (per-group entries with(in_key, key, sum)/(in_key, key, count, sum)triples) is now in place; ordering on those metrics is the remaining piece.conversions.rs::having_clauses_from_proto; only the gate-flip + dispatcher threading is needed. Now that SUM/AVG executors exist, HAVING aggregates over them (HAVING SUM(x) > 100) have something to evaluate against.offsetonSizedQuery; routing-layer wire-through is the main work.Suggested first slices
DocumentSplitSums/DocumentSplitAverages. One PR.References
packages/dapi-grpc/protos/platform/v0/platform.proto(GetDocumentsRequestV1and its nested messages)packages/rs-drive-abci/src/query/document_query/v1/mod.rs(validate_and_route)packages/rs-drive-abci/src/query/document_query/v1/conversions.rspackages/rs-drive/src/query/{having,projection,conditions,ordering}.rspackages/rs-drive/src/query/drive_document_{sum,average}_query/