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

Allow dropping partitions with Date type column #218

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

tangyl
Copy link
Contributor

@tangyl tangyl commented Feb 16, 2023

This pull request enables the DROP PARTITION operation to work with tables that have a column of type Date as partition. With this change, you can use a statement like the following to drop a partition from a ClickHouse table:

ALTER TABLE <table> DROP PARTITION (dt='2023-02-15')

where dt is a column with type Date. Before this change, attempting to drop a partition with a Date column would result in an error.

I've tested this change by running the DROP PARTITION operation on a table with a Date column, and I've verified that it works as expected.

Let me know if you have any questions or concerns about this change.

@pan3793
Copy link
Collaborator

pan3793 commented Feb 16, 2023

Would you like to supply a unit test as well?

@tangyl
Copy link
Contributor Author

tangyl commented Feb 16, 2023

@pan3793 is unit test mandatory? Seems it would take more efforts.

@pan3793 pan3793 merged commit ccd3954 into ClickHouse:master Feb 16, 2023
@pan3793
Copy link
Collaborator

pan3793 commented Feb 16, 2023

OK, looks pretty safe, merged.

Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants