Release v1.11.0 — Column lineage pipelines - #12
Merged
Merged
Conversation
…e column flow) Cross-statement column flow through temp tables, INSERT/UPDATE/CREATE TABLE transformations, same-script views, CTEs, and catalogue-resolved object boundaries. src/columnflow.ts walks statements in order, tracks column-level reaching definitions (branch/loop merges stay ambiguous), flattens each produced column to its ultimate source, resolves view/catalogue boundaries, and exports a column graph on a documented layout class (colstep/colobj canonical styles + provenance). E column-resolution signals feed construct coverage; ambiguous reaching definitions stay opaque with region-scoped column_flow_opaque diagnostics; T-SQL 'col = expr' alias targets no longer misbind. tests/column-flow.ts (15 fixtures + 2 layout budgets + export parity), wired into golden gate, metrics corpus (columnFlow 15 / columnLayout 2), demo, docs; metrics-v1.11.0.json snapshot; dist rebuilt in sync.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: v1.11.0 — Column lineage pipelines
Summary
Implements the v1.11.0 — Column lineage pipelines milestone from
ROADMAP.mdin full and nothing from v1.12.0 onwards: column-flow edgesthrough CTEs, views, temporary tables, transformations, and
catalogue-resolved object boundaries (README roadmap item 6 delivered);
F column metadata and column-flow export styles; E
column-resolution signals; and the layout engine's documented column
graph class. The golden suite grows from 209 to 210; fuzz (400) and UI (22)
stay green; 15 column-flow fixtures assert end-to-end traces and opaque
ambiguity, plus 2 column layout-budget fixtures. RDL / report import (v1.12.0)
remains deferred.
What's included
Column-flow module (
src/columnflow.ts)A new runtime module (loaded after
columns.js, beforeexporters.js) thatwalks an object's statements in source order and tracks the column-level
reaching definition of each column-carrying object:
SELECT … INTO(v1.10.0fixtures already bound the projection),
INSERT … SELECT(including explicitcolumn lists and positional mapping onto a
CREATE TABLEschema),CREATE TABLEDDL column lists, andUPDATE … SETtransformations each define orrefine an object's columns. Sequential writes replace the reaching
definition (most-recent-writer wins, mirroring the v1.5.0 flow graph);
conditional writes inside a branch/loop/handler mark the object
multiatmerge time.
object and column (flattened through temp chains, e.g.
SELECT … INTO #b FROM #areports the original source, not#a), as{source, sourceColumn, sourceSpan, resolution}.known columns; an ambiguous reaching definition (
multi) or a column theobject's definition does not produce stays explicitly opaque with a
region-scoped, span-attached
column_flow_opaquediagnostic — no binding isever invented. A T-SQL
SELECT col = expralias target is no longer mistakenfor a source-column reference.
through
analyseEstate→opts.define) and catalogue-proven externalobjects resolve column identity by definition; CTE scopes act as provable
origins.
analyseColumnstrims trailing semicolons and a depth-0GObatchseparator at its entry point so raw view bodies analyse cleanly.
buildColumnGraph): a plainGraphon its own documentedcolumnlayout class — a step spine in statement order plus column-carryingobject nodes routed as data lanes — that
toMermaid/toDrawiorender withthe new
colstep/colobjcanonical styles and full provenance metadata.Analysis integration (
src/ir.ts)analyse()computesresult.columnFlow(theColumnFlowmodel) andresult.columnFlowGraph, merges the region-scopedcolumn_flow_opaquediagnostics into the findings panel, and feeds a
column_flowconstruct intothe existing construct-coverage surface (E signals with no new UI).
analyseEstate()threads same-script object definitions into later objects soview boundaries resolve by definition. Confidence, coverage, exports, and all
pre-existing fixtures are untouched: clean pipelines produce no new
diagnostics.
Types, styles, layout
src/types.d.ts—ColumnFlowOutput,ColumnFlowObject,ColumnFlowStep,ColumnFlowConsume,ColumnFlowEdge,ColumnFlow,AnalysisResult.columnFlow/
columnFlowGraph,AnalyseOptions.define,PROCFLOW_COLUMNFLOW_*globals.src/exporters.ts— canonicalcolstepandcolobjnode styles shared byboth exporters (the distinct data-flow edge style already derives from the
dataedge kind).tests/parity.ts— thecolumnlayout class is documented inPROCFLOW_LAYOUT_CLASSES(node limit 28, crossing budget 0); enforcementlives in the new suite.
Fixtures and tests
tests/column-flow.ts(+tests/index.html,tests/metrics.html,column-flow.js, andsrc/columnflow.jswiring) — 15 fixture-corpusrecords plus 2 integration records, and 2 column layout-budget records:
end-to-end temp pipelines (
SELECT … INTO,UPDATE,INSERT … SELECTwith a
CREATE TABLEschema and an explicit column list, CTE-fed temps),two-hop temp chains that flatten to the source, ambiguous IF/ELSE, branch
and loop writes that read opaque, sequential-producer non-multi replacement,
same-script view boundaries, catalogue-proven boundaries, clean plain/dynamic
invariants, and per-fixture Mermaid/draw.io export parity with provenance
round-trip and data-edge routing. Gates the golden page via
PROCFLOW_COLUMNFLOW_PASS+PROCFLOW_COLUMNFLOW_RESULT.tests/tests.ts— gates the golden page on the v1.11.0 column-flow suite.tests/metrics.ts→docs/metrics-v1.11.0.json— addscolumnFlowPassRate,columnLayoutPassRate, and thecolumnFlow(15) /columnLayout(2) corpus counts; the v1.10.0 snapshot is renamed tov1.11.0 (old snapshot removed). All pre-existing corpus aggregates are
byte-identical to v1.10.0.
examples/dbo.v1110_demo.sql— a view + three procedures demonstratingend-to-end temp pipelines, ambiguous branch reaching definitions, and
same-script view boundary resolution (with a catalogue to paste).
Verification
npm run typecheck— passesnpm run build— passesnpm run test:file— passes (withCHROME_PATHset)column_flowrow)npm run metrics— snapshot is current;docs/metrics-v1.11.0.jsoncommitted (v1.10.0 snapshot renamed), 100 % column-flow pass rate
dist/committed in sync (addsdist/src/columnflow.jsand
dist/tests/column-flow.js)Not changed / deferred (per roadmap)
object → column views, and report export — is out of scope. Interactive
column views remain scheduled for v1.13.0.
docs/metrics-v1.11.0.jsonare byte-identical to v1.10.0 for everypre-existing metric, confirming no parser regression, and the full golden
suite stays green.