Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for remote partition evolution in Delta Lake #13489

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Aug 4, 2022

Description

Add test for remote partition evolution in Delta Lake. Before this connector was published from Starburst, we have cache for partitions and it caused NPE when the partition column is changed remotely.

Documentation

(x) No documentation is needed.

Release notes

(x) No release notes entries required.


onDelta().executeQuery("REPLACE TABLE default." + tableName + " USING DELTA PARTITIONED BY (new_part_col) AS SELECT * FROM " + tableName);

// This 2nd SELECT query caused NPE when the connector had cache for partitions and the column was changed remotely
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment is not necessary because this compatibility test is a valid usecase.

Copy link
Member Author

@ebyhr ebyhr Aug 4, 2022

Choose a reason for hiding this comment

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

I suppose future readers can't quickly realize this test purpose without comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose that the name of the test could be centered around REPLACE which is a SQL command specific for Databricks.

testTrinoCanReadAndWriteIntoTableReplacedInDatabricks

Copy link
Member Author

@ebyhr ebyhr Aug 4, 2022

Choose a reason for hiding this comment

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

REPLACE statement is just a part of steps to reproduce and it's not purpose of this test. Let me keep as-is.

@ebyhr ebyhr merged commit 5d3de29 into master Aug 4, 2022
@ebyhr ebyhr deleted the ebi/delta-partition-npe branch August 4, 2022 10:05
@github-actions github-actions bot added this to the 393 milestone Aug 4, 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.

3 participants