add feat "https://github.com/orientechnologies/orientdb/issues/10452"#10578
Open
klh666 wants to merge 1 commit intoorientechnologies:developfrom
Open
add feat "https://github.com/orientechnologies/orientdb/issues/10452"#10578klh666 wants to merge 1 commit intoorientechnologies:developfrom
klh666 wants to merge 1 commit intoorientechnologies:developfrom
Conversation
Member
|
Hi, Thanks to submit this, will review it asap. |
tglman
requested changes
Oct 14, 2025
Member
tglman
left a comment
There was a problem hiding this comment.
Can you double check this couple of things than is good to merge for me.
| } | ||
|
|
||
| // 自然字符串比较器实现 | ||
| private static class NaturalStringComparator implements Comparator<Object> { |
Member
There was a problem hiding this comment.
Hi,
Is there any reason for not use directly https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html#naturalOrder--
I do prefer keep a generic implementation that is already battle tested
| public void testNaturalSortOrder() { | ||
| NaturalStringCollate collate = new NaturalStringCollate(); | ||
|
|
||
| // 测试基本的自然排序 |
Member
There was a problem hiding this comment.
We do not have anybody in our team now that can read this language, the project official comment language is English, so the comments in other languages will be removed on merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
A brief description of the change being made with this pull request.
As today we do not have this kind of sorting supported in the engine, even though it should be possible to support this implementing a custom collate, trough define an implementation of this https://github.com/orientechnologies/orientdb/blob/develop/core/src/main/java/com/orientechnologies/orient/core/collate/OCollateFactory.java and plugging it in with a resource locator.
In this way you can add that to an existing distribution adding it with a jar.
Motivation
What inspired you to submit this pull request?
Related issues
A list of issues either fixed, containing architectural discussions, otherwise relevant
for this Pull Request.
#10452
Additional Notes
Anything else we should know when reviewing?
Checklist
[] I have run the build using
mvn clean packagecommand[] My unit tests cover both failure and success scenarios