-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Chunking will obscure diff results on chunk boundaries if row count does not match.
Steps to reproduce:
- Create two tables lager then chunk size different in one row (row should be present only in one table, but not in other).
- Run diff.
Result: Diff will indicate deleted row correctly, but will also report identical row deletion and addition on each chunk boundary after the deleted row.
Excepted result: chunking should not affect diff results.
Just to not bother with enomorous chunks:
- Change default chunk size to 2.
- Run
val lhs = ReportContent(
Array(Array("No"),
Array("0"),
Array("1"),
Array("2")), 1,1)
val rhs = ReportContent(
Array(Array("No"),
Array("1"),
Array("2")), 1,1)
var diff = TableDiff.produceReportDiff(lhs, rhs)
println(StringTableDiff.diffReportToString(diff))Result will be:
+----------+
|No |
+----------+
|[-0-]{+2+}|
|1 |
|[-2-] |
+----------+
- Change default chunk back to 1000, run the same program. Result will be:
+-----+
|No |
+-----+
|[-0-]|
|1 |
|2 |
+-----+