Skip to content

This release enhances the sort function with custom comparators and descending order support, and extends the slice function to work with lists.

Feb 22, 2026 · @mavam, @codex · #5819

The slice function now supports list types in addition to string. You can slice lists using the same begin, end, and stride parameters. Negative stride values are now supported for lists, letting you reverse or step backward through list data. String slicing continues to require a positive stride.

Example usage with lists:

  • [1, 2, 3, 4, 5].slice(begin=1, end=4) returns [2, 3, 4]
  • [1, 2, 3, 4, 5].slice(stride=-1) returns the list in reverse order
  • [1, 2, 3, 4, 5].slice(begin=1, end=5, stride=-2) returns [5, 3]

Enhance sort function with desc and cmp parameters

Section titled “Enhance sort function with desc and cmp parameters”

Feb 17, 2026 · @mavam, @codex · #5767

The sort function now supports two new parameters: desc for controlling sort direction and cmp for custom comparison logic via binary lambdas.

Sort in descending order:

from {xs: [3, 1, 2]}
select ys = sort(xs, desc=true)
{ys: [3, 2, 1]}

Sort records by a specific field using a custom comparator:

from {xs: [{v: 2, id: "b"}, {v: 1, id: "a"}, {v: 2, id: "c"}]}
select ys = sort(xs, cmp=(left, right) => left.v < right.v)
{
ys: [
{v: 1, id: "a"},
{v: 2, id: "b"},
{v: 2, id: "c"},
],
}

The cmp lambda receives two elements and returns a boolean indicating whether the first element should come before the second. Both parameters can be combined to reverse a custom comparison.

Feb 17, 2026 · @tobim

The read_lines operator was accidently broken while it was ported to the new execution API. This change restores its functionality.

Jan 28, 2026 · @lava · #5693

HTTP header values containing colons are now parsed correctly.