Skip to content

feat(results): compare two query results row by row - #3739

Merged
datlechin merged 5 commits into
mainfrom
feat/3625-compare-query-results
Oct 21, 2026
Merged

datlechin merged 5 commits into
mainfrom
feat/3625-compare-query-results

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • Compare Result With… in the result chooser and the View menu opens a comparison window. Left: the result on screen. Right: any other result in the tab, or a pinned result in any query tab on any connection.
  • Columns pair by name. A column on one side only is listed, not compared.
  • Rows match on Key columns, defaulting to the table's primary key when the result came from one table. No key: whole rows match as a multiset.
  • One equality for keys, rows and values: NULL matches NULL, an absent field is not NULL, two spellings of one instant match. A duplicate key stops the comparison and names it.
  • Grid follows the Compare & Sync Rows tab: Status and Side columns, only left/right/changed marks, Show filter, counts. VoiceOver says left and right.
  • Read-only: reads the rows each result holds, runs no SQL, flags a side cut at the row cap.
  • A key change keeps the last answer on screen until the next one lands.
  • Compare & Sync row grid: row Copy did nothing, heading clicks offered a sort that did nothing, and a DATE column beside a TIMESTAMP hid the time on the target line. Fixed there and in the new grid.
  • ResultSetMenuModelTests and ResultStatusBarLayoutTests updated for the new isComparable and onCompareResultSet parameters.

Test plan

  • New suites: ResultColumnPairingTests, ResultComparisonEngineTests, ResultComparisonModelTests, ResultComparisonGridModelTests, GlobalStateSuites/ComparisonGridCopyTests (its Compare & Sync case fails on main).
  • UI flow ResultComparisonUITests: run, pin, run again, compare from the chooser, check whole-row counts, key on id, check keyed counts.
  • MenuValidationCoverageTests, MainMenuBuilderTests cover the View menu item.

Fixes #3625

@datlechin
datlechin enabled auto-merge (squash) October 21, 2026 03:50
@datlechin
datlechin merged commit aa43041 into main Oct 21, 2026
8 checks passed
@datlechin
datlechin deleted the feat/3625-compare-query-results branch October 21, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compare two query results row by row

1 participant