Skip to content

Optimize sort-merge join data passes - #23532

Merged
rapids-bot[bot] merged 14 commits into
NVIDIA:mainfrom
PointKernel:optimize-sort-merge-join
Aug 10, 2026
Merged

rapids-bot[bot] merged 14 commits into
NVIDIA:mainfrom
PointKernel:optimize-sort-merge-join

Conversation

@PointKernel

@PointKernel PointKernel commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

Description

This PR reduces sort-merge join data passes by building a compact right-side run index, probing it with one bulk lower-bound operation that emits match starts and counts together, scanning those counts once, and using CUB batched copy to materialize both output index columns. The probe table no longer needs to be sorted.

The right-side run index computes the expensive row-comparator result once as byte flags. A separate flag-only CUB selection kernel consumes those values, keeping the heavy row operator out of the selection kernel and reducing its register usage from 120–255 registers per thread to 48. All new direct CUB calls use the environment-based one-phase APIs.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@PointKernel PointKernel added improvement Improvement / enhancement to an existing function Performance Performance related issue non-breaking Non-breaking change labels Aug 4, 2026
@github-actions github-actions Bot added the libcudf Affects libcudf (C++/CUDA) code. label Aug 4, 2026
@PointKernel

Copy link
Copy Markdown
Member Author

/ok to test 64f4023

@PointKernel

PointKernel commented Aug 4, 2026 •

Copy link
Copy Markdown
Member Author

NVBench comparison (1/2): scalar row comparators

Reference: upstream/main at 9f78795bca39f579acb660b87b1a765e569dd768; comparison: optimized sort-merge join at 93eb6beacaf2ebc92b87743894a7563e8eec9f5d, benchmark-only merged with the same baseline. Hardware: NVIDIA GH200 480GB, CUDA 13.3, driver 580.95.05.

Coverage: INT32, INT64, FLOAT32, and FLOAT64; nullable/non-nullable, both null modes, 1–3 keys, 10k/100k table sizes, and direct/remapped row comparators. Meaningful result: 208 faster, 4 slower, and 4 within the 5%/noise threshold.

Command: nvbench/scripts/nvbench_compare.py --threshold-diff 0.05 <main> <target>. Ref is main and Cmp is this change. The table contains rows with at least a 5% absolute difference. The final “Failure” count means a difference above measured noise in either direction, including FAST; it is not a regression count.

sort_merge_inner_join

[0] NVIDIA GH200 480GB

