Add support for not nullable columns in delta lake #13436
Add support for not nullable columns in delta lake #13436ebyhr merged 1 commit intotrinodb:masterfrom
Conversation
8d63629 to
9d0b2ef
Compare
9d0b2ef to
228f85b
Compare
There was a problem hiding this comment.
Can you please uncomment the assertion and let the query succeed?
and add a TODO explaining what the expected result should be?
this would ensure this code gets updated when the bug is fixed
228f85b to
2731828
Compare
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeMinioConnectorTest.java
Outdated
Show resolved
Hide resolved
104423d to
19fae37
Compare
|
Can you add a compatibility test that Databricks respects when Trino sets the non-null flag and vise versa. Besides that, LGTM |
|
Question: What happens if the nullability is changed remotely and the connector writes rows within |
19fae37 to
6e52723
Compare
So I expected it will be a problem but I added a test and it works - trino can't insert null into non nullable column. |
|
The cache auto-invalidates if a new transaction has been written to the log |
Yes I know but in this case nothing new is written, or altering column is a transaction ? I guess that must be the case |
Yep, it is in Delta. Still good to have the test through |
fdb69ef to
65347b7
Compare
65347b7 to
aa07dfe
Compare
|
@ebyhr thanks for running these tests I forgot to remove test that checks if we can write into tables with non nullable columns. Now it should be fine |
|
@ebyhr tests passed can we merge it now ? |
aa07dfe to
315b099
Compare
|
Rebased on upstream to resolve conflicts. Let me merge after CI completion. |
|
I confirmed new |
|
Merged, thanks! |
|
Are there other column constraints that would make sense to document alongside this? Or is it a unique/one-off thing? |
I'd say this is a unique case, at least for now. Also keep in mind this is not delta specific. Non nullness should be supported for many connectors |
|
Our |
oh sorry, I must have missed that. BTW assumption is not correct. It is connector specific as connector must support nullability |
Description
In delta lake add support for tables that have non nullable columns.
new feature
a connector
During creation of table you can specify if column can store NULL values.
Related issues, pull requests, and links
#12635
Documentation
( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(x) Release notes entries required with the following suggested text: