Skip to content

Disallow adding not null column when Delta Lake table is not empty#13785

Merged
ebyhr merged 1 commit intotrinodb:masterfrom
ebyhr:ebi/delta-add-not-null-column
Aug 23, 2022
Merged

Disallow adding not null column when Delta Lake table is not empty#13785
ebyhr merged 1 commit intotrinodb:masterfrom
ebyhr:ebi/delta-add-not-null-column

Conversation

@ebyhr
Copy link
Copy Markdown
Member

@ebyhr ebyhr commented Aug 23, 2022

Description

Relates to #13587

Documentation

(x) No documentation is needed.

Release notes

(x) Release notes entries required with the following suggested text:

# Delta Lake
* Disallow adding a `NOT NULL` column when the table is not empty. ({issue}`13785`)

@cla-bot cla-bot bot added the cla-signed label Aug 23, 2022
@ebyhr
Copy link
Copy Markdown
Member Author

ebyhr commented Aug 23, 2022

Read timed out happened. I hope #13746 fixes the issue.

Error:    TestDeltaLakeCreateTableStatisticsLegacyWriter>AbstractTestDeltaLakeCreateTableStatistics.testComplexDataTypes:105->AbstractTestDeltaLakeCreateTableStatistics.access$000:74->AbstractTestQueryFramework.computeActual:217 » QueryFailed
Error:    TestDeltaLakePreferredPartitioning.testPreferredWritePartitioningCreateTable:64->AbstractTestQueryFramework.assertUpdate:323 » QueryFailed

@electrum
Copy link
Copy Markdown
Member

The release note seems to be backwards?

@ebyhr
Copy link
Copy Markdown
Member Author

ebyhr commented Aug 23, 2022

@electrum Thanks, fixed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be a separate commit ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's related: we allow adding NOT NULL for empty tables
(previously it was ignored)

i think it;s fine to keep as one commit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO "non-empty" should be with a hyphen

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's related: we allow adding NOT NULL for empty tables
(previously it was ignored)

i think it;s fine to keep as one commit

Additionally, stores the correct nullability when adding a new column.
It was always nullable before this change.
@ebyhr ebyhr force-pushed the ebi/delta-add-not-null-column branch from 26cf070 to 563391b Compare August 23, 2022 09:55
@ebyhr ebyhr merged commit 12b0c3d into trinodb:master Aug 23, 2022
@ebyhr ebyhr deleted the ebi/delta-add-not-null-column branch August 23, 2022 13:16
@ebyhr ebyhr mentioned this pull request Aug 23, 2022
@github-actions github-actions bot added this to the 394 milestone Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants