From 6bb4ff135fab01c5b3dae9045dede0fdc4898d59 Mon Sep 17 00:00:00 2001 From: Robert Yokota Date: Mon, 19 Aug 2024 10:56:03 -0700 Subject: [PATCH] Minor fix to include signed ints in Protobuf transform (#10) (#1276) --- schemaregistry/serde/protobuf/protobuf_util.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/schemaregistry/serde/protobuf/protobuf_util.go b/schemaregistry/serde/protobuf/protobuf_util.go index 19756dc9d..fa64c36a0 100644 --- a/schemaregistry/serde/protobuf/protobuf_util.go +++ b/schemaregistry/serde/protobuf/protobuf_util.go @@ -117,9 +117,11 @@ func getType(fd protoreflect.FieldDescriptor) serde.FieldType { return serde.TypeString case protoreflect.BytesKind: return serde.TypeBytes - case protoreflect.Int32Kind, protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind: + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Uint32Kind, + protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind: return serde.TypeInt - case protoreflect.Int64Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind: + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Uint64Kind, + protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind: return serde.TypeLong case protoreflect.FloatKind: return serde.TypeFloat