diff --git a/proto/column.go b/proto/column.go index 9e00cc72..8ce75d12 100644 --- a/proto/column.go +++ b/proto/column.go @@ -320,7 +320,7 @@ func (s *ColInfoInput) DecodeResult(r *Reader, version int, b Block) error { return errors.Wrapf(err, "column [%d] custom serialization", i) } if customSerialization { - return errors.Wrapf(err, "column [%d] has custom serialization (not supported)", i) + return errors.Errorf("column [%d] has custom serialization (not supported)", i) } } *s = append(*s, ColInfo{ diff --git a/proto/column_test.go b/proto/column_test.go index 227b0ea2..c7dc6fc8 100644 --- a/proto/column_test.go +++ b/proto/column_test.go @@ -35,6 +35,23 @@ func checkWriteColumn(data ColInput) func(*testing.T) { } } +func TestColInfoInput_DecodeResult(t *testing.T) { + t.Run("custom serialization", func(t *testing.T) { + var b Buffer + b.PutString("column") + b.PutString("String") + b.PutBool(true) + + var got ColInfoInput + err := got.DecodeResult( + b.Reader(), + FeatureCustomSerialization.Version(), + Block{Columns: 1}, + ) + require.EqualError(t, err, "column [0] has custom serialization (not supported)") + }) +} + func TestColumnType_Elem(t *testing.T) { t.Run("Array", func(t *testing.T) { v := ColumnTypeInt16.Array()