Skip to content

Commit c973313

Browse files
docs: correct the ranked-mode grammar block MAX/MIN claim
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 1027e2d commit c973313

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

packages/rs-drive/src/query/drive_document_ranked_query/mode_detection.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)