rank
Stable function · Relational keys and geometry
Tier: stable · Kind: function · Topic: Relational keys and geometry
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
| not exported | not exported | rank | rank | not exported |
Julia
Julia does not export this function.
TypeScript
TypeScript does not export this function.
Python
rank(rows: Iterable[Any], *, base: int = 0) -> Ranking
Dense integer renumbering (rule 3): assign IDs by position in the sorted
distinct
sequence.
base is the emission base — Python’s native 0-based is the default
(the canonical numbering the conformance suite asserts on); pass base=1
for a 1-based numbering. Equivalent to SQL dense_rank() OVER (ORDER BY …)
over the deduplicated rows.
Rust
pub fn rank(rows: &[Key]) -> Ranking
Dense integer renumbering (rule 3) at Rust’s native 0-based emission:
assign IDs by position in the sorted distinct
sequence. Equivalent to SQL
dense_rank() OVER (ORDER BY …) over the deduplicated rows.
Go
Go does not export this function.