File tree Expand file tree Collapse file tree
packages/rs-drive/src/query/drive_document_ranked_query Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,17 +60,17 @@ pub fn detect_ranked_mode(
6060/// Accepts exactly:
6161///
6262/// ```text
63- /// SELECT COUNT(*) GROUP BY p HAVING COUNT(*) IN TOP(n) | IN BOTTOM(n) | EQ MAX | EQ MIN
64- /// SELECT SUM(f) GROUP BY p HAVING SUM(f) IN TOP(n) | IN BOTTOM(n) | EQ MAX | EQ MIN
65- /// SELECT AVG(f) GROUP BY p HAVING AVG(f) IN TOP(n) | IN BOTTOM(n) | EQ MAX | EQ MIN
63+ /// SELECT COUNT(*) GROUP BY p HAVING COUNT(*) IN TOP(n) | IN BOTTOM(n) | EQ TOP(1) | EQ BOTTOM(1)
64+ /// SELECT SUM(f) GROUP BY p HAVING SUM(f) IN TOP(n) | IN BOTTOM(n) | EQ TOP(1) | EQ BOTTOM(1)
65+ /// SELECT AVG(f) GROUP BY p HAVING AVG(f) IN TOP(n) | IN BOTTOM(n) | EQ TOP(1) | EQ BOTTOM(1)
6666/// ```
6767///
6868/// with no `WHERE`, no `LIMIT` / `OFFSET` / `START AT`, `1 ≤ n ≤`
6969/// [`MAX_RANKED_LIMIT`], and the `HAVING` aggregate byte-equal to the
70- /// `SELECT` projection. `EQ TOP(1)` / `EQ BOTTOM(1)` are accepted as
71- /// synonyms of `EQ MAX` / `EQ MIN` because
72- /// [`HavingRightOperand::Ranking`]'s own contract documents them as
73- /// equivalent .
70+ /// `SELECT` projection. `EQ TOP(1)` / `EQ BOTTOM(1)` are accepted for the
71+ /// positional single best- or worst-ranked group. ` MAX` and ` MIN` are
72+ /// wire-decodable but rejected: they mean every group tied at the extreme,
73+ /// which the indexed top-k proof cannot attest (ties break by group key) .
7474///
7575/// Everything the grammar rejects is rejected *loudly* rather than
7676/// normalized away: a caller who wrote a filter, a limit, or a mismatched
You can’t perform that action at this time.
0 commit comments