diff --git a/test/testdrive/kafka-avro-sinks-defaults.td b/test/testdrive/kafka-avro-sinks-defaults.td index 0cb99951a0562..32a4453e283f8 100644 --- a/test/testdrive/kafka-avro-sinks-defaults.td +++ b/test/testdrive/kafka-avro-sinks-defaults.td @@ -21,7 +21,7 @@ $ set upsert-keyschema={ "name": "Key", "fields": [ {"name": "key1", "type": "string"}, - {"name": "key2", "type": "long"} + {"name": "key2", "type": ["null", "long"]} ] } @@ -30,15 +30,15 @@ $ set upsert-schema={ "name" : "test", "fields" : [ {"name":"f1", "type":["null", "string"]}, - {"name":"f2", "type":"long"} + {"name":"f2", "type":["long", "null"]} ] } $ kafka-create-topic topic=upsert-avro $ kafka-ingest format=avro topic=upsert-avro key-format=avro key-schema=${upsert-keyschema} schema=${upsert-schema} -{"key1": "fish", "key2": 2} {"f1": {"string": "fish"}, "f2": 1000} -{"key1": "fisch", "key2": 42} {"f1": null, "f2": 1000} +{"key1": "fish", "key2": {"long": 2}} {"f1": {"string": "fish"}, "f2": {"long": 1000}} +{"key1": "fisch", "key2": {"long": 42}} {"f1": null, "f2": {"long": 1000}} > CREATE CONNECTION kafka_conn TO KAFKA (BROKER '${testdrive.kafka-addr}'); @@ -62,7 +62,7 @@ $ kafka-ingest format=avro topic=upsert-avro key-format=avro key-schema=${upsert ENVELOPE UPSERT $ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink1-${testdrive.seed}-value -{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":"long"},{"name":"f1","type":["null","string"],"default":"null"},{"name":"f2","type":"long"}]} +{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":["null","long"],"default":"null"},{"name":"f1","type":["null","string"],"default":"null"},{"name":"f2","type":["null","long"],"default":"null"}]} > CREATE SINK upsert_input_sink2 FROM upsert_input @@ -75,7 +75,7 @@ $ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink1-$ ENVELOPE UPSERT $ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink2-${testdrive.seed}-value -{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":"long"},{"name":"f1","type":["null","string"],"default":"null"},{"name":"f2","type":"long"}]} +{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":["null","long"],"default":"null"},{"name":"f1","type":["null","string"],"default":"null"},{"name":"f2","type":["null","long"],"default":"null"}]} > CREATE SINK upsert_input_sink3 FROM upsert_input @@ -88,7 +88,7 @@ $ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink2-$ ENVELOPE UPSERT $ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink3-${testdrive.seed}-value -{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":"long"},{"name":"f1","type":["null","string"]},{"name":"f2","type":"long"}]} +{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":["null","long"]},{"name":"f1","type":["null","string"]},{"name":"f2","type":["null","long"]}]} > CREATE SINK upsert_input_sink4 FROM upsert_input INTO KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-upsert-input-sink4-${testdrive.seed}') @@ -97,4 +97,4 @@ $ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink3-$ ENVELOPE UPSERT $ schema-registry-verify schema-type=avro subject=testdrive-upsert-input-sink4-${testdrive.seed}-value -{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":"long"},{"name":"f1","type":["null","string"]},{"name":"f2","type":"long"}]} +{"type":"record","name":"envelope","fields":[{"name":"key1","type":"string"},{"name":"key2","type":["null","long"]},{"name":"f1","type":["null","string"]},{"name":"f2","type":["null","long"]}]}