Nullable NullEquality DataType Algorithm num_keys left_size right_size use_key_remap skip_large_sizes Ref Time Ref Noise Cmp Time Cmp Noise Diff %Diff Status
0 NULLS_EQUAL INT32 SORT_MERGE 1 10000 10000 0 1 324.057 us 2.08% 228.875 us 3.66% -95.182 us -29.37% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 2 10000 10000 0 1 797.939 us 0.41% 439.712 us 0.99% -358.227 us -44.89% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 3 10000 10000 0 1 932.470 us 0.45% 483.111 us 0.86% -449.359 us -48.19% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 1 100000 10000 0 1 382.084 us 1.26% 246.180 us 1.60% -135.904 us -35.57% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 2 100000 10000 0 1 1.038 ms 0.30% 463.860 us 0.83% -574.361 us -55.32% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 3 100000 10000 0 1 1.234 ms 0.31% 514.009 us 0.64% -719.970 us -58.35% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 1 100000 100000 0 1 438.578 us 0.71% 271.727 us 0.99% -166.851 us -38.04% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 2 100000 100000 0 1 1.166 ms 0.38% 610.001 us 0.50% -555.891 us -47.68% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 3 100000 100000 0 1 1.311 ms 0.40% 648.790 us 0.58% -662.006 us -50.50% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 1 10000 10000 1 1 416.591 us 1.04% 318.398 us 1.46% -98.193 us -23.57% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 2 10000 10000 1 1 424.381 us 0.79% 325.835 us 1.24% -98.546 us -23.22% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 3 10000 10000 1 1 434.874 us 0.91% 342.272 us 1.00% -92.602 us -21.29% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 1 100000 10000 1 1 473.681 us 0.78% 341.456 us 1.11% -132.225 us -27.91% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 2 100000 10000 1 1 478.914 us 0.66% 348.233 us 0.66% -130.682 us -27.29% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 3 100000 10000 1 1 488.938 us 0.76% 359.495 us 1.31% -129.442 us -26.47% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 1 100000 100000 1 1 524.790 us 0.78% 368.247 us 0.99% -156.543 us -29.83% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 2 100000 100000 1 1 540.862 us 0.69% 382.867 us 1.38% -157.995 us -29.21% FAST
0 NULLS_EQUAL INT32 SORT_MERGE 3 100000 100000 1 1 547.028 us 1.42% 389.378 us 1.09% -157.650 us -28.82% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 1 10000 10000 0 1 390.051 us 0.86% 267.206 us 0.85% -122.845 us -31.49% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 2 10000 10000 0 1 826.002 us 0.39% 461.021 us 0.59% -364.981 us -44.19% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 3 10000 10000 0 1 977.712 us 0.30% 506.667 us 1.03% -471.045 us -48.18% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 1 100000 10000 0 1 454.759 us 0.75% 287.751 us 0.89% -167.008 us -36.72% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 2 100000 10000 0 1 1.085 ms 0.49% 486.003 us 0.75% -599.420 us -55.22% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 3 100000 10000 0 1 1.295 ms 0.32% 533.938 us 0.81% -761.449 us -58.78% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 1 100000 100000 0 1 512.140 us 0.50% 314.875 us 0.66% -197.265 us -38.52% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 2 100000 100000 0 1 1.216 ms 0.55% 640.677 us 0.45% -575.500 us -47.32% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 3 100000 100000 0 1 1.374 ms 0.53% 688.240 us 0.59% -685.492 us -49.90% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 1 10000 10000 1 1 413.643 us 1.14% 321.982 us 1.60% -91.661 us -22.16% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 2 10000 10000 1 1 424.177 us 0.61% 327.331 us 1.86% -96.846 us -22.83% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 3 10000 10000 1 1 433.530 us 0.78% 340.766 us 1.58% -92.764 us -21.40% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 1 100000 10000 1 1 472.905 us 0.99% 341.994 us 1.39% -130.911 us -27.68% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 2 100000 10000 1 1 481.362 us 0.72% 347.409 us 1.08% -133.953 us -27.83% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 3 100000 10000 1 1 494.540 us 0.80% 358.944 us 1.04% -135.596 us -27.42% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 1 100000 100000 1 1 520.516 us 0.59% 367.408 us 1.08% -153.108 us -29.41% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 2 100000 100000 1 1 532.770 us 1.09% 378.588 us 1.31% -154.182 us -28.94% FAST
0 NULLS_EQUAL INT64 SORT_MERGE 3 100000 100000 1 1 549.023 us 0.51% 388.201 us 1.02% -160.822 us -29.29% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 1 10000 10000 0 1 438.407 us 0.78% 286.870 us 1.44% -151.537 us -34.57% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 2 10000 10000 0 1 858.834 us 0.36% 468.313 us 0.74% -390.522 us -45.47% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 3 10000 10000 0 1 1.011 ms 0.69% 517.150 us 0.69% -493.639 us -48.84% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 1 100000 10000 0 1 504.036 us 0.74% 312.879 us 1.27% -191.157 us -37.93% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 2 100000 10000 0 1 1.119 ms 0.37% 497.577 us 0.83% -621.504 us -55.54% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 3 100000 10000 0 1 1.332 ms 0.21% 550.869 us 0.78% -781.262 us -58.65% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 1 100000 100000 0 1 565.502 us 0.62% 340.890 us 0.97% -224.612 us -39.72% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 2 100000 100000 0 1 1.247 ms 0.33% 654.103 us 0.53% -592.838 us -47.54% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 3 100000 100000 0 1 1.407 ms 0.39% 700.783 us 0.64% -706.094 us -50.19% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 1 10000 10000 1 1 410.645 us 0.67% 308.416 us 0.82% -102.229 us -24.89% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 2 10000 10000 1 1 426.369 us 0.87% 332.979 us 1.09% -93.390 us -21.90% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 3 10000 10000 1 1 432.517 us 1.20% 333.181 us 1.49% -99.337 us -22.97% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 1 100000 10000 1 1 473.118 us 0.79% 336.886 us 2.90% -136.231 us -28.79% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 2 100000 10000 1 1 487.874 us 0.74% 352.682 us 1.40% -135.193 us -27.71% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 3 100000 10000 1 1 495.350 us 0.72% 359.253 us 1.65% -136.097 us -27.47% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 1 100000 100000 1 1 528.266 us 0.60% 374.667 us 1.06% -153.599 us -29.08% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 2 100000 100000 1 1 535.812 us 0.67% 380.592 us 1.03% -155.220 us -28.97% FAST
0 NULLS_EQUAL FLOAT32 SORT_MERGE 3 100000 100000 1 1 549.370 us 0.91% 390.480 us 1.33% -158.890 us -28.92% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 1 10000 10000 0 1 546.218 us 0.87% 341.341 us 0.99% -204.877 us -37.51% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 2 10000 10000 0 1 900.943 us 0.25% 494.379 us 1.35% -406.564 us -45.13% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 3 10000 10000 0 1 1.065 ms 0.27% 547.229 us 0.61% -517.661 us -48.61% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 1 100000 10000 0 1 641.850 us 0.52% 369.983 us 0.75% -271.867 us -42.36% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 2 100000 10000 0 1 1.171 ms 0.48% 525.594 us 0.74% -645.146 us -55.11% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 3 100000 10000 0 1 1.402 ms 0.27% 582.591 us 0.72% -819.873 us -58.46% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 1 100000 100000 0 1 717.647 us 0.39% 415.983 us 1.02% -301.664 us -42.04% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 2 100000 100000 0 1 1.309 ms 0.43% 685.655 us 0.66% -623.443 us -47.62% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 3 100000 100000 0 1 1.480 ms 0.40% 733.568 us 0.45% -746.718 us -50.44% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 1 10000 10000 1 1 416.165 us 0.72% 319.415 us 1.25% -96.750 us -23.25% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 2 10000 10000 1 1 426.699 us 0.94% 330.787 us 1.38% -95.911 us -22.48% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 3 10000 10000 1 1 439.635 us 0.95% 342.529 us 1.14% -97.106 us -22.09% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 1 100000 10000 1 1 475.483 us 1.04% 341.551 us 1.03% -133.932 us -28.17% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 2 100000 10000 1 1 483.605 us 0.79% 348.128 us 0.83% -135.477 us -28.01% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 3 100000 10000 1 1 494.540 us 1.14% 360.521 us 1.15% -134.019 us -27.10% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 1 100000 100000 1 1 521.483 us 0.45% 369.383 us 0.88% -152.099 us -29.17% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 2 100000 100000 1 1 535.209 us 0.67% 381.537 us 1.30% -153.671 us -28.71% FAST
0 NULLS_EQUAL FLOAT64 SORT_MERGE 3 100000 100000 1 1 553.711 us 0.62% 390.321 us 1.55% -163.390 us -29.51% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 2 10000 10000 0 1 1.217 ms 0.32% 676.503 us 0.67% -540.268 us -44.40% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 3 10000 10000 0 1 1.463 ms 0.30% 771.860 us 0.44% -690.641 us -47.22% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 1 100000 10000 0 1 1.563 ms 0.22% 1.074 ms 0.81% -488.186 us -31.24% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 2 100000 10000 0 1 1.641 ms 0.25% 733.766 us 0.57% -906.973 us -55.28% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 3 100000 10000 0 1 1.949 ms 0.33% 830.620 us 0.69% -1118.500 us -57.38% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 1 100000 100000 0 1 9.413 ms 0.21% 4.268 ms 0.40% -5145.774 us -54.66% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 2 100000 100000 0 1 2.673 ms 0.22% 1.315 ms 0.52% -1357.616 us -50.79% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 3 100000 100000 0 1 2.431 ms 0.35% 1.268 ms 0.52% -1163.188 us -47.85% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 1 10000 10000 1 1 573.754 us 0.72% 667.442 us 3.80% 93.689 us 16.33% SLOW
1 NULLS_EQUAL INT32 SORT_MERGE 2 10000 10000 1 1 448.609 us 0.78% 362.214 us 1.31% -86.395 us -19.26% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 3 10000 10000 1 1 441.125 us 0.98% 342.226 us 1.09% -98.899 us -22.42% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 1 100000 10000 1 1 1.361 ms 0.36% 1.082 ms 1.92% -278.985 us -20.49% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 2 100000 10000 1 1 574.801 us 0.69% 397.831 us 0.92% -176.970 us -30.79% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 3 100000 10000 1 1 507.932 us 0.81% 365.008 us 1.33% -142.924 us -28.14% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 1 100000 100000 1 1 9.113 ms 0.23% 4.418 ms 7.25% -4695.168 us -51.52% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 2 100000 100000 1 1 1.334 ms 0.27% 719.888 us 2.46% -614.201 us -46.04% FAST
1 NULLS_EQUAL INT32 SORT_MERGE 3 100000 100000 1 1 622.183 us 0.48% 471.642 us 1.60% -150.542 us -24.20% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 2 10000 10000 0 1 1.268 ms 0.53% 713.573 us 0.95% -554.193 us -43.71% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 3 10000 10000 0 1 1.548 ms 0.37% 820.259 us 0.68% -728.111 us -47.02% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 1 100000 10000 0 1 1.583 ms 0.18% 1.094 ms 1.46% -489.344 us -30.91% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 2 100000 10000 0 1 1.714 ms 0.63% 764.178 us 0.67% -949.633 us -55.41% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 3 100000 10000 0 1 2.030 ms 0.31% 863.356 us 0.72% -1166.287 us -57.46% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 1 100000 100000 0 1 9.437 ms 0.23% 4.279 ms 0.44% -5158.284 us -54.66% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 2 100000 100000 0 1 2.741 ms 0.46% 1.350 ms 0.59% -1391.021 us -50.74% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 3 100000 100000 0 1 2.526 ms 0.76% 1.316 ms 0.90% -1209.828 us -47.90% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 1 10000 10000 1 1 568.826 us 0.49% 673.442 us 2.62% 104.617 us 18.39% SLOW
1 NULLS_EQUAL INT64 SORT_MERGE 2 10000 10000 1 1 450.924 us 0.77% 354.730 us 1.04% -96.194 us -21.33% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 3 10000 10000 1 1 440.375 us 0.73% 341.401 us 1.73% -98.975 us -22.48% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 1 100000 10000 1 1 1.357 ms 0.24% 1.097 ms 2.18% -260.843 us -19.22% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 2 100000 10000 1 1 573.666 us 0.55% 392.543 us 1.91% -181.123 us -31.57% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 3 100000 10000 1 1 500.411 us 0.86% 358.903 us 1.12% -141.507 us -28.28% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 1 100000 100000 1 1 9.100 ms 0.19% 4.434 ms 7.26% -4665.549 us -51.27% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 2 100000 100000 1 1 1.333 ms 0.32% 726.388 us 2.50% -606.654 us -45.51% FAST
1 NULLS_EQUAL INT64 SORT_MERGE 3 100000 100000 1 1 627.919 us 1.00% 472.051 us 1.32% -155.868 us -24.82% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 2 10000 10000 0 1 1.301 ms 0.27% 716.478 us 0.36% -584.077 us -44.91% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 3 10000 10000 0 1 1.559 ms 0.31% 817.828 us 0.33% -741.577 us -47.56% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 1 100000 10000 0 1 1.671 ms 0.24% 1.125 ms 0.84% -546.171 us -32.69% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 2 100000 10000 0 1 1.749 ms 0.26% 771.277 us 0.69% -978.081 us -55.91% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 3 100000 10000 0 1 2.075 ms 0.36% 871.975 us 0.69% -1202.817 us -57.97% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 1 100000 100000 0 1 9.528 ms 0.21% 4.329 ms 0.46% -5198.522 us -54.56% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 2 100000 100000 0 1 2.799 ms 0.25% 1.373 ms 0.48% -1425.889 us -50.95% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 3 100000 100000 0 1 2.581 ms 0.26% 1.340 ms 0.36% -1241.440 us -48.10% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 1 10000 10000 1 1 564.205 us 0.42% 662.816 us 2.70% 98.611 us 17.48% SLOW
1 NULLS_EQUAL FLOAT32 SORT_MERGE 2 10000 10000 1 1 446.855 us 0.75% 360.998 us 1.97% -85.857 us -19.21% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 3 10000 10000 1 1 441.341 us 1.08% 345.653 us 1.34% -95.687 us -21.68% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 1 100000 10000 1 1 1.358 ms 0.35% 1.074 ms 2.00% -284.211 us -20.93% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 2 100000 10000 1 1 576.763 us 0.73% 397.404 us 1.32% -179.359 us -31.10% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 3 100000 10000 1 1 504.449 us 0.77% 363.776 us 1.38% -140.673 us -27.89% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 1 100000 100000 1 1 9.103 ms 0.23% 4.456 ms 7.23% -4647.300 us -51.05% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 2 100000 100000 1 1 1.339 ms 0.28% 725.332 us 2.64% -613.485 us -45.82% FAST
1 NULLS_EQUAL FLOAT32 SORT_MERGE 3 100000 100000 1 1 625.949 us 0.53% 469.230 us 1.19% -156.719 us -25.04% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 2 10000 10000 0 1 1.355 ms 0.40% 754.311 us 0.63% -600.775 us -44.33% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 3 10000 10000 0 1 1.656 ms 0.35% 866.129 us 0.57% -789.919 us -47.70% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 1 100000 10000 0 1 1.686 ms 0.21% 1.141 ms 1.27% -545.254 us -32.33% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 2 100000 10000 0 1 1.827 ms 0.51% 825.347 us 8.53% -1001.390 us -54.82% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 3 100000 10000 0 1 2.171 ms 0.32% 925.881 us 0.35% -1245.331 us -57.36% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 1 100000 100000 0 1 9.546 ms 0.25% 4.339 ms 0.45% -5206.598 us -54.54% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 2 100000 100000 0 1 2.885 ms 0.47% 1.427 ms 0.60% -1458.254 us -50.54% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 3 100000 100000 0 1 2.691 ms 0.72% 1.406 ms 0.78% -1284.665 us -47.74% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 1 10000 10000 1 1 573.376 us 0.90% 667.716 us 2.51% 94.340 us 16.45% SLOW
1 NULLS_EQUAL FLOAT64 SORT_MERGE 2 10000 10000 1 1 454.599 us 0.92% 350.925 us 1.39% -103.675 us -22.81% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 3 10000 10000 1 1 444.953 us 1.16% 344.301 us 2.18% -100.652 us -22.62% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 1 100000 10000 1 1 1.359 ms 0.34% 1.088 ms 2.44% -271.147 us -19.95% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 2 100000 10000 1 1 578.060 us 0.57% 397.892 us 2.00% -180.167 us -31.17% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 3 100000 10000 1 1 507.948 us 0.69% 360.270 us 1.59% -147.678 us -29.07% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 1 100000 100000 1 1 9.107 ms 0.27% 4.515 ms 7.23% -4591.648 us -50.42% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 2 100000 100000 1 1 1.337 ms 0.24% 719.860 us 2.88% -617.437 us -46.17% FAST
1 NULLS_EQUAL FLOAT64 SORT_MERGE 3 100000 100000 1 1 626.626 us 0.74% 470.601 us 1.35% -156.026 us -24.90% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 1 10000 10000 0 1 656.544 us 1.24% 560.163 us 0.86% -96.381 us -14.68% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 2 10000 10000 0 1 1.050 ms 0.83% 712.091 us 1.51% -337.450 us -32.15% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 3 10000 10000 0 1 1.136 ms 0.58% 786.726 us 0.62% -349.149 us -30.74% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 1 100000 10000 0 1 703.546 us 1.17% 581.826 us 0.82% -121.719 us -17.30% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 2 100000 10000 0 1 1.184 ms 0.79% 728.729 us 0.93% -454.869 us -38.43% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 3 100000 10000 0 1 1.338 ms 0.62% 793.234 us 0.68% -544.430 us -40.70% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 1 100000 100000 0 1 776.173 us 0.93% 597.985 us 0.78% -178.188 us -22.96% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 2 100000 100000 0 1 1.300 ms 0.39% 857.761 us 0.55% -442.580 us -34.04% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 3 100000 100000 0 1 1.307 ms 0.53% 827.817 us 1.14% -479.213 us -36.66% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 1 10000 10000 1 1 479.661 us 1.06% 387.923 us 1.50% -91.738 us -19.13% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 2 10000 10000 1 1 475.457 us 0.58% 383.562 us 1.45% -91.895 us -19.33% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 3 10000 10000 1 1 480.468 us 1.25% 388.830 us 1.18% -91.638 us -19.07% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 1 100000 10000 1 1 542.921 us 1.21% 406.908 us 1.47% -136.013 us -25.05% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 2 100000 10000 1 1 536.818 us 1.03% 402.167 us 0.87% -134.651 us -25.08% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 3 100000 10000 1 1 537.873 us 0.95% 404.007 us 1.28% -133.866 us -24.89% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 1 100000 100000 1 1 583.923 us 0.78% 420.534 us 1.65% -163.389 us -27.98% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 2 100000 100000 1 1 584.885 us 0.85% 426.349 us 1.42% -158.537 us -27.11% FAST
1 NULLS_UNEQUAL INT32 SORT_MERGE 3 100000 100000 1 1 586.939 us 1.02% 422.314 us 1.70% -164.625 us -28.05% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 1 10000 10000 0 1 725.826 us 0.74% 600.794 us 0.81% -125.033 us -17.23% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 2 10000 10000 0 1 1.063 ms 1.12% 747.924 us 1.41% -314.595 us -29.61% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 3 10000 10000 0 1 1.149 ms 0.69% 798.089 us 1.14% -350.942 us -30.54% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 1 100000 10000 0 1 777.741 us 0.69% 606.951 us 0.91% -170.789 us -21.96% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 2 100000 10000 0 1 1.218 ms 0.49% 746.621 us 0.70% -471.262 us -38.70% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 3 100000 10000 0 1 1.375 ms 0.53% 809.889 us 1.27% -565.161 us -41.10% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 1 100000 100000 0 1 849.303 us 0.57% 649.847 us 0.81% -199.456 us -23.48% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 2 100000 100000 0 1 1.333 ms 0.47% 883.052 us 1.10% -449.913 us -33.75% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 3 100000 100000 0 1 1.333 ms 0.35% 844.090 us 1.11% -489.197 us -36.69% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 1 10000 10000 1 1 474.948 us 1.17% 376.746 us 1.01% -98.203 us -20.68% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 2 10000 10000 1 1 481.659 us 0.79% 383.321 us 0.88% -98.338 us -20.42% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 3 10000 10000 1 1 488.133 us 0.89% 389.610 us 1.19% -98.524 us -20.18% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 1 100000 10000 1 1 534.875 us 1.16% 398.335 us 1.40% -136.540 us -25.53% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 2 100000 10000 1 1 537.042 us 1.51% 401.985 us 1.32% -135.057 us -25.15% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 3 100000 10000 1 1 545.529 us 0.83% 407.414 us 1.11% -138.114 us -25.32% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 1 100000 100000 1 1 580.570 us 1.09% 422.319 us 1.08% -158.251 us -27.26% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 2 100000 100000 1 1 580.365 us 1.33% 426.976 us 1.17% -153.389 us -26.43% FAST
1 NULLS_UNEQUAL INT64 SORT_MERGE 3 100000 100000 1 1 589.168 us 0.67% 430.822 us 1.16% -158.346 us -26.88% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 1 10000 10000 0 1 767.322 us 1.30% 622.759 us 1.01% -144.562 us -18.84% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 2 10000 10000 0 1 1.095 ms 0.56% 747.534 us 0.75% -347.590 us -31.74% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 3 10000 10000 0 1 1.197 ms 0.48% 819.274 us 0.64% -377.392 us -31.54% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 1 100000 10000 0 1 824.333 us 1.08% 645.635 us 0.89% -178.698 us -21.68% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 2 100000 10000 0 1 1.245 ms 0.52% 748.412 us 1.47% -496.431 us -39.88% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 3 100000 10000 0 1 1.420 ms 0.67% 819.381 us 0.79% -600.583 us -42.30% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 1 100000 100000 0 1 900.983 us 0.65% 674.783 us 0.77% -226.201 us -25.11% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 2 100000 100000 0 1 1.357 ms 0.33% 903.283 us 0.52% -453.535 us -33.43% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 3 100000 100000 0 1 1.367 ms 0.37% 861.724 us 0.65% -505.372 us -36.97% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 1 10000 10000 1 1 472.535 us 1.14% 380.597 us 1.71% -91.938 us -19.46% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 2 10000 10000 1 1 475.599 us 0.84% 385.567 us 1.85% -90.032 us -18.93% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 3 10000 10000 1 1 477.227 us 0.67% 388.737 us 1.40% -88.490 us -18.54% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 1 100000 10000 1 1 533.691 us 1.02% 396.006 us 1.44% -137.684 us -25.80% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 2 100000 10000 1 1 539.421 us 0.98% 400.493 us 0.89% -138.928 us -25.76% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 3 100000 10000 1 1 540.614 us 1.00% 403.099 us 1.07% -137.516 us -25.44% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 1 100000 100000 1 1 582.569 us 1.05% 425.517 us 1.69% -157.052 us -26.96% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 2 100000 100000 1 1 583.263 us 1.13% 418.848 us 1.77% -164.415 us -28.19% FAST
1 NULLS_UNEQUAL FLOAT32 SORT_MERGE 3 100000 100000 1 1 585.792 us 0.82% 420.052 us 1.58% -165.740 us -28.29% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 1 10000 10000 0 1 875.943 us 0.81% 667.815 us 1.73% -208.128 us -23.76% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 2 10000 10000 0 1 1.109 ms 0.79% 755.580 us 0.64% -353.793 us -31.89% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 3 10000 10000 0 1 1.224 ms 0.35% 838.597 us 0.56% -385.812 us -31.51% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 1 100000 10000 0 1 949.332 us 0.82% 698.704 us 1.22% -250.628 us -26.40% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 2 100000 10000 0 1 1.282 ms 0.38% 771.583 us 1.25% -510.720 us -39.83% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 3 100000 10000 0 1 1.457 ms 0.37% 838.734 us 1.08% -618.046 us -42.43% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 1 100000 100000 0 1 1.047 ms 0.69% 746.300 us 1.09% -300.822 us -28.73% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 2 100000 100000 0 1 1.401 ms 0.48% 926.230 us 1.02% -474.521 us -33.88% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 3 100000 100000 0 1 1.419 ms 0.33% 885.683 us 0.79% -533.680 us -37.60% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 1 10000 10000 1 1 478.347 us 1.32% 383.970 us 2.16% -94.377 us -19.73% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 2 10000 10000 1 1 481.573 us 1.12% 387.808 us 1.67% -93.765 us -19.47% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 3 10000 10000 1 1 489.257 us 0.79% 391.510 us 1.21% -97.746 us -19.98% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 1 100000 10000 1 1 537.767 us 0.89% 399.075 us 1.28% -138.692 us -25.79% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 2 100000 10000 1 1 539.453 us 1.02% 403.253 us 1.40% -136.199 us -25.25% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 3 100000 10000 1 1 545.411 us 0.77% 397.802 us 1.79% -147.610 us -27.06% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 1 100000 100000 1 1 580.240 us 1.16% 415.079 us 1.93% -165.161 us -28.46% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 2 100000 100000 1 1 582.901 us 1.01% 419.777 us 1.10% -163.124 us -27.98% FAST
1 NULLS_UNEQUAL FLOAT64 SORT_MERGE 3 100000 100000 1 1 588.170 us 0.62% 422.963 us 0.74% -165.206 us -28.09% FAST

Summary

  • Total Matches: 216
    • Pass (diff <= min_noise): 0
    • Unknown (infinite noise): 0
    • Failure (diff > min_noise): 216

@PointKernel

Copy link
Copy Markdown
Member Author

NVBench comparison (2/2): string and nested row comparators

Reference: upstream/main at 9f78795bca39f579acb660b87b1a765e569dd768; comparison: optimized sort-merge join at 93eb6beacaf2ebc92b87743894a7563e8eec9f5d, benchmark-only merged with the same baseline. Hardware: NVIDIA GH200 480GB, CUDA 13.3, driver 580.95.05.

Coverage: STRING, LIST, and STRUCT; nullable/non-nullable, both null modes, 1–3 keys, 10k/100k table sizes, and direct/remapped row comparators. Meaningful result: 150 faster, 1 slower, and 11 within the 5%/noise threshold.

Across both comments, 358 of 378 measured cases are meaningfully faster, 15 are within threshold/noise, and 5 are slower. The five slower cases are nullable, NULLS_EQUAL, one-key, remapped 10k × 10k cases; their absolute increases are 98–137 µs.

Command: nvbench/scripts/nvbench_compare.py --threshold-diff 0.05 <main> <target>. Ref is main and Cmp is this change. The table contains rows with at least a 5% absolute difference. The final “Failure” count means a difference above measured noise in either direction, including FAST; it is not a regression count.

