Skip to content

Move join attributes from nodes to edges - #14

Merged
melonamin merged 3 commits into
masterfrom
join-attrs-on-edges
Mar 22, 2026
Merged

melonamin merged 3 commits into
masterfrom
join-attrs-on-edges

Conversation

@melonamin

Copy link
Copy Markdown
Member

Summary

  • Removes join_type / join_condition from Node — join metadata now lives exclusively on Edge
  • Adds joined_table_info context map for analysis-time lookups (base-table detection, complexity scoring)
  • Propagates join info to column-level edges via propagate_join_info_to_edges (single-pass candidate collection + targeted mutation)
  • Bumps export schema to v2 with a new joins table referencing edges instead of nodes
  • Extracts shared buildJoinedTableIds / formatJoinType into lineageHelpers.ts (deduplicates graphBuilders + web worker)
  • Updates VS Code hover provider to read join info from edges
  • Adds integration tests for join info propagation and non-overwrite guarantees

Test plan

  • just test-rust — all Rust tests pass (including 2 new integration tests)
  • yarn workspace @pondpilot/flowscope-react test — 113 TS tests pass
  • just lint — clippy + eslint clean
  • just fmt — formatting applied
  • Snapshot tests updated for new edge-centric join structure

Closes #8

Join metadata (join_type, join_condition) is semantically a relationship
property, not a node property. This refactor removes join fields from
Node and keeps them only on Edge, with a context-level joined_table_info
map for analysis-time lookups.

Changes:
- Remove join_type/join_condition from Node (Rust + TS types)
- Add joined_table_info HashMap to StatementContext for base-table
  detection and complexity scoring
- Propagate join info to column-level edges via single-pass
  propagate_join_info_to_edges
- Move export joins table to reference edges instead of nodes
  (schema version bump to "2")
- Extract shared buildJoinedTableIds/formatJoinType into lineageHelpers
  to deduplicate across graphBuilders and the web worker
- Update VS Code hover provider to read join info from edges
- Add integration tests for join info propagation and non-overwrite

Closes #8
@melonamin
melonamin merged commit 32942fe into master Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Join attributes should live on edges, not nodes

1 participant