public final class LineageComparator extends Object
SEMANTIC comparison of two documents (specification Sections 9.7 to 9.9; contract: section 7 of
docs/designs/data-lineage/05-sqllr-m1-core-library-plan-zh.md). Objects are matched by identity, never by
document-local reference: analysis contexts by content, endpoints by portable id, Facts by FactIdV1,
Occurrences by logical key (all records of one key together, so a status change is reported as one change even
when the analysis context changed too), statements by unit id and ordinal, writes by statement, target and
assignment ordinal, ExplainGraph nodes by logical key. Compared values replace each reference by the identity of
what it names, so a change of a referenced object (an evidence item, a candidate's outcomes) shows; objects
without an identity are compared only through what refers to them, and a note counts those left unmatched.
The diff document of the specification is not defined yet (Section 20, item 6), so the comparison is an
in-memory LineageComparator.Comparison.
| Modifier and Type | Class and Description |
|---|---|
static class |
LineageComparator.Change
One difference.
|
static class |
LineageComparator.Comparison
The differences of two documents, in the order of
LineageComparator.Kind. |
static class |
LineageComparator.Kind
The kinds of change, in the order they are reported.
|
| Modifier and Type | Method and Description |
|---|---|
static LineageComparator.Comparison |
compare(Document before,
Document after) |
public static LineageComparator.Comparison compare(Document before, Document after)