From 1d1901862078933155f55a6cfabe69e631ed2f6c Mon Sep 17 00:00:00 2001 From: Yahor Yuzefovich Date: Tue, 2 Jul 2019 16:01:18 -0700 Subject: [PATCH] exec: fix an error with vectorized testing infrastructure 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 --- pkg/sql/distsqlrun/columnar_utils_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sql/distsqlrun/columnar_utils_test.go b/pkg/sql/distsqlrun/columnar_utils_test.go index d81718313522..378a635071bd 100644 --- a/pkg/sql/distsqlrun/columnar_utils_test.go +++ b/pkg/sql/distsqlrun/columnar_utils_test.go @@ -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)