mack icon indicating copy to clipboard operation
mack copied to clipboard

Add unit tests for constraint_append not null constraints

Open MrPowers opened this issue 2 years ago • 5 comments

Make sure the constraint_append function works well for NOT NULL constraints in the test suite.

See this blog post for more on NOT NULL constraints: https://delta.io/blog/2022-11-21-delta-lake-contraints-check/

MrPowers avatar Mar 11 '23 18:03 MrPowers

I'd be happy to add these tests, can you assign it to me please?

cs23andris avatar Mar 12 '23 07:03 cs23andris

@cs23andris Great, assigned you!

robertkossendey avatar Mar 12 '23 07:03 robertkossendey

Unfortunately, NOT NULL constraints are not checked in the current implementation of the constraint_append function, because they're not stored as delta table properties but with the table schema. I think it'd be nice to extend the constraint_append to check for the nullability of columns as well. Can I proceed with that in this issue?

cs23andris avatar Mar 18 '23 05:03 cs23andris

Sounds good and thank you @cs23andris, feel free to work on this! :)

robertkossendey avatar Mar 18 '23 12:03 robertkossendey

Awesome, glad we have unit tests to check the edge cases. Thanks for working on this one @cs23andris.

MrPowers avatar Mar 18 '23 12:03 MrPowers