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

Assert partitions are empty before ALTERs #62

Open
jcjones opened this issue Apr 12, 2023 · 1 comment
Open

Assert partitions are empty before ALTERs #62

jcjones opened this issue Apr 12, 2023 · 1 comment

Comments

@jcjones
Copy link
Collaborator

jcjones commented Apr 12, 2023

Rather than simply inferring that a partition is empty, we can check it concretely through a simple SELECT statement, like:

SELECT * FROM table PARTITION(p_20230724) LIMIT 1;

If any data comes back, then we have failed an invariant.

@jcjones
Copy link
Collaborator Author

jcjones commented Apr 12, 2023

This is a little tricky to get the tests right for, as it considerably increases the number of database queries in the common case. Some of this is going on in branch 62-assert-empty.

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

No branches or pull requests

1 participant