sort_merge_inner_join

[0] NVIDIA GH200 480GB

Nullable NullEquality DataType Algorithm num_keys left_size right_size use_key_remap skip_large_sizes Ref Time Ref Noise Cmp Time Cmp Noise Diff %Diff Status
0 NULLS_EQUAL STRING SORT_MERGE 1 10000 10000 0 1 2.286 ms 0.22% 1.145 ms 0.42% -1140.838 us -49.91% FAST
0 NULLS_EQUAL STRING SORT_MERGE 2 10000 10000 0 1 3.203 ms 0.23% 1.250 ms 0.72% -1953.477 us -60.98% FAST
0 NULLS_EQUAL STRING SORT_MERGE 3 10000 10000 0 1 4.055 ms 0.23% 1.308 ms 0.66% -2746.463 us -67.73% FAST
0 NULLS_EQUAL STRING SORT_MERGE 1 100000 10000 0 1 3.157 ms 0.18% 1.244 ms 0.36% -1912.652 us -60.59% FAST
0 NULLS_EQUAL STRING SORT_MERGE 2 100000 10000 0 1 4.468 ms 2.13% 1.378 ms 0.38% -3090.439 us -69.16% FAST
0 NULLS_EQUAL STRING SORT_MERGE 3 100000 10000 0 1 5.623 ms 0.15% 1.490 ms 0.32% -4132.678 us -73.50% FAST
0 NULLS_EQUAL STRING SORT_MERGE 1 100000 100000 0 1 3.105 ms 0.20% 1.573 ms 0.47% -1531.187 us -49.32% FAST
0 NULLS_EQUAL STRING SORT_MERGE 2 100000 100000 0 1 4.054 ms 0.36% 1.822 ms 0.65% -2232.032 us -55.05% FAST
0 NULLS_EQUAL STRING SORT_MERGE 3 100000 100000 0 1 4.803 ms 0.33% 1.978 ms 0.51% -2825.614 us -58.83% FAST
0 NULLS_EQUAL STRING SORT_MERGE 1 10000 10000 1 1 430.853 us 0.79% 337.579 us 1.50% -93.275 us -21.65% FAST
0 NULLS_EQUAL STRING SORT_MERGE 2 10000 10000 1 1 459.501 us 0.84% 365.953 us 1.71% -93.548 us -20.36% FAST
0 NULLS_EQUAL STRING SORT_MERGE 3 10000 10000 1 1 485.523 us 1.01% 391.306 us 1.39% -94.218 us -19.41% FAST
0 NULLS_EQUAL STRING SORT_MERGE 1 100000 10000 1 1 504.181 us 0.59% 369.925 us 2.42% -134.256 us -26.63% FAST
0 NULLS_EQUAL STRING SORT_MERGE 2 100000 10000 1 1 539.710 us 0.72% 399.273 us 1.27% -140.437 us -26.02% FAST
0 NULLS_EQUAL STRING SORT_MERGE 3 100000 10000 1 1 576.061 us 0.72% 431.587 us 1.39% -144.474 us -25.08% FAST
0 NULLS_EQUAL STRING SORT_MERGE 1 100000 100000 1 1 580.814 us 0.67% 420.715 us 0.83% -160.099 us -27.56% FAST
0 NULLS_EQUAL STRING SORT_MERGE 2 100000 100000 1 1 627.772 us 0.55% 465.866 us 1.12% -161.906 us -25.79% FAST
0 NULLS_EQUAL STRING SORT_MERGE 3 100000 100000 1 1 675.221 us 0.91% 514.517 us 0.77% -160.704 us -23.80% FAST
0 NULLS_EQUAL LIST SORT_MERGE 1 10000 10000 0 1 4.109 ms 0.34% 1.773 ms 1.25% -2336.163 us -56.86% FAST
0 NULLS_EQUAL LIST SORT_MERGE 2 10000 10000 0 1 6.639 ms 0.32% 2.183 ms 0.95% -4455.610 us -67.11% FAST
0 NULLS_EQUAL LIST SORT_MERGE 3 10000 10000 0 1 9.901 ms 0.38% 2.966 ms 1.01% -6935.083 us -70.05% FAST
0 NULLS_EQUAL LIST SORT_MERGE 1 100000 10000 0 1 5.106 ms 1.09% 1.717 ms 0.86% -3388.851 us -66.37% FAST
0 NULLS_EQUAL LIST SORT_MERGE 2 100000 10000 0 1 8.391 ms 0.36% 2.309 ms 0.75% -6082.496 us -72.49% FAST
0 NULLS_EQUAL LIST SORT_MERGE 3 100000 10000 0 1 12.531 ms 0.28% 3.138 ms 0.75% -9393.472 us -74.96% FAST
0 NULLS_EQUAL LIST SORT_MERGE 1 100000 100000 0 1 5.579 ms 0.98% 2.432 ms 1.24% -3147.475 us -56.41% FAST
0 NULLS_EQUAL LIST SORT_MERGE 2 100000 100000 0 1 7.463 ms 0.67% 3.050 ms 1.24% -4412.999 us -59.13% FAST
0 NULLS_EQUAL LIST SORT_MERGE 3 100000 100000 0 1 9.660 ms 0.95% 3.703 ms 1.67% -5956.768 us -61.67% FAST
0 NULLS_EQUAL LIST SORT_MERGE 1 10000 10000 1 1 524.953 us 1.19% 429.743 us 0.94% -95.210 us -18.14% FAST
0 NULLS_EQUAL LIST SORT_MERGE 2 10000 10000 1 1 679.649 us 0.91% 583.422 us 1.12% -96.227 us -14.16% FAST
0 NULLS_EQUAL LIST SORT_MERGE 3 10000 10000 1 1 859.783 us 0.68% 754.290 us 0.86% -105.493 us -12.27% FAST
0 NULLS_EQUAL LIST SORT_MERGE 1 100000 10000 1 1 610.052 us 0.77% 471.492 us 1.46% -138.560 us -22.71% FAST
0 NULLS_EQUAL LIST SORT_MERGE 2 100000 10000 1 1 780.588 us 0.77% 647.670 us 1.39% -132.917 us -17.03% FAST
0 NULLS_EQUAL LIST SORT_MERGE 3 100000 10000 1 1 973.693 us 0.47% 836.025 us 1.21% -137.668 us -14.14% FAST
0 NULLS_EQUAL LIST SORT_MERGE 1 100000 100000 1 1 1.544 ms 0.50% 1.383 ms 0.48% -161.622 us -10.47% FAST
0 NULLS_EQUAL LIST SORT_MERGE 2 100000 100000 1 1 2.264 ms 0.56% 2.104 ms 0.48% -160.548 us -7.09% FAST
0 NULLS_EQUAL LIST SORT_MERGE 3 100000 100000 1 1 3.024 ms 0.31% 2.868 ms 0.53% -155.708 us -5.15% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 1 10000 10000 0 1 2.808 ms 0.20% 1.043 ms 0.64% -1764.597 us -62.85% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 2 10000 10000 0 1 4.670 ms 0.14% 1.485 ms 0.49% -3184.666 us -68.20% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 3 10000 10000 0 1 6.521 ms 0.14% 1.926 ms 0.38% -4595.024 us -70.46% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 1 100000 10000 0 1 3.792 ms 0.26% 1.164 ms 0.72% -2628.365 us -69.31% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 2 100000 10000 0 1 6.454 ms 0.18% 1.699 ms 0.48% -4755.379 us -73.68% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 3 100000 10000 0 1 9.115 ms 0.24% 2.248 ms 0.43% -6867.520 us -75.34% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 1 100000 100000 0 1 3.481 ms 0.33% 1.500 ms 0.34% -1981.183 us -56.91% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 2 100000 100000 0 1 5.279 ms 0.24% 1.984 ms 0.36% -3294.438 us -62.41% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 3 100000 100000 0 1 7.124 ms 0.22% 2.492 ms 0.35% -4632.073 us -65.02% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 1 10000 10000 1 1 930.410 us 1.18% 828.270 us 1.17% -102.140 us -10.98% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 2 10000 10000 1 1 1.453 ms 5.45% 1.345 ms 8.09% -107.889 us -7.42% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 1 100000 10000 1 1 1.049 ms 0.82% 910.798 us 1.30% -137.860 us -13.15% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 2 100000 10000 1 1 1.599 ms 0.62% 1.465 ms 1.06% -134.853 us -8.43% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 3 100000 10000 1 1 2.179 ms 0.86% 2.050 ms 1.02% -129.395 us -5.94% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 1 100000 100000 1 1 1.183 ms 0.75% 1.028 ms 1.10% -154.492 us -13.06% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 2 100000 100000 1 1 1.831 ms 0.86% 1.682 ms 0.58% -148.644 us -8.12% FAST
0 NULLS_EQUAL STRUCT SORT_MERGE 3 100000 100000 1 1 2.470 ms 0.66% 2.318 ms 1.01% -151.931 us -6.15% FAST
1 NULLS_EQUAL STRING SORT_MERGE 1 10000 10000 0 1 1.998 ms 0.24% 1.316 ms 0.39% -681.895 us -34.13% FAST
1 NULLS_EQUAL STRING SORT_MERGE 2 10000 10000 0 1 3.445 ms 0.17% 1.616 ms 0.27% -1829.021 us -53.08% FAST
1 NULLS_EQUAL STRING SORT_MERGE 3 10000 10000 0 1 4.357 ms 0.16% 1.816 ms 0.32% -2541.440 us -58.32% FAST
1 NULLS_EQUAL STRING SORT_MERGE 1 100000 10000 0 1 3.487 ms 0.16% 1.757 ms 0.33% -1730.206 us -49.62% FAST
1 NULLS_EQUAL STRING SORT_MERGE 2 100000 10000 0 1 4.799 ms 0.21% 1.759 ms 0.32% -3040.327 us -63.35% FAST
1 NULLS_EQUAL STRING SORT_MERGE 3 100000 10000 0 1 5.968 ms 0.31% 1.999 ms 0.27% -3968.888 us -66.50% FAST
1 NULLS_EQUAL STRING SORT_MERGE 1 100000 100000 0 1 11.484 ms 0.20% 5.296 ms 0.42% -6187.989 us -53.88% FAST
1 NULLS_EQUAL STRING SORT_MERGE 2 100000 100000 0 1 5.612 ms 0.30% 2.718 ms 0.49% -2893.584 us -51.56% FAST
1 NULLS_EQUAL STRING SORT_MERGE 3 100000 100000 0 1 5.974 ms 6.20% 2.755 ms 0.34% -3218.658 us -53.88% FAST
1 NULLS_EQUAL STRING SORT_MERGE 1 10000 10000 1 1 705.186 us 0.59% 824.966 us 2.31% 119.780 us 16.99% SLOW
1 NULLS_EQUAL STRING SORT_MERGE 2 10000 10000 1 1 679.387 us 0.62% 562.959 us 1.21% -116.428 us -17.14% FAST
1 NULLS_EQUAL STRING SORT_MERGE 3 10000 10000 1 1 777.630 us 0.96% 664.314 us 1.62% -113.316 us -14.57% FAST
1 NULLS_EQUAL STRING SORT_MERGE 1 100000 10000 1 1 1.494 ms 0.43% 1.244 ms 1.83% -250.426 us -16.76% FAST
1 NULLS_EQUAL STRING SORT_MERGE 2 100000 10000 1 1 828.318 us 0.68% 629.994 us 1.38% -198.324 us -23.94% FAST
1 NULLS_EQUAL STRING SORT_MERGE 3 100000 10000 1 1 866.131 us 0.72% 712.559 us 1.45% -153.572 us -17.73% FAST
1 NULLS_EQUAL STRING SORT_MERGE 1 100000 100000 1 1 9.356 ms 0.14% 4.576 ms 7.02% -4780.170 us -51.09% FAST
1 NULLS_EQUAL STRING SORT_MERGE 2 100000 100000 1 1 1.619 ms 0.42% 990.659 us 2.19% -627.978 us -38.80% FAST
1 NULLS_EQUAL STRING SORT_MERGE 3 100000 100000 1 1 1.025 ms 0.43% 877.972 us 0.64% -146.733 us -14.32% FAST
1 NULLS_EQUAL LIST SORT_MERGE 1 10000 10000 0 1 3.395 ms 0.49% 1.983 ms 0.87% -1412.799 us -41.61% FAST
1 NULLS_EQUAL LIST SORT_MERGE 2 10000 10000 0 1 5.838 ms 0.28% 2.478 ms 0.70% -3359.456 us -57.55% FAST
1 NULLS_EQUAL LIST SORT_MERGE 3 10000 10000 0 1 9.286 ms 0.28% 3.259 ms 0.69% -6026.992 us -64.91% FAST
1 NULLS_EQUAL LIST SORT_MERGE 1 100000 10000 0 1 4.664 ms 1.19% 2.169 ms 0.41% -2494.541 us -53.48% FAST
1 NULLS_EQUAL LIST SORT_MERGE 2 100000 10000 0 1 7.538 ms 0.33% 2.660 ms 0.38% -4878.559 us -64.72% FAST
1 NULLS_EQUAL LIST SORT_MERGE 3 100000 10000 0 1 11.628 ms 0.45% 3.410 ms 0.65% -8218.182 us -70.67% FAST
1 NULLS_EQUAL LIST SORT_MERGE 1 100000 100000 0 1 6.954 ms 0.69% 3.153 ms 0.81% -3801.041 us -54.66% FAST
1 NULLS_EQUAL LIST SORT_MERGE 2 100000 100000 0 1 7.828 ms 0.47% 3.699 ms 1.04% -4129.069 us -52.75% FAST
1 NULLS_EQUAL LIST SORT_MERGE 3 100000 100000 0 1 9.888 ms 0.23% 4.275 ms 0.56% -5612.784 us -56.77% FAST
1 NULLS_EQUAL LIST SORT_MERGE 1 10000 10000 1 1 452.161 us 0.74% 353.987 us 1.08% -98.174 us -21.71% FAST
1 NULLS_EQUAL LIST SORT_MERGE 2 10000 10000 1 1 597.756 us 0.84% 498.870 us 1.49% -98.885 us -16.54% FAST
1 NULLS_EQUAL LIST SORT_MERGE 3 10000 10000 1 1 777.964 us 0.64% 675.971 us 0.58% -101.993 us -13.11% FAST
1 NULLS_EQUAL LIST SORT_MERGE 1 100000 10000 1 1 540.590 us 0.70% 405.730 us 0.84% -134.860 us -24.95% FAST
1 NULLS_EQUAL LIST SORT_MERGE 2 100000 10000 1 1 708.911 us 0.76% 569.630 us 1.03% -139.281 us -19.65% FAST
1 NULLS_EQUAL LIST SORT_MERGE 3 100000 10000 1 1 911.982 us 0.79% 776.063 us 0.57% -135.919 us -14.90% FAST
1 NULLS_EQUAL LIST SORT_MERGE 1 100000 100000 1 1 1.591 ms 0.29% 1.431 ms 0.35% -160.380 us -10.08% FAST
1 NULLS_EQUAL LIST SORT_MERGE 2 100000 100000 1 1 1.686 ms 0.23% 1.524 ms 0.31% -161.644 us -9.59% FAST
1 NULLS_EQUAL LIST SORT_MERGE 3 100000 100000 1 1 2.474 ms 0.24% 2.318 ms 0.54% -156.377 us -6.32% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 1 10000 10000 0 1 3.246 ms 0.22% 1.657 ms 0.36% -1588.960 us -48.95% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 2 10000 10000 0 1 5.216 ms 0.18% 2.153 ms 0.47% -3063.234 us -58.72% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 3 10000 10000 0 1 7.111 ms 0.22% 2.866 ms 0.37% -4244.387 us -59.69% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 1 100000 10000 0 1 5.034 ms 0.15% 2.184 ms 0.67% -2849.822 us -56.61% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 2 100000 10000 0 1 7.294 ms 0.25% 2.391 ms 0.50% -4902.881 us -67.22% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 3 100000 10000 0 1 10.004 ms 0.24% 3.167 ms 0.43% -6837.318 us -68.35% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 1 100000 100000 0 1 12.892 ms 0.20% 5.801 ms 0.30% -7090.620 us -55.00% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 2 100000 100000 0 1 7.962 ms 0.16% 3.540 ms 0.54% -4421.879 us -55.54% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 3 100000 100000 0 1 9.629 ms 0.23% 4.321 ms 0.28% -5307.938 us -55.12% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 1 100000 10000 1 1 2.314 ms 0.50% 2.035 ms 1.25% -278.624 us -12.04% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 2 100000 10000 1 1 2.492 ms 0.98% 2.283 ms 1.36% -209.633 us -8.41% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 1 100000 100000 1 1 10.186 ms 0.21% 5.263 ms 5.12% -4923.059 us -48.33% FAST
1 NULLS_EQUAL STRUCT SORT_MERGE 2 100000 100000 1 1 3.393 ms 0.54% 2.790 ms 0.77% -603.235 us -17.78% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 1 10000 10000 0 1 2.300 ms 0.47% 1.413 ms 1.20% -886.975 us -38.56% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 2 10000 10000 0 1 3.096 ms 0.46% 2.162 ms 104.47% -933.904 us -30.17% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 3 10000 10000 0 1 3.619 ms 0.33% 2.598 ms 186.35% -1021.824 us -28.23% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 1 100000 10000 0 1 3.036 ms 0.38% 1.466 ms 0.76% -1570.167 us -51.72% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 2 100000 10000 0 1 3.927 ms 0.24% 1.595 ms 0.90% -2332.511 us -59.40% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 3 100000 10000 0 1 4.557 ms 0.26% 1.726 ms 1.05% -2830.550 us -62.12% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 1 100000 100000 0 1 3.154 ms 0.28% 1.852 ms 0.29% -1302.751 us -41.30% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 2 100000 100000 0 1 3.590 ms 0.40% 1.956 ms 0.49% -1633.828 us -45.51% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 3 100000 100000 0 1 3.866 ms 0.26% 2.027 ms 0.49% -1838.277 us -47.55% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 1 10000 10000 1 1 592.550 us 1.17% 491.702 us 0.94% -100.848 us -17.02% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 2 10000 10000 1 1 711.759 us 0.76% 607.524 us 1.99% -104.235 us -14.64% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 3 10000 10000 1 1 815.325 us 1.40% 705.360 us 1.63% -109.965 us -13.49% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 1 100000 10000 1 1 655.361 us 1.75% 524.079 us 1.17% -131.282 us -20.03% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 2 100000 10000 1 1 784.896 us 0.83% 644.649 us 0.95% -140.247 us -17.87% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 3 100000 10000 1 1 887.395 us 0.85% 755.143 us 1.02% -132.252 us -14.90% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 1 100000 100000 1 1 718.388 us 0.85% 571.036 us 1.26% -147.353 us -20.51% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 2 100000 100000 1 1 848.959 us 0.85% 683.325 us 1.51% -165.634 us -19.51% FAST
1 NULLS_UNEQUAL STRING SORT_MERGE 3 100000 100000 1 1 967.978 us 0.90% 803.417 us 1.43% -164.561 us -17.00% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 1 10000 10000 0 1 2.957 ms 0.64% 2.067 ms 0.60% -890.757 us -30.12% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 2 10000 10000 0 1 4.068 ms 0.65% 2.826 ms 1.16% -1242.129 us -30.53% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 3 10000 10000 0 1 5.420 ms 0.82% 3.624 ms 1.05% -1796.569 us -33.15% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 1 100000 10000 0 1 4.085 ms 1.31% 2.215 ms 1.01% -1869.544 us -45.77% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 2 100000 10000 0 1 5.200 ms 0.54% 3.093 ms 0.90% -2107.149 us -40.52% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 3 100000 10000 0 1 6.743 ms 0.29% 3.983 ms 1.03% -2760.623 us -40.94% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 1 100000 100000 0 1 4.827 ms 0.70% 3.168 ms 1.62% -1659.353 us -34.37% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 2 100000 100000 0 1 5.676 ms 0.41% 3.928 ms 0.71% -1747.779 us -30.79% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 3 100000 100000 0 1 7.125 ms 0.68% 4.936 ms 0.73% -2189.301 us -30.73% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 1 10000 10000 1 1 523.599 us 1.01% 434.887 us 1.82% -88.711 us -16.94% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 2 10000 10000 1 1 674.159 us 0.80% 577.381 us 1.61% -96.778 us -14.36% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 3 10000 10000 1 1 849.392 us 0.67% 761.504 us 0.85% -87.888 us -10.35% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 1 100000 10000 1 1 614.818 us 0.75% 482.718 us 1.12% -132.100 us -21.49% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 2 100000 10000 1 1 789.903 us 0.67% 647.151 us 1.32% -142.752 us -18.07% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 3 100000 10000 1 1 981.153 us 0.77% 838.715 us 1.07% -142.438 us -14.52% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 1 100000 100000 1 1 1.672 ms 0.73% 1.512 ms 0.40% -160.357 us -9.59% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 2 100000 100000 1 1 1.763 ms 0.39% 1.605 ms 0.52% -157.857 us -8.96% FAST
1 NULLS_UNEQUAL LIST SORT_MERGE 3 100000 100000 1 1 2.545 ms 0.22% 2.388 ms 0.36% -156.740 us -6.16% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 1 10000 10000 0 1 3.300 ms 0.65% 1.880 ms 1.04% -1419.290 us -43.01% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 2 10000 10000 0 1 5.488 ms 0.54% 2.968 ms 0.87% -2520.021 us -45.92% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 3 10000 10000 0 1 7.588 ms 0.53% 4.537 ms 1.02% -3051.644 us -40.22% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 1 100000 10000 0 1 3.955 ms 0.40% 1.880 ms 1.37% -2074.397 us -52.45% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 2 100000 10000 0 1 6.296 ms 0.56% 3.000 ms 1.30% -3296.087 us -52.35% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 3 100000 10000 0 1 8.900 ms 0.41% 4.594 ms 0.95% -4306.090 us -48.38% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 1 100000 100000 0 1 3.711 ms 0.59% 2.394 ms 0.89% -1317.065 us -35.49% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 2 100000 100000 0 1 5.822 ms 0.54% 3.427 ms 0.55% -2394.941 us -41.14% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 3 100000 100000 0 1 6.618 ms 0.69% 4.149 ms 0.82% -2469.247 us -37.31% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 1 10000 10000 1 1 1.358 ms 0.66% 1.277 ms 1.35% -81.010 us -5.96% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 1 100000 10000 1 1 1.480 ms 0.92% 1.335 ms 1.32% -145.005 us -9.80% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 2 100000 10000 1 1 2.355 ms 1.38% 2.203 ms 0.97% -151.219 us -6.42% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 3 100000 10000 1 1 3.265 ms 0.41% 3.068 ms 1.15% -197.446 us -6.05% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 1 100000 100000 1 1 1.591 ms 0.54% 1.429 ms 0.88% -162.094 us -10.19% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 2 100000 100000 1 1 2.511 ms 1.09% 2.362 ms 1.09% -149.008 us -5.93% FAST
1 NULLS_UNEQUAL STRUCT SORT_MERGE 3 100000 100000 1 1 3.439 ms 0.47% 3.230 ms 1.51% -209.856 us -6.10% FAST

