Repository: ArroyoSystems/arroyo (language: rust)

Issue:
Kafka connect schemas should not include unsigned numeric types
Kafka connect (as a Java system) only supports signed types, but currently we generate schemas that differentiate between signed and unsigned integers. We should instead always return signed types (int16, int32, int164) when generating connect json schemas.


Discussion / hints:

Fix patch:
diff --git a/arroyo-worker/src/formats.rs b/arroyo-worker/src/formats.rs
index 24b2bc310..323ad294e 100644
--- a/arroyo-worker/src/formats.rs
+++ b/arroyo-worker/src/formats.rs
@@ -366,9 +366,9 @@ fn field_to_kafka_json(field: &Field) -> Value {
         Null => todo!(),
         Boolean => "boolean",
         Int8 | UInt8 => "int8",
-        Int16 | UInt16 => "uint16",
-        Int32 | UInt32 => "uint32",
-        Int64 | UInt64 => "uint64",
+        Int16 | UInt16 => "int16",
+        Int32 | UInt32 => "int32",
+        Int64 | UInt64 => "int64",
         Float16 | Float32 => "float",
         Float64 => "double",
         Utf8 | LargeUtf8 => "string",


Test patch: