jhc-systems / debezium-connector-ibmi

Debezium Connector for IBM i (AS/400)
16 stars 13 forks source link

quick fix for default null values #7

Closed msillence closed 2 years ago

msillence commented 2 years ago

I think this looks okay. What was the new bit, exactly? The check for the string "NULL"?

So if you specify the default value as null in the DDL it puts the text "NULL" in the default value column if you don't specify the default value it will be null and it is null in the default value column

msillence commented 2 years ago

This turns out to be messier the more I look at it: CREATE TABLE msdevt.tdefault ( id int, val varchar(100) DEFAULT 'test', PRIMARY KEY (id) );

INSERT INTO msdevt.tdefault (id) VALUES (1); INSERT INTO msdevt.tdefault (id, val) VALUES (2, null); INSERT INTO msdevt.tdefault (id, val) VALUES (3, 'abc');

results in the DB: 1, test 2, null 3, abc

results in kafka: 1, test 2, test 3, abc