Repository navigation
Backport to 2.0: map column lineage through STRUCT and ARRAY<STRUCT> fields - #37666
Conversation
…ds (#37259) * fix(lineage): map column lineage through STRUCT and ARRAY<STRUCT> fields * fix(lineage): resolve a STRUCT field path only where nothing else can own its name * test(lineage): anchor the no-lineage cases on an edge that must exist * fix(lineage): resolve a STRUCT field path only from a table source; fix static checks * fix(lineage): detect subqueries through the parser's public column lineage; pin root vs nested matching * fix(lineage): copy nested fields only through a column the query copies unchanged; catch CTEs built from constants * fix(lineage): carry nested fields only from the source column the final SELECT copies * fix(lineage): match table columns and STRUCT field copies separately; skip target column lists * fix(lineage): copy a STRUCT star's fields only when the star is plain and nothing else produces them
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🟡 Medium riskBackports column lineage mapping through STRUCT and ARRAY<STRUCT> fields so tag and description propagation reaches nested fields in downstream views. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Backport of #37259 to
2.0, for #37258.Query and view column lineage now reaches the fields of STRUCT and ARRAY columns, so tag and description propagation over lineage reaches nested fields in downstream views. Details and rationale are in #37259 and
ADR:2026-11-06-sql-column-lineage-follows-nested-fields.sql_lineage.py: 2.0 still usesList/Optionaltyping, and it lacksto_table_entities(from a separate main PR that wasn't backported). I kept 2.0's lines and added only this PR'scopied_columnsparameter.Type of change:
Tests:
ingestion/tests/unit/lineage/test_nested_column_lineage.py(55 tests), run against this branch's code.tests/unit/lineage,test_query_parser.py,test_db_utils.py): 518 passed. basedpyright against 2.0's baseline and ruff are clean.🤖 Generated with Claude Code