001package gudusoft.gsqlparser.ir.semantic.diff;
002
003/**
004 * Slice-7 divergence classes; the in-scope subset of the seven classes
005 * defined in the unified-roadmap ยง10.4.
006 */
007public enum DivergenceClass {
008    /** Dlineage projection has the edge or output, IR projection does not. */
009    IR_MISSING_DEPENDENCY,
010    /** IR projection has the edge or output, dlineage projection does not. */
011    IR_EXTRA_DEPENDENCY,
012    /** Same (role, output, baseColumn) but different baseTable. */
013    BINDING_MISMATCH,
014    /** Same (output, baseTable, baseColumn) but role differs (FILTER vs JOIN). */
015    FILTER_OR_JOIN_SCOPE_MISMATCH,
016    /**
017     * Same canonical edge on both sides (identical role/output/baseTable/
018     * baseColumn), but the fine-grained semantic role differs โ€” e.g. one side
019     * says DIRECT where the other says TRANSFORM. Only emitted when BOTH
020     * sides carry a non-null {@link CanonicalLineageEdge#getSemanticRole()};
021     * projectors that don't populate semantic roles (the slice-7
022     * SemanticIRProjector / DlineageXmlProjector) never trigger it.
023     * Introduced for the lineage2 contract comparison (US-010).
024     */
025    ROLE_MISMATCH,
026    /** Both sides know the output but disagree about its aggregate flag. */
027    AGGREGATION_MISMATCH,
028    /** Builder threw โ€” whole comparison flagged once. */
029    UNSUPPORTED_BY_IR,
030    /** Dlineage projection bailed โ€” whole comparison flagged once. */
031    UNSUPPORTED_BY_DLINEAGE
032}