-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add natural sorting (aka version sort) #6256
base: master
Are you sure you want to change the base?
Conversation
TODO: add docs. TODO: "vendor" change should be done upstream. Signed-off-by: Lapo Luchini <lapo@lapo.it>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6256 +/- ##
==========================================
- Coverage 60.37% 57.16% -3.21%
==========================================
Files 411 536 +125
Lines 76609 73114 -3495
==========================================
- Hits 46253 41799 -4454
- Misses 27794 28388 +594
- Partials 2562 2927 +365 ☔ View full report in Codecov by Sentry. |
Add disambiguation example to numeric sort (1.10 < 1.2). Signed-off-by: Lapo Luchini <lapo@lapo.it>
1814cc5
to
cf6e9c7
Compare
Linked to [VM PR #6256](VictoriaMetrics/VictoriaMetrics#6256) Signed-off-by: Lapo Luchini <lapo@lapo.it>
245acf1
to
cf6e9c7
Compare
These files seems to be duplicate:
|
Signed-off-by: Lapo Luchini <lapo@lapo.it>
Natural sorting is needed for sort_by_label_natural() and sort_by_label_natural_desc() functions in MetricsQL - see #6192 and #6256 Natural sorting will be also used by `| sort ...` pipe in VictoriaLogs - see https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe
Natural sorting is needed for sort_by_label_natural() and sort_by_label_natural_desc() functions in MetricsQL - see #6192 and #6256 Natural sorting will be also used by `| sort ...` pipe in VictoriaLogs - see https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe (cherry picked from commit 707f3a6)
@lapo-luchini , please use stringsutil.LessNatural for natural sorting.
The first one is automatically copied from the second one when running |
Describe Your Changes
Add natural sorting, closes #6192.
PR currently complete:
Checklist
The following checks are mandatory: