Description
Ability to report only the rows that are different
Currently we simply display first N rows form both cursors if the data is not matching.
This is not very useful for developers, specially when dealing with more than few columns and few rows of data.
ut_data_value_refcursor
should implement some kind of diff report, that would:
- only report on rows that are actually different
- display mismatching rows side by side or one under another so we can see one expected row, one actual etc.
As an idea, when running the compare_implementation
method, we could save the results (or data-keys) of both compared cursors into separate diff table so that we can then simply query diff table joined with cursor data table (twice) to get differences and the diff data.
It would be worth doing a bit of research on was to do Diff.
There is a nice open-source algorithm for text-based diff:
https://neil.fraser.name/software/diff_match_patch/svn/trunk/demos/demo_diff.html
https://github.com/curran/google-diff-match-patch
RSpec and git command line have a line by line diff implementation too, that could be more suitable here.