Summary

  • Total Matches: 162
    • Pass (diff <= min_noise): 0
    • Unknown (infinite noise): 0
    • Failure (diff > min_noise): 162

@PointKernel
PointKernel marked this pull request as ready for review August 4, 2026 21:44
@PointKernel
PointKernel requested a review from a team as a code owner August 4, 2026 21:44
@PointKernel PointKernel added the 3 - Ready for Review Ready for review by team label Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: aa9fa467-62e1-46d7-885c-120017499185

📥 Commits

Reviewing files that changed from the base of the PR and between 1079773 and 23a57b3.

📒 Files selected for processing (2)
  • cpp/src/join/sort_merge_join.cu
  • cpp/tests/join/join_tests.cpp
🚧 Files skipped from review as they are similar to previous changes (2)
  • cpp/tests/join/join_tests.cpp
  • cpp/src/join/sort_merge_join.cu

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Sort-merge joins now support simpler calls without specifying whether the left input is sorted.
    • Existing calls remain supported, with the older sortedness parameter deprecated.
  • Bug Fixes
    • Improved inner- and left-join matching, including correct unmatched-row handling.
    • Preserved probe-row order in join results, including partitioned joins and complex keys.
  • Performance
    • Streamlined matching and result generation to reduce unnecessary sorting and intermediate processing.
    • Improved CUDA stream and memory-resource handling for more efficient execution.

