-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[opt](nereids) compare literal not convert to legacy literal and fix …
…ip literal compareTo always equals 0 (#46482) ### What problem does this PR solve? Problem Summary: as #45181 mention, when sorting literals, toLegacyLiteral may cost a lot of time, so compare literal don't use toLegacyLiteral any more. legacy literal may have an unknown behaviour comparing two values with different data type. for neredis literals, different data type value compare will throw an exception, it support valid compare with data types: 1. boolean vs boolean; 2. numeric vs numeric; 3. string like vs string like; 4. date like vs date like; 5. ipv4 vs ipv4; 6. ipv6 vs ipv6; 7. array vs array; 8. above data types vs null and max; what's more, this pr also: 1. nereids literal remove implements Comparable<Literal>; 2. add a new interface ComparableLiteral, and the above type literals will implement it; 3. fix ipv4 / ipv6 / map / struct compareTo always return 0;
- Loading branch information
Showing
39 changed files
with
900 additions
and
126 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.