Skip to content

Commit f69d669

Browse files
committed
rowexec: fix JoinReader benchmarks
We recently added an assertion that the lookup join with "equality columns are key" property never fetches more than one lookup row for each input row. In a couple of existing benchmarks this fact was violated, so this commit fixes the issue. Namely, previously we set it to indicate that we want cross-range parallelism, but now we actually have a separate boolean on the processor spec, which makes the fix simple. Release note: None
1 parent 08d1e04 commit f69d669

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pkg/sql/rowexec/joinreader_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,8 +1814,9 @@ func benchmarkJoinReader(b *testing.B, bc JRBenchConfig) {
18141814

18151815
spec := execinfrapb.JoinReaderSpec{
18161816
FetchSpec: fetchSpec,
1817-
LookupColumnsAreKey: parallel,
1817+
LookupColumnsAreKey: parallel && columnDef.matchesPerLookupRow == 1,
18181818
MaintainOrdering: reqOrdering,
1819+
Parallelize: parallel,
18191820
}
18201821
if lookupExpr {
18211822
// @1 is the column in the input, @2 is the only fetched column.
@@ -2026,9 +2027,10 @@ func BenchmarkJoinReaderLookupStress(b *testing.B) {
20262027
b.Fatal(err)
20272028
}
20282029
spec := execinfrapb.JoinReaderSpec{
2029-
FetchSpec: fetchSpec,
2030-
LookupColumnsAreKey:/*parallel=*/ true,
2031-
MaintainOrdering:/*reqOrdering=*/ false,
2030+
FetchSpec: fetchSpec,
2031+
LookupColumnsAreKey: true,
2032+
MaintainOrdering: false,
2033+
Parallelize: true,
20322034
}
20332035
lookupExprString := "@1 = @2"
20342036
for i := 0; i < numExprs; i++ {

0 commit comments

Comments
 (0)