Walkthrough

The sort-merge join now indexes right-side key runs and uses bulk lower-bound searches to create per-row match ranges. Inner and left joins generate output directly from those ranges in probe-row order. Public APIs no longer require left-side sortedness.

Changes

Sort-merge join execution

Layer / File(s) Summary
Public API and join dispatch
cpp/include/cudf/join/sort_merge_join.hpp, cpp/src/join/sort_merge_join.hpp, cpp/src/join/sort_merge_join.cu
New overloads omit the left-sortedness argument. Deprecated compatibility overloads ignore that argument. Dispatch uses the updated merge interface.
Run indexing and execution environment
cpp/src/join/sort_merge_join.cu, cpp/src/join/sort_merge_join.hpp
CUB operations use the configured CUDA stream and device memory resource. The join stores right-side sorted-key run representatives and offsets.
Bulk match ranges and join outputs
cpp/src/join/sort_merge_join.cu
Bulk lower-bound searches produce match starts and counts. Inner and left joins construct outputs from those ranges and emit JoinNoMatch for unmatched rows.
Validation and updated call sites
cpp/tests/join/join_tests.cpp, cpp/tests/streams/join_test.cpp, cpp/benchmarks/join/*
Tests and benchmarks use the revised APIs. Tests add memory-resource, partitioned nested-struct, null-handling, index-mapping, list-join, and concurrent-operation coverage.

Estimated code review effort: 4 (Complex) | ~60 minutes

Suggested reviewers: simoneves, shrshi, mhaseeb123

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary optimization to reduce sort-merge join data passes.
Description check ✅ Passed The description directly explains the optimization, implementation changes, testing, and benchmark results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
cpp/src/join/sort_merge_join.hpp (1)

220-222: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Clarify the valid extent of the two run vectors.

Both vectors are allocated with the right table row count, but only a prefix is meaningful. right_run_rows holds num_right_runs valid entries. right_run_offsets holds num_right_runs + 1 valid entries, where the last entry is the row count sentinel. The current descriptions do not state this, so a reader could index either vector by size(). Extend the ///< comments to record the valid extent.

📝 Proposed documentation update
-  std::unique_ptr<rmm::device_uvector<size_type>> right_run_rows;     ///< First row of each key run
-  std::unique_ptr<rmm::device_uvector<size_type>> right_run_offsets;  ///< Sorted run boundaries
+  std::unique_ptr<rmm::device_uvector<size_type>>
+    right_run_rows;  ///< First row of each key run; only the first `num_right_runs` entries
+                     ///< are valid
+  std::unique_ptr<rmm::device_uvector<size_type>>
+    right_run_offsets;  ///< Start position of each run in sorted order; the first
+                        ///< `num_right_runs + 1` entries are valid and the last is the row count
As per coding guidelines: "Use doxygen as a documentation generator and linter for C++ and CUDA code."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/src/join/sort_merge_join.hpp` around lines 220 - 222, Update the
documentation comments for right_run_rows and right_run_offsets to state their
valid extents: right_run_rows contains num_right_runs entries, while
right_run_offsets contains num_right_runs + 1 entries including the row-count
sentinel. Leave the allocation and num_right_runs declaration unchanged.

Source: Coding guidelines

cpp/src/join/sort_merge_join.cu (2)

130-134: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add doxygen comments for the new file-local types.

right_run_index, build_right_run_index, and the range functors on Lines 190-272 have no doxygen comments. The neighboring functors in the same anonymous namespace (index_mapping, list_nonnull_filter, is_row_valid, is_row_null) all document their purpose and members. Add brief @brief blocks and member descriptions for consistency, in particular for the semantics of offsets (run start positions plus a trailing num_rows sentinel) and num_runs.

As per coding guidelines: "Use doxygen as a documentation generator and linter for C++ and CUDA code."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/src/join/sort_merge_join.cu` around lines 130 - 134, Add brief Doxygen
documentation for the file-local symbols right_run_index, build_right_run_index,
and the range functors in the indicated anonymous namespace, matching
neighboring functor style. Document right_run_index members, explicitly
describing offsets as run-start positions with a trailing num_rows sentinel and
num_runs as the number of runs, and include `@brief` descriptions of each symbol’s
purpose.

Source: Coding guidelines


291-293: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider device_span instead of raw pointer plus count.

unique_smaller_rows, smaller_run_offsets, and num_smaller_runs form a pointer-plus-size pair. device_span<size_type const> carries the size with the data and keeps the run count and the offsets array consistent at the call site.

As per coding guidelines: "Prefer span parameters over pointer-plus-size pairs".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/src/join/sort_merge_join.cu` around lines 291 - 293, Replace the raw
pointer and count representation for unique_smaller_rows, smaller_run_offsets,
and num_smaller_runs with an appropriate device_span<size_type const> parameter
or member. Update all construction and call sites to pass the span directly,
preserving the existing run count and offsets data consistently.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cpp/src/join/sort_merge_join.cu`:
- Around line 767-770: Document is_left_sorted as ignored in the public
declarations of inner_join, left_join, and inner_join_match_context, using
consistent wording. In cpp/src/join/sort_merge_join.cu lines 767-770, retain the
explanatory comment and define/reuse a named skip_probe_sort constant instead of
passing cudf::sorted::YES; apply that same constant at lines 800-803 and
890-893. Update the corresponding header declarations’ doxygen, with no direct
header changes beyond documenting the parameter’s ignored status.
- Around line 288-314: Reorder the member initializers in the merge constructor
so larger is initialized immediately after smaller, matching the declaration
order before sorted_smaller_order_begin and the remaining members.
- Around line 970-975: Update the DeviceTransform in the preprocessed-left-index
rebasing logic to add null_processed_table_start_idx rather than
left_partition_start_idx, ensuring UNEQUAL nested-null indices map from the
filtered slice to the correct rows. Declare the device lambda’s return type as
size_type, and add coverage for a nonzero partition with nested nulls.

---

Nitpick comments:
In `@cpp/src/join/sort_merge_join.cu`:
- Around line 130-134: Add brief Doxygen documentation for the file-local
symbols right_run_index, build_right_run_index, and the range functors in the
indicated anonymous namespace, matching neighboring functor style. Document
right_run_index members, explicitly describing offsets as run-start positions
with a trailing num_rows sentinel and num_runs as the number of runs, and
include `@brief` descriptions of each symbol’s purpose.
- Around line 291-293: Replace the raw pointer and count representation for
unique_smaller_rows, smaller_run_offsets, and num_smaller_runs with an
appropriate device_span<size_type const> parameter or member. Update all
construction and call sites to pass the span directly, preserving the existing
run count and offsets data consistently.

In `@cpp/src/join/sort_merge_join.hpp`:
- Around line 220-222: Update the documentation comments for right_run_rows and
right_run_offsets to state their valid extents: right_run_rows contains
num_right_runs entries, while right_run_offsets contains num_right_runs + 1
entries including the row-count sentinel. Leave the allocation and
num_right_runs declaration unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 029281af-489d-42ba-88b9-1645b04f3a04

📥 Commits

Reviewing files that changed from the base of the PR and between fb021d4 and 64f4023.

📒 Files selected for processing (2)
  • cpp/src/join/sort_merge_join.cu
  • cpp/src/join/sort_merge_join.hpp

Comment thread cpp/src/join/sort_merge_join.cu Resolved
Comment thread cpp/src/join/sort_merge_join.cu Resolved
Comment thread cpp/src/join/sort_merge_join.cu Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
cpp/src/join/sort_merge_join.cu (2)

160-161: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Avoid signed overflow when adding sentinel elements.

Each site adds one to a signed cudf::size_type before conversion. A table with INT32_MAX rows overflows before the allocator or span receives the length.

  • cpp/src/join/sort_merge_join.cu#L160-L161: use static_cast<std::size_t>(num_rows) + 1 for offsets.
  • cpp/src/join/sort_merge_join.cu#L380-L382: use static_cast<std::size_t>(larger_numrows) + 1 for match_counts.
  • cpp/src/join/sort_merge_join.cu#L769-L770: cast num_right_runs before adding the sentinel for the span length.
Proposed fix
-  auto offsets = std::make_unique<rmm::device_uvector<size_type>>(num_rows + 1, stream, temp_mr);
+  auto offsets = std::make_unique<rmm::device_uvector<size_type>>(
+    static_cast<std::size_t>(num_rows) + 1, stream, temp_mr);

-    cudf::detail::make_zeroed_device_uvector_async<size_type>(larger_numrows + 1, stream, mr);
+    cudf::detail::make_zeroed_device_uvector_async<size_type>(
+      static_cast<std::size_t>(larger_numrows) + 1, stream, mr);

-    right_run_offsets->data(), static_cast<std::size_t>(num_right_runs + 1)};
+    right_run_offsets->data(), static_cast<std::size_t>(num_right_runs) + 1};

As per coding guidelines, cudf::size_type is signed 32-bit and requires correct boundary handling.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/src/join/sort_merge_join.cu` around lines 160 - 161, Prevent signed
overflow when adding sentinel elements: in cpp/src/join/sort_merge_join.cu lines
160-161, size offsets with static_cast<std::size_t>(num_rows) + 1; at lines
380-382, use static_cast<std::size_t>(larger_numrows) + 1 for match_counts; and
at lines 769-770, cast num_right_runs to std::size_t before adding one for the
span length.

Source: Coding guidelines


858-902: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Preserve original probe-row order for filtered null rows.

For null_equality::UNEQUAL with nested nulls, Line 881 copies all valid probe-row results first. Lines 885-898 then append all filtered null rows. If a null row precedes a valid row, the returned index columns no longer follow original probe-row order.

Generate JoinNoMatch entries at each filtered row's original position. Add a regression case with interleaved valid and nested-null probe rows.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/src/join/sort_merge_join.cu` around lines 858 - 902, Update the
filtered-null result construction around preprocessed_left_indices so
JoinNoMatch entries are placed at each null probe row’s original position rather
than appended after valid results. Preserve the original probe-row order in both
result index vectors, and add a regression case covering interleaved valid and
nested-null probe rows.
🧹 Nitpick comments (1)
cpp/tests/join/join_tests.cpp (1)

1163-1186: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Make this test distinguish null_equality::UNEQUAL.

The only null left key is row 1, but the partition covers rows 2 and 3 ([2, 4)). The right table has no null key. Therefore, the expected indices remain unchanged if nested-null comparison is incorrect. Add a matching null key on the right and include row 1 in the partition, or assert the full match-count vector before partitioning.

As per coding guidelines: cpp/**/*_test.{cpp,cu} tests must cover nulls; this test should assert the nested-null result.

