Relational Data - Functions - Tuple Map Functions
operator-and-lambdaparams-expr-function). - limit
– Elements in range [1..limit] are sorted. (U)Int. - map
– Map to sort. Map.
Returned value
- Partially sorted map. Map.
Example
SELECT mapPartialReverseSort((k, v) -> v, 2, map('k1', 3, 'k2', 1, 'k3', 2));
┌─mapPartialReverseSort(lambda(tuple(k, v), v), 2, map('k1', 3, 'k2', 1, 'k3', 2))─┐
│ {'k1':3,'k3':2,'k2':1} │
└──────────────────────────────────────────────────────────────────────────────────┘