feat: emit tagged predicate edges for JOIN ON clause columns#62
Merged
Conversation
JOIN ON predicate columns (e.g., temporal range joins, equi-join keys) previously produced zero column-lineage edges, making them invisible in impact analysis. This adds is_join_predicate=True edges from ON-clause columns to projected output columns from the joined table, with join_condition and join_side metadata. Supports equi-joins, range/BETWEEN, function-wrapped keys, multi-join chains, and composes with Gap 4 self-read nodes for self-referencing pipelines. Closes Gap 7 from the CDC/SCD pipeline gap analysis.
…dicates Two new example notebooks demonstrating Gap 4 and Gap 7 features: - self_referencing_lineage.ipynb: Single-statement self-ref, SCD2 MERGE+INSERT, impact analysis through self-read chains, edge annotations - join_predicate_lineage.ipynb: Equi-join predicates, point-in-time BETWEEN joins, multi-join chain scoping, impact analysis with predicate filtering
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.
Summary
is_join_predicate=Trueedges to projected output columns from the joined tablejoin_condition(raw ON-clause SQL) andjoin_side("left"/"right") for filtering and analysisCloses Gap 7 from the CDC/SCD pipeline gap analysis (
docs/superpowers/specs/2026-04-13-gap7-join-predicate-columns-design.md).Files Changed
models.pyJoinPredicateInfodataclass,join_predicatesonQueryUnit,is_join_predicate/join_condition/join_sideonColumnEdgequery_parser.py_parse_select_unit,_extract_join_predicate_columns,_get_join_type,_get_join_right_tablelineage_builder.py_create_join_predicate_edges,_resolve_join_predicate_column(step 9 in_process_unit)pipeline_lineage_builder.py_add_query_edgesexplicit copy listtest_join_predicate_columns.pytest_unqualified_column_resolution.pyTest plan
tests/test_join_predicate_columns.py)