Skip to content

Commit 938ed7a

Browse files
committed
fix CompareBatch
1 parent a522c33 commit 938ed7a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/testutil/util_compare.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func CompareBatches(t *testing.T, expected, actual *batch.Batch) {
9696
return
9797
}
9898
if expected == nil || actual == nil {
99-
t.Fatalf("one batch is nil, the other is not. Expected: %!v(MISSING), Actual: %!v(MISSING)", expected, actual)
99+
t.Fatalf("one batch is nil, the other is not. Expected: %v, Actual: %v", expected, actual)
100100
}
101101

102102
require.Equal(t, expected.RowCount(), actual.RowCount(), "row count mismatch")
@@ -106,11 +106,11 @@ func CompareBatches(t *testing.T, expected, actual *batch.Batch) {
106106
require.Equal(t, len(expected.Attrs), len(actual.Attrs), "attribute count mismatch")
107107

108108
for i := range expected.Attrs {
109-
require.Equal(t, expected.Attrs[i], actual.Attrs[i], "attribute name mismatch at index %!d(MISSING)", i)
109+
require.Equal(t, expected.Attrs[i], actual.Attrs[i], "attribute name mismatch at index %d", i)
110110
}
111111

112112
for i := range expected.Vecs {
113-
require.True(t, CompareVectors(expected.Vecs[i], actual.Vecs[i]), "vector content mismatch at index %!d(MISSING)", i)
113+
require.True(t, CompareVectors(expected.Vecs[i], actual.Vecs[i]), "vector content mismatch at index %d", i)
114114
}
115115

116116
require.Equal(t, len(expected.Aggs), len(actual.Aggs), "aggregator count mismatch")
@@ -119,6 +119,6 @@ func CompareBatches(t *testing.T, expected, actual *batch.Batch) {
119119
require.NoError(t, err)
120120
actualBytes, err := aggexec.MarshalAggFuncExec(actual.Aggs[i])
121121
require.NoError(t, err)
122-
require.Equal(t, expectedBytes, actualBytes, "aggregator state mismatch at index %!d(MISSING)", i)
122+
require.Equal(t, expectedBytes, actualBytes, "aggregator state mismatch at index %d", i)
123123
}
124124
}

0 commit comments

Comments
 (0)