-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(prefix sort): Support string type key in prefix sort (#11527)
Summary: Support string type key in PrefixSort. We introduce the configuration parameter `prefixsort_max_string_length`, which sets the maximum prefix length for strings. The implementation dynamically determines the prefix length by comparing the configured maximum with the actual maximum column length from RowContainer, using the smaller of the two. This ensures efficient and flexible prefix sorting for variable-length string types. Default value of `prefixsort_max_string_length` is 16. Perf result: ``` StdSort_no-payloads_1_varchar_1k 158.23ns 6.32M PrefixSort 415.89% 38.05ns 26.28M StdSort_no-payloads_2_varchar_1k 186.19ns 5.37M PrefixSort 197.21% 94.41ns 10.59M StdSort_no-payloads_3_varchar_1k 197.90ns 5.05M PrefixSort 148.93% 132.89ns 7.53M StdSort_no-payloads_4_varchar_1k 211.35ns 4.73M PrefixSort 126.75% 166.75ns 6.00M StdSort_no-payloads_1_varchar_10k 257.23ns 3.89M PrefixSort 358.08% 71.84ns 13.92M StdSort_no-payloads_2_varchar_10k 272.61ns 3.67M PrefixSort 227.46% 119.85ns 8.34M StdSort_no-payloads_3_varchar_10k 295.37ns 3.39M PrefixSort 170.20% 173.55ns 5.76M StdSort_no-payloads_4_varchar_10k 319.42ns 3.13M PrefixSort 152.60% 209.31ns 4.78M StdSort_no-payloads_1_varchar_100k 348.19ns 2.87M PrefixSort 403.18% 86.36ns 11.58M StdSort_no-payloads_2_varchar_100k 409.94ns 2.44M PrefixSort 261.56% 156.73ns 6.38M StdSort_no-payloads_3_varchar_100k 469.93ns 2.13M PrefixSort 206.32% 227.76ns 4.39M StdSort_no-payloads_4_varchar_100k 526.94ns 1.90M PrefixSort 186.66% 282.29ns 3.54M StdSort_no-payloads_1_varchar_1000k 780.28ns 1.28M PrefixSort 627.88% 124.27ns 8.05M StdSort_no-payloads_2_varchar_1000k 976.32ns 1.02M PrefixSort 491.56% 198.62ns 5.03M StdSort_no-payloads_3_varchar_1000k 1.08us 928.51K PrefixSort 376.44% 286.10ns 3.50M StdSort_no-payloads_4_varchar_1000k 1.12us 889.85K PrefixSort 321.50% 349.54ns 2.86M ``` Pull Request resolved: #11527 Reviewed By: Yuhta Differential Revision: D67149095 Pulled By: xiaoxmeng fbshipit-source-id: 79f02c81165a873aa8068260b5580850f30a4fc5
- Loading branch information
1 parent
e86ff05
commit 960c2af
Showing
19 changed files
with
505 additions
and
154 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.