dolthub / dolt

Dolt – Git for Data
https://www.dolthub.com
Apache License 2.0
18k stars 516 forks source link

Fix JSON merge issue that would report imprecise diffs in some situations #8538

Closed nicktobey closed 3 weeks ago

nicktobey commented 3 weeks ago

If:

Then the differ would incorrectly report that the entire "A" object had been modified, instead of the sub-value "A.b"

This could then lead to situations where the merge cannot be auto-resolved, because the differ claims that an object has been modified divergently, when it's actually two unrelated fields in the object that have been modified.

This PR fixes that scenario by properly detecting when the next chunk marks the start of an object.

coffeegoddd commented 3 weeks ago

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
c9b6269 ok 5937457
version total_tests
c9b6269 5937457
correctness_percentage
100.0
github-actions[bot] commented 3 weeks ago
@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.08 1.5
batching by line sql 10000 1 0.07 1.71
blob 1 blob 200000 1 0.87 3.86 3.68
blob 2 blobs 200000 1 0.87 4.37 4.49
blob no blob 200000 1 0.89 2.35 2.02
col type datetime 200000 1 0.81 2.93 2.81
col type varchar 200000 1 0.65 3.48 2.91
config width 2 cols 200000 1 0.81 2.31 1.94
config width 32 cols 200000 1 1.84 1.99 2.29
config width 8 cols 200000 1 0.99 2.23 1.95
pk type float 200000 1 1.09 1.73 1.45
pk type int 200000 1 1.07 1.75 1.41
pk type varchar 200000 1 1.84 1.41 1.12
row count 1.6mm 1600000 1 5.64 2.81 2.28
row count 400k 400000 1 1.44 2.69 2.19
row count 800k 800000 1 2.83 2.75 2.25
secondary index four index 200000 1 3.55 1.35 1.05
secondary index no secondary 200000 1 0.89 2.29 2.04
secondary index one index 200000 1 1.13 2.28 1.93
secondary index two index 200000 1 1.96 1.7 1.39
sorting shuffled 1mm 1000000 0 5.31 2.68 2.35
sorting sorted 1mm 1000000 1 5.42 2.72 2.25
github-actions[bot] commented 3 weeks ago
@coffeegoddd DOLT name detail mean_mult
dolt_blame_basic system table 1.13
dolt_blame_commit_filter system table 2.87
dolt_commit_ancestors_commit_filter system table 0.58
dolt_commits_commit_filter system table 1.05
dolt_diff_log_join_from_commit system table 2.06
dolt_diff_log_join_to_commit system table 2.08
dolt_diff_table_from_commit_filter system table 1.2
dolt_diff_table_to_commit_filter system table 1.21
dolt_diffs_commit_filter system table 1
dolt_history_commit_filter system table 1.42
dolt_log_commit_filter system table 1.17
github-actions[bot] commented 3 weeks ago
@coffeegoddd DOLT name add_cnt delete_cnt update_cnt latency
adds_only 60000 0 0 0.72
adds_updates_deletes 60000 60000 60000 3.79
deletes_only 0 60000 0 1.84
updates_only 0 0 60000 2.43