Skip to content

Commit

Permalink
exec: fix an error with vectorized testing infrastructure
Browse files Browse the repository at this point in the history
Previously, when the output of an operator was compared against
the output of a processor as set comparison (i.e. with any order
of rows), we would accumulate the rows "as is" - without deep copy.
But because the underlying memory is almost certain to be reused,
we need to accumulate the copies of the output rows. Now this is
fixed.

Release note: None
  • Loading branch information
yuzefovich committed Jul 2, 2019
1 parent 69fc2b9 commit 1d19018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/sql/distsqlrun/columnar_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ func verifyColOperator(
if anyOrder {
// We accumulate all the rows to be matched using set comparison when
// both "producers" are done.
procRows = append(procRows, rowProc)
colOpRows = append(colOpRows, rowColOp)
procRows = append(procRows, rowProc.Copy())
colOpRows = append(colOpRows, rowColOp.Copy())
} else {
// anyOrder is false, so the result rows must match in the same order.
expStr := rowProc.String(outputTypes)
Expand Down

0 comments on commit 1d19018

Please sign in to comment.