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

Give a little more information in dolt_diff_* when there is a pk change #8631

Merged
merged 8 commits into from
Dec 17, 2024

Conversation

macneale4
Copy link
Contributor

@macneale4 macneale4 commented Dec 3, 2024

This change makes the dolt_diff_* system table a little more forgiving when schema changes occur that we can kind of map from one commit to the next. In the case of the issue, adding a primary key to a key keyless table. This doesn't work in both directions though - if you can't map the schema, we stop walking history (same as before).

Minor bump required due to behavior of the dolt_diff_* table changing are a result of this change.

Fixes: #8625

@coffeegoddd
Copy link
Contributor

@macneale4 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
9e151c0 ok 5937457
version total_tests
9e151c0 5937457
correctness_percentage
100.0

@coffeegoddd
Copy link
Contributor

@macneale4 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
8722691 ok 5937457
version total_tests
8722691 5937457
correctness_percentage
100.0

@macneale4 macneale4 force-pushed the macneale4/alter-pk-diff branch from 8722691 to 3b6b97c Compare December 4, 2024 23:29
@coffeegoddd
Copy link
Contributor

@macneale4 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
3b6b97c ok 5937457
version total_tests
3b6b97c 5937457
correctness_percentage
100.0

@coffeegoddd
Copy link
Contributor

@macneale4 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
a2bd169 ok 5937457
version total_tests
a2bd169 5937457
correctness_percentage
100.0

@macneale4 macneale4 force-pushed the macneale4/alter-pk-diff branch from a2bd169 to 9419265 Compare December 16, 2024 20:35
@coffeegoddd
Copy link
Contributor

@macneale4 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
9419265 ok 5937457
version total_tests
9419265 5937457
correctness_percentage
100.0

@coffeegoddd
Copy link
Contributor

@macneale4 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
3400e91 ok 5937457
version total_tests
3400e91 5937457
correctness_percentage
100.0

@macneale4 macneale4 requested a review from fulghum December 17, 2024 01:10
Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

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

Looks good!

Comment on lines 685 to 687
// isDiffablePartition checks if the commit pair for this partition is "diffable".
// If the primary key sets changed between the two commits, it may not be
// possible to diff them.
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably helpful for future code readers to explain simpleDiff and fuzzyDiff in the function docs and maybe how they are intended to be used.

@coffeegoddd
Copy link
Contributor

@macneale4 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
ac9cad6 ok 5937457
version total_tests
ac9cad6 5937457
correctness_percentage
100.0

@macneale4 macneale4 merged commit 9f07a4a into main Dec 17, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dolt_diff_* returns empty set for tables altered to add a PK after creating using CREATE TABLE ... AS SELECT
3 participants