Suggested test data change
-  column_wrapper<int32_t> right_child{{30, 40, 50, 10}};
+  column_wrapper<int32_t> right_child{{30, 40, 50, 10, 20},
+                                       {true, true, true, true, false}};
...
-  auto partition_context = cudf::join_partition_context{std::move(match_context), 2, 4};
+  auto partition_context = cudf::join_partition_context{std::move(match_context), 1, 4};
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/tests/join/join_tests.cpp` around lines 1163 - 1186, Update
JoinTest.PartitionedInnerJoinWithNestedNullsUnequal so the test exercises
null_equality::UNEQUAL: add a null key to the right nested column and include
the left null row in the partition range, then assert that the null rows do not
match while preserving the existing non-null matches.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@cpp/src/join/sort_merge_join.cu`:
- Around line 160-161: Prevent signed overflow when adding sentinel elements: in
cpp/src/join/sort_merge_join.cu lines 160-161, size offsets with
static_cast<std::size_t>(num_rows) + 1; at lines 380-382, use
static_cast<std::size_t>(larger_numrows) + 1 for match_counts; and at lines
769-770, cast num_right_runs to std::size_t before adding one for the span
length.
- Around line 858-902: Update the filtered-null result construction around
preprocessed_left_indices so JoinNoMatch entries are placed at each null probe
row’s original position rather than appended after valid results. Preserve the
original probe-row order in both result index vectors, and add a regression case
covering interleaved valid and nested-null probe rows.

