Skip to content

feat: Oracle dialect lineage support#35

Open
DmitriyAlergant wants to merge 1 commit intopondpilot:masterfrom
DmitriyAlergant:oracle-lineage
Open

feat: Oracle dialect lineage support#35
DmitriyAlergant wants to merge 1 commit intopondpilot:masterfrom
DmitriyAlergant:oracle-lineage

Conversation

@DmitriyAlergant
Copy link
Copy Markdown

Summary

  • Parsing & lineage improvements for Oracle: INSERT-with-leading-CTE recognition; SYSDATE pseudocolumn; DUAL pseudo-table (+ build.rs emits pseudo_tables()); view column-list renaming; MERGE SET/INSERT target column nodes; UPDATE SET target column nodes; schema expansion; shared helpers for target-column normalization.
  • Oracle SQL fixture test corpus (90 files)
  • Dali compat output layer (flowscope-export/src/dali_compat.rs) — maps FlowScope AnalyzeResult to the sql-parser-service JSON contract (transforms, table_lineage, refs). CLI gains --format dali and --format dali-compact. 28 integration tests validate the adapter.
  • Utility: scripts/xlsx_to_schema.py converts sql-parser-service metadata.xlsx into SchemaMetadata JSON.

Test plan

  • cargo test -p flowscope-core --test lineage_engine — all Oracle fixtures parse, ~413 lineage engine tests pass
  • cargo test -p flowscope-export --test dali_compat_oracle — 28 Dali-compat tests pass
  • cargo test -p flowscope-core -p flowscope-export — full core + export suite green, no regressions
  • Spot-check CLI Dali output: flowscope --dialect oracle --format dali < input.sql produces the expected JSON shape
  • Spot-check CLI with schema: flowscope --dialect oracle --format dali --schema oracle_sample.json < input.sql

🤖 Generated with Claude Code

Rebased onto origin/master. Merged with upstream name_spans/body_span
additions (origin/master commits 4356030, 83b57ee) — Node struct gains
name_spans/body_span fields; add_target_column_node initializes them.
Also: clippy fixes to pre-existing build.rs warnings (uninlined format
args; BTreeSet<&str> to avoid to_string allocation).

Adds Oracle SQL fixture corpus (90 files) translated from the
sql-parser-service (Dali) Python test cases, covering INSERT, UPDATE,
DELETE, MERGE, SELECT, CREATE VIEW, and CTAS. Schema metadata for
star expansion at tests/fixtures/schemas/oracle_sample.json.

Parsing & lineage improvements:
- INSERT...WITH CTE recognition fix
- SYSDATE pseudocolumn handling (not a column reference)
- DUAL pseudo-table recognition (+ build.rs emits pseudo_tables())
- View column-list renaming for column-level lineage
- MERGE SET/INSERT target column nodes + add_target_column_node()
- UPDATE SET target column nodes + schema expansion
- Shared helpers for target-column normalization

Dali compat layer (flowscope-export/src/dali_compat.rs): maps
FlowScope AnalyzeResult to Dali JSON contract (transforms,
table_lineage, refs). CLI --format dali / dali-compact added.
28 integration tests validate adapter against the Oracle fixture
corpus.

Also: scripts/xlsx_to_schema.py converts sql-parser-service
metadata.xlsx into SchemaMetadata JSON.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@DmitriyAlergant DmitriyAlergant changed the title feat: Oracle dialect lineage support + Dali compat output layer feat: Oracle dialect lineage support Apr 15, 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.

1 participant