zed
zed copied to clipboard
order function not effective on an array of records
tl;dr
The docs for the order function have included an mdtest that's been "skipped" because the tooling doesn't actually produce the desired output. A note in the doc says "TBD: fix this bug or remove example…" and since this bug has not been fixed in some time I'm opening this bug and removing the example from the doc.
Details
Repro is with super commit 910e11a.
Before its removal, the "skipped" example in question looked like:
What actually happens is that the relative order of the a and b fields within each record in the array are undisturbed.
$ echo '[{b:1,a:1},{a:2,b:2}]' | super -z -c 'order(this, <[{a:int64,b:int64}]>)' -
[{b:1,a:1},{a:2,b:2}]