---

Nitpick comments:
In `@cpp/tests/join/join_tests.cpp`:
- Around line 1163-1186: Update
JoinTest.PartitionedInnerJoinWithNestedNullsUnequal so the test exercises
null_equality::UNEQUAL: add a null key to the right nested column and include
the left null row in the partition range, then assert that the null rows do not
match while preserving the existing non-null matches.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a817a048-2504-428b-adcf-fc0098f1658a

📥 Commits

Reviewing files that changed from the base of the PR and between 64f4023 and 3918a85.

📒 Files selected for processing (8)
  • cpp/benchmarks/join/join_on_int32.cu
  • cpp/benchmarks/join/multiplicity_join.cpp
  • cpp/benchmarks/join/sort_merge_join.cpp
  • cpp/include/cudf/join/sort_merge_join.hpp
  • cpp/src/join/sort_merge_join.cu
  • cpp/src/join/sort_merge_join.hpp
  • cpp/tests/join/join_tests.cpp
  • cpp/tests/streams/join_test.cpp

@shrshi shrshi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clever idea! The speedup is remarkable 🚀

Comment thread cpp/src/join/sort_merge_join.cu Resolved
Comment thread cpp/src/join/sort_merge_join.cu Resolved
@PointKernel

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit 79b7e5c into NVIDIA:main Aug 10, 2026
135 checks passed
@PointKernel
PointKernel deleted the optimize-sort-merge-join branch August 10, 2026 16:33
ttnghia pushed a commit to NVIDIA/cudf-spark-jni that referenced this pull request Sep 11, 2026
Fixes #5107.

This [cuDF PR](NVIDIA/cudf#23985) removed the
`-Wno-error=deprecated-declarations` compile flag so all warnings are
errors in C++ builds. This PR fixes the deprecation error for
inner-join, and adds an overloaded function for the java cudf-spark
interface that doesn't have the parameter. That way this doesn't break
the cudf-spark build while we change it there, and can come back and
delete the extra function here afterwards.

[This cuDF PR](NVIDIA/cudf#23532) is the
inner-join change. It changes the algorithm such that the probe (left)
table no longer needs to be sorted, so this extra parameter is
irrelevant.

---------

Signed-off-by: Paul Mattione <[email protected]>
rapids-bot Bot pushed a commit that referenced this pull request Sep 28, 2026
…#24202)

This PR removes the deprecated `cudf::sort_merge_join::inner_join`, `left_join`, and `inner_join_match_context` overloads that take an ignored `sorted is_left_sorted` parameter. These were deprecated in 26.10 by #23532.

Authors:
  - Yunsong Wang (https://github.com/PointKernel)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Nghia Truong (https://github.com/ttnghia)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #24202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Performance Performance related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants