diff --git a/lib/debezium/schema.go b/lib/debezium/schema.go index b6a53ed2e..365750020 100644 --- a/lib/debezium/schema.go +++ b/lib/debezium/schema.go @@ -66,8 +66,8 @@ type Field struct { FieldName string `json:"field"` DebeziumType SupportedDebeziumType `json:"name"` Parameters map[string]any `json:"parameters"` - // [Items] is only populated if the literal type is an array. - Items Item `json:"items"` + // [ItemsMetadata] is only populated if the literal type is an array. + ItemsMetadata Item `json:"items"` } func (f Field) GetScaleAndPrecision() (int32, *int32, error) { @@ -146,7 +146,7 @@ func (f Field) ToValueConverter() (converters.ValueConverter, error) { switch f.Type { case Array: - return converters.NewArray(f.Items.DebeziumType == JSON), nil + return converters.NewArray(f.ItemsMetadata.DebeziumType == JSON), nil case Double, Float: return converters.Float64{}, nil } diff --git a/lib/debezium/types_test.go b/lib/debezium/types_test.go index e9fc22a1e..8196057fd 100644 --- a/lib/debezium/types_test.go +++ b/lib/debezium/types_test.go @@ -174,7 +174,7 @@ func TestField_ParseValue(t *testing.T) { } { // Array - field := Field{Type: Array, Items: Item{DebeziumType: JSON}} + field := Field{Type: Array, ItemsMetadata: Item{DebeziumType: JSON}} value, err := field.ParseValue([]any{`{"foo": "bar", "foo": "bar"}`, `{"hello": "world"}`}) assert.NoError(t, err) assert.Len(t, value.([]any), 2)