Closed 51-code closed 3 weeks ago
index=abc | sort offset index _raw | eval a=10
works.
Seems like sort is supported for multiple fields, just not when separating the fields with commas.
Fixed the bug, but implementing #64 to the same PR to make sure nothing else broke when solving this one.
Describe the bug
Currently the sort command only takes one or two fields as parameters to sort with.
For example the following query will silently result in an error:
| sort offset, index, _raw
Expected behavior
Should work with unlimited amount of fields.
How to reproduce
Run a query like this:
index=abc | sort offset, index, _raw | eval a=10
it won't execute the eval command at all in since the parse tree is only created as far as the second comma. Furthermore the _raw column isn't taken into account when sorting.
Screenshots
Software version
6.1.0
Desktop (please complete the following information if relevant):
Additional context
sortParseTest in TicketSyntaxTests.java has been disabled because of this issue in PR #52.