Hi
we are trying to stream data from mongo source, our messages looks as follows:
{
_id: 1,
guests: [
{
name: "john",
features: [
{
a: "some_string"
}
]
},
{
name: "doe",
features: []
}
]
}
As you can see, the "features" sub-array is of type struct. However, when we try to CDC on this document, debezium crashes with the following error:
org.apache.kafka.connect.errors.DataException: Not a struct schema: Schema{STRING}
From my testing, I was able to see that the crash happpens when at least one element is populated and at least one is empty.
I suspect that this issue arises because the MongoDataConverter can't correctly parse arrays of type struct when one of the elements is empty.