public static class SqlGuardResponse.LineageEdge extends Object
| Modifier and Type | Field and Description |
|---|---|
List<String> |
aggregateFunctions
Aggregate function calls detected inside this edge's source
expression, in left-to-right textual order, deduplicated.
|
String |
lineageType |
List<String> |
sourceColumns |
int |
statementIndex |
String |
targetColumn |
List<SqlGuardResponse.WindowFn> |
windowFunctions
Window function calls detected inside this edge's source
expression.
|
| Constructor and Description |
|---|
LineageEdge() |
public int statementIndex
public String targetColumn
public List<String> sourceColumns
public String lineageType
public List<String> aggregateFunctions
"COUNT",
"SUM", "AVG") or "FUNC(DISTINCT)" when
the call uses the DISTINCT modifier (e.g. COUNT(DISTINCT)).
Multi-aggregate expressions emit every call faithfully so
downstream intent-mismatch checks (blueprint §S23) can reason
about the actual aggregation grain: COUNT(DISTINCT a) /
COUNT(*) → ["COUNT(DISTINCT)", "COUNT"], not a
collapsed scalar. A naive scalar field would record only the
first match and silently lie about the rest of the expression.
Scope: scalar aggregate calls only. Window aggregates
(AVG(x) OVER (...)) live on the separate
windowFunctions field; FILTER aggregates
(COUNT(x) FILTER (WHERE ...)) are still deferred
(MantisBT #4468). A statement that mixes scalar and window
aggregates produces edges in both fields.
Wire-format contract: null for non-aggregate edges
and OMITTED from the JSON map so unaffected edges round-trip
byte-identical to the pre-S2 shape.
public List<SqlGuardResponse.WindowFn> windowFunctions
TFunctionCall
in the projection carries a non-null
getWindowSpecification() / getWindowDef().
Companion to aggregateFunctions (scalar form) and
activated by blueprint §1.5.B B1 / B2. When this list is
non-empty, lineageType is "window" and the
sourceColumns list is augmented with the columns
referenced inside the window spec's PARTITION BY and
ORDER BY — dlineage surfaces those as fdr edges
with clauseType="selectList" / "orderby" on
the function resultset; sqlguard promotes them into
sourceColumns because they determine which rows the
window aggregate reads.
Wire-format contract: null for non-window
edges and OMITTED from the JSON map; window edges add the
windowFunctions key. lineageType simultaneously
shifts from "expression" (pre-B1) to "window"
for any projection containing an OVER (...) call, which
IS a wire-format change for downstream consumers that were
previously seeing window aggregates classified as
"expression".
L3 escalation status (MantisBT #4467). Populated
AST-side via TFunctionCall.getWindowDef()
because dlineage does not surface window-spec metadata as
typed fields. When #4467 lands, the visitor migrates to
dlineage's relationship.getWindowSpec() and this
wire field stays unchanged.
public LineageEdge()