confluentinc / kafka-connect-datagen

Connector that generates data for demos
Apache License 2.0
19 stars 87 forks source link

RCCA-8574: Handle default value as null for complex data types #115

Closed skaushikcflt closed 2 years ago

skaushikcflt commented 2 years ago

Problem

Complex schema type such as array, struct, maps having default value as null is causing a NPE

Solution

When a complex schema type is received, we further expand it to get to native data types by typecasting the value. Before typecasting the value, we should check for the null value and return if a null value is found

Does this solution apply anywhere else?
If yes, where?

Test Strategy

Testing done:

Release Plan

venkatteki commented 2 years ago

@skaushikcflt General practice is not to do commit --amend

skaushikcflt commented 2 years ago

Will raise a new PR without quickstart changes.