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

Avoid comparing sql.Types in dolt diff #8526

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Conversation

nicktobey
Copy link
Contributor

Fixes #8511

Not all implementations of sql.Type are comparable. In particular, the enum type has a map field which makes the entire type incomparable.

To avoid doing this comparison in the chooseMostFlexibleType function, we modify it to compare the underlying type tag instead. This PR also short-circuits computing a unified schema unless the schema has changed.

…chema has changed, avoid comparing two `sql.Type`s directly, since some implementations are not comparable.
@coffeegoddd
Copy link
Contributor

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
43196c0 ok 5937457
version total_tests
43196c0 5937457
correctness_percentage
100.0

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.

LGTM!

@nicktobey nicktobey merged commit 134372c into main Nov 4, 2024
34 of 35 checks passed
Copy link

github-actions bot commented Nov 5, 2024

@coffeegoddd DOLT

test_name detail row_cnt sorted mysql_time sql_mult cli_mult
batching LOAD DATA 10000 1 0.06 1.33
batching batch sql 10000 1 0.07 1.57
batching by line sql 10000 1 0.07 1.57
blob 1 blob 200000 1 0.88 3.76 3.53
blob 2 blobs 200000 1 0.9 4.09 4.29
blob no blob 200000 1 0.86 2.4 2.06
col type datetime 200000 1 0.81 2.91 2.81
col type varchar 200000 1 0.67 3.3 2.84
config width 2 cols 200000 1 0.8 2.35 1.88
config width 32 cols 200000 1 1.84 1.98 2.2
config width 8 cols 200000 1 0.98 2.27 1.89
pk type float 200000 1 0.85 2.22 1.82
pk type int 200000 1 0.81 2.3 1.86
pk type varchar 200000 1 1.48 1.66 1.38
row count 1.6mm 1600000 1 5.42 2.87 2.3
row count 400k 400000 1 1.39 2.74 2.19
row count 800k 800000 1 2.79 2.77 2.23
secondary index four index 200000 1 3.42 1.39 1.08
secondary index no secondary 200000 1 0.89 2.3 1.98
secondary index one index 200000 1 1.1 2.34 1.95
secondary index two index 200000 1 1.94 1.73 1.4
sorting shuffled 1mm 1000000 0 5.16 2.68 2.27
sorting sorted 1mm 1000000 1 5.02 2.74 2.34

Copy link

github-actions bot commented Nov 5, 2024

@coffeegoddd DOLT

name detail mean_mult
dolt_blame_basic system table 1.11
dolt_blame_commit_filter system table 2.96
dolt_commit_ancestors_commit_filter system table 0.66
dolt_commits_commit_filter system table 1
dolt_diff_log_join_from_commit system table 2
dolt_diff_log_join_to_commit system table 2.03
dolt_diff_table_from_commit_filter system table 1.22
dolt_diff_table_to_commit_filter system table 1.2
dolt_diffs_commit_filter system table 0.97
dolt_history_commit_filter system table 1.42
dolt_log_commit_filter system table 1.1

Copy link

github-actions bot commented Nov 5, 2024

@coffeegoddd DOLT

name add_cnt delete_cnt update_cnt latency
adds_only 60000 0 0 0.73
adds_updates_deletes 60000 60000 60000 3.85
deletes_only 0 60000 0 1.89
updates_only 0 0 60000 2.43

@tbantle22 tbantle22 deleted the nicktobey/unionshcema branch November 21, 2024 20:56
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.

Panic on dolt show
3 participants