public final class DlineageXmlProjector extends Object
DataFlowAnalyzer XML output into the same
canonical form as the Semantic IR projector.
The projector consumes only the four XML shapes seen in the captured
5-SQL corpus baselines (see phase0/golden/*.dlineage.xml). Any
input that doesn't fit produces a ProjectorResult carrying an
ProjectorResult.UnsupportedReason; the harness translates it
into a single DivergenceClass.UNSUPPORTED_BY_DLINEAGE divergence.
Aggregate handling — see slice-7 plan §"DlineageXmlProjector". The
COUNT(*) heuristic detects function-resultset fdd sources that include
a column="*" reference and suppresses SELECT fan-out from that
function. SUM(col)/AVG(col)/COUNT(col) retain
their fan-out.
| Modifier and Type | Class and Description |
|---|---|
static class |
DlineageXmlProjector.FanoutPolicy
|
| Modifier and Type | Method and Description |
|---|---|
static ProjectorResult |
project(String xml)
Legacy entry point — equivalent to
project(String, EDbVendor)
with vendor=null. |
static ProjectorResult |
project(String xml,
EDbVendor vendor)
Slice 43 — vendor-scoped projection entry point.
|
public static ProjectorResult project(String xml)
project(String, EDbVendor)
with vendor=null. Retained for callers that don't know or
don't care about the source dialect (Phase-0 harness, divergence
goldens, slice-7 comparison harness).public static ProjectorResult project(String xml, EDbVendor vendor)
vendor
parameter pins the per-vendor API contract so a future cautious
projector override can apply per-vendor name-whitelist exceptions
(e.g. PG hypothetical-set rank / dense_rank /
percent_rank / cume_dist where the WG form's XML
is structurally indistinguishable from the OVER form). Slice 43
deliberately makes no behavior change in the projector —
today the AGGREGATE_FUNCTION_NAMES /
ORDER_BY_WITHIN_GROUP_AGGREGATE_NAMES sets are vendor-
agnostic and the vendor argument is recorded but not
consulted. The byte-for-byte equivalence is enforced by
Slice43Test.projectorVendorScopeOverloadAccepts*Vendor.
Future slices that wire vendor-specific overrides MUST keep
this equivalence for callers that pass vendor=null (the
legacy project(String) delegates here with null).
The follow-up slice for PG hypothetical-set top-level admission
is the first expected consumer of the vendor parameter.
xml - dlineage XML output, must not be null/emptyvendor - source SQL dialect; may be null when the
caller has no vendor information