001package gudusoft.gsqlparser.ir.semantic;
002
003/**
004 * Single-hop edge: {@link #getFrom()} depends on {@link #getTo()}.
005 *
006 * <p>Edges are intentionally single-hop so a consumer can reconstruct the
007 * full provenance graph by chasing them. Transitive output→base-table
008 * lineage is computable from these edges; the reverse is not, so the IR
009 * keeps the boundary information.
010 */
011public final class LineageEdge {
012
013    private final LineageRef from;
014    private final LineageRef to;
015
016    public LineageEdge(LineageRef from, LineageRef to) {
017        if (from == null || to == null) {
018            throw new IllegalArgumentException("from and to must not be null");
019        }
020        this.from = from;
021        this.to = to;
022    }
023
024    public LineageRef getFrom() {
025        return from;
026    }
027
028    public LineageRef getTo() {
029        return to;
030    }
031}