Skip to content

When merging, use a tuple builder to ensure that we generate the correct representation for the merged row.#10959

Merged
nicktobey merged 8 commits into
mainfrom
nicktobey/merge
May 1, 2026
Merged

When merging, use a tuple builder to ensure that we generate the correct representation for the merged row.#10959
nicktobey merged 8 commits into
mainfrom
nicktobey/merge

Conversation

@nicktobey
Copy link
Copy Markdown
Contributor

This matters for adaptive encoding columns, whose correct representation depends on other values in the row.

…ect representation for the merged row. This matters for adaptive encoding columns, whose correct representation depends on other values in the row.
@coffeegoddd
Copy link
Copy Markdown
Contributor

coffeegoddd commented Apr 29, 2026

@nicktobey DOLT

read_tests from_latency to_latency percent_change
covering_index_scan 0.54 0.54 0.0
groupby_scan 9.73 9.91 1.85
index_join 1.86 1.82 -2.15
index_join_scan 1.32 1.32 0.0
index_scan 21.89 21.89 0.0
oltp_point_select 0.25 0.25 0.0
oltp_read_only 5.0 5.0 0.0
select_random_points 0.5 0.5 0.0
select_random_ranges 0.56 0.57 1.79
table_scan 21.5 21.89 1.81
types_table_scan 68.05 68.05 0.0
write_tests from_latency to_latency percent_change
oltp_delete_insert 6.32 6.32 0.0
oltp_insert 3.13 3.07 -1.92
oltp_read_write 11.04 11.04 0.0
oltp_update_index 3.19 3.19 0.0
oltp_update_non_index 3.02 3.02 0.0
oltp_write_only 5.99 5.99 0.0
types_delete_insert 6.79 6.79 0.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
78f77ea ok 5937471
version total_tests
78f77ea 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

coffeegoddd commented Apr 29, 2026

@nicktobey DOLT

test_name from_latency_p95 to_latency_p95 percent_change
tpcc-scale-factor-1 53.85 54.83 1.82
test_name from_server_name from_server_version from_tps to_server_name to_server_version to_tps percent_change
tpcc-scale-factor-1 dolt e3a6968 44.84 dolt 63f02a9 43.72 -2.5

@coffeegoddd
Copy link
Copy Markdown
Contributor

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
a8af39d ok 5937471
version total_tests
a8af39d 5937471
correctness_percentage
100.0

Copy link
Copy Markdown
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread go/libraries/doltcore/merge/merge_prolly_rows.go Outdated
Comment thread go/libraries/doltcore/merge/merge_prolly_rows.go
}

if isEqual(ctx, m.leftVD.Comparator(), i, leftCol, rightCol, resultType) {
// TODO: This used to use m.leftVD[i]. Was there a bug there we weren't catching?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably a good time to come up with a test case

// To achieve this, we sort the two values and return the higher one.
if bytes.Compare(leftCol, rightCol) > 0 {
return leftCol, false, nil
return returnleftValue()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How certain are you these are semantically equivalent? I'm a little concerned that we're introducing closure semantics here that will make it more difficult to reason about the values returned from these calls

nicktobey and others added 2 commits April 29, 2026 14:24
Co-authored-by: Zach Musgrave <zach@dolthub.com>
@coffeegoddd
Copy link
Copy Markdown
Contributor

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
064600e ok 5937471
version total_tests
064600e 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
acee697 ok 5937471
version total_tests
acee697 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
63f02a9 ok 5937471
version total_tests
63f02a9 5937471
correctness_percentage
100.0

@nicktobey nicktobey merged commit d322294 into main May 1, 2026
32 of 35 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.

3 participants