diff --git a/sql/core/benchmarks/CollationBenchmark-jdk21-results.txt b/sql/core/benchmarks/CollationBenchmark-jdk21-results.txt index da06b0209d0a6..e31b45b48f8f0 100644 --- a/sql/core/benchmarks/CollationBenchmark-jdk21-results.txt +++ b/sql/core/benchmarks/CollationBenchmark-jdk21-results.txt @@ -2,53 +2,53 @@ OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - equalsFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time -------------------------------------------------------------------------------------------------------------------------- -UTF8_BINARY 1349 1349 0 0.1 13485.4 1.0X -UTF8_LCASE 3559 3561 3 0.0 35594.3 2.6X -UNICODE 17580 17589 12 0.0 175803.6 13.0X -UNICODE_CI 17210 17212 2 0.0 172100.2 12.8X +UTF8_BINARY 1353 1357 5 0.1 13532.2 1.0X +UTF8_LCASE 2601 2602 2 0.0 26008.0 1.9X +UNICODE 16745 16756 16 0.0 167450.9 12.4X +UNICODE_CI 16590 16627 52 0.0 165904.8 12.3X OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - compareFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time --------------------------------------------------------------------------------------------------------------------------- -UTF8_BINARY 1740 1741 1 0.1 17398.8 1.0X -UTF8_LCASE 2630 2632 3 0.0 26301.0 1.5X -UNICODE 16732 16743 16 0.0 167319.7 9.6X -UNICODE_CI 16482 16492 14 0.0 164819.7 9.5X +UTF8_BINARY 1746 1746 0 0.1 17462.6 1.0X +UTF8_LCASE 2629 2630 1 0.0 26294.8 1.5X +UNICODE 16744 16744 0 0.0 167438.6 9.6X +UNICODE_CI 16518 16521 4 0.0 165180.2 9.5X OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - hashFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 2808 2808 0 0.0 28082.3 1.0X -UTF8_LCASE 5412 5413 1 0.0 54123.5 1.9X -UNICODE 70755 70787 44 0.0 707553.4 25.2X -UNICODE_CI 57639 57669 43 0.0 576390.0 20.5X +UTF8_BINARY 2808 2808 1 0.0 28076.2 1.0X +UTF8_LCASE 5409 5410 0 0.0 54093.0 1.9X +UNICODE 67930 67957 38 0.0 679296.7 24.2X +UNICODE_CI 56004 56005 1 0.0 560044.2 19.9X OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - contains: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 9356 9357 0 0.0 93564.9 1.0X -UTF8_LCASE 24106 24129 33 0.0 241055.3 2.6X -UNICODE 368428 369053 883 0.0 3684284.1 39.4X -UNICODE_CI 417361 418242 1246 0.0 4173613.9 44.6X +UTF8_BINARY 1612 1614 2 0.1 16118.8 1.0X +UTF8_LCASE 14509 14526 23 0.0 145092.7 9.0X +UNICODE 308136 308631 700 0.0 3081364.6 191.2X +UNICODE_CI 314612 314846 330 0.0 3146120.0 195.2X OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - startsWith: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 10941 10943 2 0.0 109411.5 1.0X -UTF8_LCASE 20041 20058 24 0.0 200410.1 1.8X -UNICODE 364296 365610 1859 0.0 3642958.8 33.3X -UNICODE_CI 424306 424888 823 0.0 4243062.7 38.8X +UTF8_BINARY 1913 1914 1 0.1 19131.3 1.0X +UTF8_LCASE 9785 9788 5 0.0 97847.7 5.1X +UNICODE 311517 311580 89 0.0 3115167.2 162.8X +UNICODE_CI 316517 316660 201 0.0 3165173.7 165.4X OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - endsWith: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 10551 10556 7 0.0 105511.7 1.0X -UTF8_LCASE 20294 20300 9 0.0 202943.7 1.9X -UNICODE 384070 384554 684 0.0 3840704.6 36.4X -UNICODE_CI 441935 442184 352 0.0 4419351.4 41.9X +UTF8_BINARY 1891 1891 0 0.1 18912.1 1.0X +UTF8_LCASE 10089 10093 5 0.0 100893.6 5.3X +UNICODE 336905 336931 36 0.0 3369051.8 178.1X +UNICODE_CI 339944 340585 907 0.0 3399439.0 179.7X diff --git a/sql/core/benchmarks/CollationBenchmark-results.txt b/sql/core/benchmarks/CollationBenchmark-results.txt index c79fef5f4cf65..eb8ae040a46f6 100644 --- a/sql/core/benchmarks/CollationBenchmark-results.txt +++ b/sql/core/benchmarks/CollationBenchmark-results.txt @@ -2,53 +2,53 @@ OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - equalsFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time -------------------------------------------------------------------------------------------------------------------------- -UTF8_BINARY 1372 1372 1 0.1 13715.2 1.0X -UTF8_LCASE 3847 3851 6 0.0 38467.3 2.8X -UNICODE 19659 19662 4 0.0 196587.1 14.3X -UNICODE_CI 19663 19666 3 0.0 196634.5 14.3X +UTF8_BINARY 1373 1373 0 0.1 13730.8 1.0X +UTF8_LCASE 3311 3311 0 0.0 33106.6 2.4X +UNICODE 19067 19100 46 0.0 190672.9 13.9X +UNICODE_CI 18704 18795 129 0.0 187040.2 13.6X OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - compareFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time --------------------------------------------------------------------------------------------------------------------------- -UTF8_BINARY 1706 1707 3 0.1 17056.0 1.0X -UTF8_LCASE 4016 4016 0 0.0 40164.0 2.4X -UNICODE 19545 19547 3 0.0 195453.4 11.5X -UNICODE_CI 19544 19547 5 0.0 195437.5 11.5X +UTF8_BINARY 1706 1708 3 0.1 17060.4 1.0X +UTF8_LCASE 3958 3965 10 0.0 39575.4 2.3X +UNICODE 18831 18865 48 0.0 188311.2 11.0X +UNICODE_CI 18818 18825 9 0.0 188181.7 11.0X OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - hashFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 3091 3092 1 0.0 30909.8 1.0X -UTF8_LCASE 6286 6287 2 0.0 62856.0 2.0X -UNICODE 65495 65528 47 0.0 654945.7 21.2X -UNICODE_CI 59987 59994 10 0.0 599868.6 19.4X +UTF8_BINARY 3092 3093 1 0.0 30918.5 1.0X +UTF8_LCASE 6273 6289 23 0.0 62734.3 2.0X +UNICODE 66953 66962 13 0.0 669525.2 21.7X +UNICODE_CI 53934 53946 17 0.0 539338.7 17.4X OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - contains: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 13707 13726 27 0.0 137069.4 1.0X -UTF8_LCASE 28660 28685 36 0.0 286598.9 2.1X -UNICODE 363134 364168 1462 0.0 3631341.3 26.5X -UNICODE_CI 412158 412229 100 0.0 4121577.8 30.1X +UTF8_BINARY 1643 1644 1 0.1 16431.2 1.0X +UTF8_LCASE 17241 17273 45 0.0 172411.1 10.5X +UNICODE 304878 307207 3294 0.0 3048780.8 185.5X +UNICODE_CI 317341 320620 4637 0.0 3173412.3 193.1X OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - startsWith: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 12200 12205 8 0.0 121998.8 1.0X -UTF8_LCASE 27626 27633 9 0.0 276263.6 2.3X -UNICODE 350755 351083 464 0.0 3507553.8 28.8X -UNICODE_CI 409383 410380 1410 0.0 4093834.8 33.6X +UTF8_BINARY 1973 1977 6 0.1 19726.2 1.0X +UTF8_LCASE 17070 17119 70 0.0 170697.7 8.7X +UNICODE 306091 306797 999 0.0 3060911.4 155.2X +UNICODE_CI 306558 307812 1774 0.0 3065581.4 155.4X OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - endsWith: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 11879 11887 12 0.0 118786.3 1.0X -UTF8_LCASE 27743 27759 22 0.0 277434.4 2.3X -UNICODE 368435 368478 61 0.0 3684351.2 31.0X -UNICODE_CI 426350 426503 216 0.0 4263497.6 35.9X +UTF8_BINARY 2064 2064 0 0.0 20640.6 1.0X +UTF8_LCASE 16883 16899 23 0.0 168829.3 8.2X +UNICODE 309882 310702 1160 0.0 3098819.7 150.1X +UNICODE_CI 313599 314798 1695 0.0 3135994.6 151.9X diff --git a/sql/core/benchmarks/CollationNonASCIIBenchmark-jdk21-results.txt b/sql/core/benchmarks/CollationNonASCIIBenchmark-jdk21-results.txt index 5fd9e5c0dd084..58ceaecb795d3 100644 --- a/sql/core/benchmarks/CollationNonASCIIBenchmark-jdk21-results.txt +++ b/sql/core/benchmarks/CollationNonASCIIBenchmark-jdk21-results.txt @@ -2,53 +2,53 @@ OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - equalsFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time -------------------------------------------------------------------------------------------------------------------------- -UTF8_BINARY 171 171 0 0.2 4273.2 1.0X -UTF8_LCASE 7382 7393 16 0.0 184558.6 43.2X -UNICODE 5337 5342 7 0.0 133424.6 31.2X -UNICODE_CI 5090 5093 4 0.0 127259.3 29.8X +UTF8_BINARY 170 171 2 0.2 4260.8 1.0X +UTF8_LCASE 7006 7009 5 0.0 175152.5 41.1X +UNICODE 5152 5153 2 0.0 128798.5 30.2X +UNICODE_CI 5307 5319 18 0.0 132666.4 31.1X OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - compareFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time --------------------------------------------------------------------------------------------------------------------------- -UTF8_BINARY 318 319 1 0.1 7952.7 1.0X -UTF8_LCASE 7065 7072 10 0.0 176621.0 22.2X -UNICODE 5294 5297 4 0.0 132357.7 16.6X -UNICODE_CI 5246 5248 2 0.0 131156.9 16.5X +UTF8_BINARY 310 311 1 0.1 7748.1 1.0X +UTF8_LCASE 6971 6977 8 0.0 174277.9 22.5X +UNICODE 5788 5794 9 0.0 144708.3 18.7X +UNICODE_CI 5710 5715 7 0.0 142754.1 18.4X OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - hashFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 385 387 2 0.1 9635.7 1.0X -UTF8_LCASE 3559 3560 1 0.0 88974.0 9.2X -UNICODE 15525 15542 25 0.0 388119.0 40.3X -UNICODE_CI 12479 12482 5 0.0 311967.1 32.4X +UTF8_BINARY 379 380 1 0.1 9479.8 1.0X +UTF8_LCASE 3541 3547 7 0.0 88536.4 9.3X +UNICODE 15014 15030 22 0.0 375356.2 39.6X +UNICODE_CI 12226 12231 6 0.0 305661.7 32.2X OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - contains: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 1669 1671 2 0.0 41724.7 1.0X -UTF8_LCASE 10199 10202 4 0.0 254974.8 6.1X -UNICODE 68754 68758 6 0.0 1718852.9 41.2X -UNICODE_CI 76056 76086 42 0.0 1901404.1 45.6X +UTF8_BINARY 315 315 1 0.1 7864.6 1.0X +UTF8_LCASE 7995 8005 14 0.0 199880.8 25.4X +UNICODE 58712 58801 125 0.0 1467803.8 186.6X +UNICODE_CI 58777 58784 9 0.0 1469433.1 186.8X OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - startsWith: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 1785 1787 3 0.0 44623.9 1.0X -UTF8_LCASE 6859 6861 3 0.0 171482.2 3.8X -UNICODE 68545 68553 12 0.0 1713617.2 38.4X -UNICODE_CI 76486 76520 48 0.0 1912155.4 42.9X +UTF8_BINARY 284 284 1 0.1 7093.4 1.0X +UTF8_LCASE 5169 5171 4 0.0 129215.5 18.2X +UNICODE 57857 57897 57 0.0 1446425.3 203.9X +UNICODE_CI 58803 58826 32 0.0 1470086.9 207.2X OpenJDK 64-Bit Server VM 21.0.5+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - endsWith: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 1760 1761 1 0.0 44004.8 1.0X -UTF8_LCASE 6680 6681 1 0.0 166995.3 3.8X -UNICODE 74294 74346 74 0.0 1857344.0 42.2X -UNICODE_CI 81377 81447 98 0.0 2034434.9 46.2X +UTF8_BINARY 284 284 0 0.1 7090.7 1.0X +UTF8_LCASE 5187 5187 1 0.0 129665.9 18.3X +UNICODE 64562 64565 5 0.0 1614041.8 227.6X +UNICODE_CI 63633 63686 75 0.0 1590826.2 224.4X diff --git a/sql/core/benchmarks/CollationNonASCIIBenchmark-results.txt b/sql/core/benchmarks/CollationNonASCIIBenchmark-results.txt index 101d8c3a614dc..2920ffbeac6a3 100644 --- a/sql/core/benchmarks/CollationNonASCIIBenchmark-results.txt +++ b/sql/core/benchmarks/CollationNonASCIIBenchmark-results.txt @@ -2,53 +2,53 @@ OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - equalsFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time -------------------------------------------------------------------------------------------------------------------------- -UTF8_BINARY 125 128 6 0.3 3119.4 1.0X -UTF8_LCASE 6635 6701 93 0.0 165887.1 53.2X -UNICODE 5195 5217 31 0.0 129878.9 41.6X -UNICODE_CI 5240 5263 33 0.0 131003.7 42.0X +UTF8_BINARY 133 133 1 0.3 3314.1 1.0X +UTF8_LCASE 7149 7159 15 0.0 178721.0 53.9X +UNICODE 5693 5699 8 0.0 142326.0 42.9X +UNICODE_CI 6228 6231 5 0.0 155690.1 47.0X OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - compareFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time --------------------------------------------------------------------------------------------------------------------------- -UTF8_BINARY 416 419 2 0.1 10410.2 1.0X -UTF8_LCASE 6909 6910 2 0.0 172713.2 16.6X -UNICODE 5444 5480 50 0.0 136112.1 13.1X -UNICODE_CI 5444 5470 37 0.0 136087.6 13.1X +UTF8_BINARY 472 475 3 0.1 11799.9 1.0X +UTF8_LCASE 7398 7423 37 0.0 184940.1 15.7X +UNICODE 6079 6083 5 0.0 151983.2 12.9X +UNICODE_CI 6032 6034 2 0.0 150811.6 12.8X OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - hashFunction: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 380 386 4 0.1 9510.3 1.0X -UTF8_LCASE 3390 3398 10 0.0 84756.7 8.9X -UNICODE 13224 13243 27 0.0 330604.1 34.8X -UNICODE_CI 10524 10635 157 0.0 263095.0 27.7X +UTF8_BINARY 408 411 2 0.1 10203.7 1.0X +UTF8_LCASE 3642 3644 4 0.0 91040.2 8.9X +UNICODE 13471 13477 9 0.0 336766.1 33.0X +UNICODE_CI 11242 11249 10 0.0 281047.3 27.5X OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - contains: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 1740 1758 26 0.0 43489.5 1.0X -UTF8_LCASE 10697 10708 15 0.0 267435.0 6.1X -UNICODE 61284 61521 336 0.0 1532092.7 35.2X -UNICODE_CI 70030 70051 29 0.0 1750749.7 40.3X +UTF8_BINARY 330 331 1 0.1 8249.5 1.0X +UTF8_LCASE 8380 8388 12 0.0 209490.6 25.4X +UNICODE 59720 59750 43 0.0 1493005.1 181.0X +UNICODE_CI 57747 57748 2 0.0 1443681.8 175.0X OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - startsWith: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 1663 1675 18 0.0 41563.3 1.0X -UTF8_LCASE 6786 6787 2 0.0 169640.2 4.1X -UNICODE 60580 60668 124 0.0 1514498.6 36.4X -UNICODE_CI 71018 71018 0 0.0 1775444.7 42.7X +UTF8_BINARY 312 312 1 0.1 7798.9 1.0X +UTF8_LCASE 5300 5300 1 0.0 132491.4 17.0X +UNICODE 57388 57515 179 0.0 1434709.7 184.0X +UNICODE_CI 57642 57764 171 0.0 1441059.6 184.8X OpenJDK 64-Bit Server VM 17.0.13+11-LTS on Linux 6.5.0-1025-azure AMD EPYC 7763 64-Core Processor collation unit benchmarks - endsWith: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative time ------------------------------------------------------------------------------------------------------------------------ -UTF8_BINARY 1778 1779 2 0.0 44450.1 1.0X -UTF8_LCASE 6786 6822 50 0.0 169657.6 3.8X -UNICODE 67562 67633 101 0.0 1689054.6 38.0X -UNICODE_CI 75378 75919 765 0.0 1884460.0 42.4X +UTF8_BINARY 292 293 0 0.1 7311.6 1.0X +UTF8_LCASE 5375 5375 1 0.0 134375.2 18.4X +UNICODE 62773 63030 363 0.0 1569337.4 214.6X +UNICODE_CI 61268 61382 161 0.0 1531693.6 209.5X diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/CollationBenchmark.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/CollationBenchmark.scala index 59c2a2847fd08..21a5a4a979eb0 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/CollationBenchmark.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/CollationBenchmark.scala @@ -113,13 +113,13 @@ abstract class CollationBenchmarkBase extends BenchmarkBase { warmupTime = 10.seconds, output = output) collationTypes.foreach { collationType => { - val collation = CollationFactory.fetchCollation(collationType) + val collationId = CollationFactory.collationNameToId(collationType) benchmark.addCase(s"$collationType") { _ => sublistStrings.foreach { s1 => utf8Strings.foreach { s => (0 to 3).foreach { _ => CollationSupport.Contains.exec( - s, s1, CollationFactory.collationNameToId(collation.collationName) + s, s1, collationId ) } } @@ -141,13 +141,13 @@ abstract class CollationBenchmarkBase extends BenchmarkBase { warmupTime = 10.seconds, output = output) collationTypes.foreach { collationType => { - val collation = CollationFactory.fetchCollation(collationType) + val collationId = CollationFactory.collationNameToId(collationType) benchmark.addCase(s"$collationType") { _ => sublistStrings.foreach { s1 => utf8Strings.foreach { s => (0 to 3).foreach { _ => CollationSupport.StartsWith.exec( - s, s1, CollationFactory.collationNameToId(collation.collationName) + s, s1, collationId ) } } @@ -169,13 +169,13 @@ abstract class CollationBenchmarkBase extends BenchmarkBase { warmupTime = 10.seconds, output = output) collationTypes.foreach { collationType => { - val collation = CollationFactory.fetchCollation(collationType) + val collationId = CollationFactory.collationNameToId(collationType) benchmark.addCase(s"$collationType") { _ => sublistStrings.foreach { s1 => utf8Strings.foreach { s => (0 to 3).foreach { _ => CollationSupport.EndsWith.exec( - s, s1, CollationFactory.collationNameToId(collation.collationName) + s, s1, collationId ) } }