Skip to content

Add a dolt_preview_merge_conflicts_summary table function#9233

Merged
tbantle22 merged 12 commits intomainfrom
taylor/conflicts-preview
Jun 9, 2025
Merged

Add a dolt_preview_merge_conflicts_summary table function#9233
tbantle22 merged 12 commits intomainfrom
taylor/conflicts-preview

Conversation

@tbantle22
Copy link
Copy Markdown
Contributor

@tbantle22 tbantle22 commented May 20, 2025

This table function shows which tables are conflicting between two branches and how many data and/or schema conflicts there are for each table

@tbantle22 tbantle22 force-pushed the taylor/conflicts-preview branch from b75b15d to 90b0ad8 Compare May 20, 2025 21:14
@tbantle22 tbantle22 requested a review from Copilot May 20, 2025 21:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new dolt_preview_merge_conflicts_summary table function to report data and schema conflicts between branches, wires it into the engine and test harness, and updates merge logic to support the new functionality.

  • Register PreviewMergeConflictsSummaryTableFunction and integrate it into SQL engine and tests
  • Introduce GetNewValueMerger, Prolly‐backed row accessors, and expose SchemaMerge on TableMerger
  • Rename internal newValueMerger/tryMerge to public NewValueMerger/TryMerge and update call sites

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
merge/merge_rows.go Added Prolly map helpers and GetNewValueMerger / SchemaMerge
merge/merge_rows.go (imports) Missing import for durable in rowsFromTable
merge/merge_prolly_rows.go Updated calls to NewValueMerger and TryMerge
merge/row_merge_test.go Updated tests to use NewValueMerger / TryMerge
sqle/dtablefunctions/init.go Registered new table function
sqle/enginetest/* Bulk additions of select * from dolt_preview_merge_conflicts_summary assertions
sqle/enginetest/dolt_engine_tests.go and .go Added harness runners and tests for preview conflict function
.github/workflows/merge-perf.yaml Fixed typo in comment
Comments suppressed due to low confidence (2)

go/libraries/doltcore/sqle/enginetest/dolt_queries_schema_merge.go:46

  • The table function returns uint64 counters, so using uint here may cause a type mismatch in the test. Change these literals to uint64(1) and uint64(0) to match the function's return types.
Expected: []sql.Row{{"t", uint(1), uint(0)}}

go/libraries/doltcore/merge/merge_rows.go:96

  • The code references durable.ProllyMapFromIndex but there is no import for the durable package. Add the appropriate import to resolve this symbol and ensure compilation succeeds.
rows, err := durable.ProllyMapFromIndex(rd)

@tbantle22 tbantle22 force-pushed the taylor/conflicts-preview branch from 90b0ad8 to 2900f6c Compare May 20, 2025 21:20
@coffeegoddd
Copy link
Copy Markdown
Contributor

@tbantle22 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
2900f6c ok 5937457
version total_tests
2900f6c 5937457
correctness_percentage
100.0

@coffeegoddd
Copy link
Copy Markdown
Contributor

@coffeegoddd DOLT

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

@tbantle22 tbantle22 force-pushed the taylor/conflicts-preview branch from cdc4b9e to 95ac4e2 Compare May 28, 2025 21:28
@coffeegoddd
Copy link
Copy Markdown
Contributor

@tbantle22 DOLT

comparing_percentages
100.000000 to 100.000000
version result total
95ac4e2 ok 5937457
version total_tests
95ac4e2 5937457
correctness_percentage
100.0

@tbantle22 tbantle22 force-pushed the taylor/conflicts-preview branch from 0fee7cc to 2372540 Compare May 29, 2025 22:47
@tbantle22 tbantle22 marked this pull request as ready for review May 29, 2025 22:53
@tbantle22 tbantle22 requested a review from reltuk May 29, 2025 22:53
@coffeegoddd
Copy link
Copy Markdown
Contributor

@tbantle22 DOLT

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

@coffeegoddd
Copy link
Copy Markdown
Contributor

@tbantle22 DOLT

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

@coffeegoddd
Copy link
Copy Markdown
Contributor

@tbantle22 DOLT

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

@tbantle22 tbantle22 merged commit bfcc421 into main Jun 9, 2025
21 of 22 checks passed
@tbantle22 tbantle22 deleted the taylor/conflicts-preview branch June 9, 2025 21:53
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.

5 participants