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

management.py: fail sync_table on adding partition_key #433

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkropachev
Copy link
Collaborator

@dkropachev dkropachev commented Feb 23, 2025

Replace if col.primary_key or col.primary_key: statement. with if col.primary_key or col.partition_key:
It was introduced with this mistake 9 years ago.

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have provided docstrings for the public items that I want to introduce.
  • I have adjusted the documentation in ./docs/source/.
  • I added appropriate Fixes: annotations to PR description.

@roydahan
Copy link
Collaborator

Please add the reason to commit message.

@Lorak-mmk
Copy link

Are you sure that the check is redundant? Maybe the author intended to put a different check there?

Code was introduced with mistake: `col.primary_key or col.primary_key`
instead of `col.primary_key or col.partition_key`
@dkropachev dkropachev force-pushed the dk/remove-dup-primary-key-check branch from 40aa481 to fdb7999 Compare March 6, 2025 02:30
@dkropachev dkropachev changed the title management.py: remove second primary key check management.py: fail sync_table on adding partition_key Mar 6, 2025
@dkropachev
Copy link
Collaborator Author

Are you sure that the check is redundant? Maybe the author intended to put a different check there?

You are correct, it has to be col.primary_key or col.partition_key instead.

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.

3 participants