Skip to content

feature - add portable plan-validation backend (#22)#100

Draft
dannymeijer wants to merge 2 commits into
mainfrom
feature/22-portable-plan-backend
Draft

feature - add portable plan-validation backend (#22)#100
dannymeijer wants to merge 2 commits into
mainfrom
feature/22-portable-plan-backend

Conversation

@dannymeijer

@dannymeijer dannymeijer commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Adds a portable plan-validation backend for IncQL sessions so Substrait plan construction can be validated without using DataFusion as the execution owner. This keeps the architecture aligned with the authoring/query surface -> Prism -> Substrait IR -> backend adapter boundary while providing a non-executing backend path for plan-shape checks.

Closes #22.

Type of change

  • Bug fix
  • New feature
  • Refactor / maintenance
  • Documentation
  • CI / tooling
  • RFC (adds/updates docs/rfcs/*)

Area(s)

Select the primary areas touched (labels sync from checked lines when the triage workflow runs):

  • Package & tests
  • Specification (RFCs)
  • Documentation
  • Automation & repo config
  • Other

Key details

  • User-facing behavior: sessions can opt into Session.plan_validation_backend() / Session.builder().with_plan_validation(...) for validation-only plan construction. The backend accepts valid plans through execute(...) and returns typed backend errors for materialization and write paths.
  • Internals: adds BackendKind.PlanValidationEngine, PlanValidationBackendConfig, backend selection encoding/decoding, and a dispatcher path that validates Substrait plan roots without delegating semantics to DataFusion.
  • Risks: this backend intentionally does not materialize records or write sinks. Tests cover those paths as explicit errors so callers do not mistake validation coverage for execution support.

Testing / verification

  • make ci (or make fmt-check, make build, make test)
  • Manual verification described below

Manual verification notes:

  • /Users/danny/Development/encero/tmp/incan-v0.4.0-bin/bin/incan --version -> incan 0.4.0
  • git diff --check
  • make test-style
  • make fmt-check INCAN=/Users/danny/Development/encero/tmp/incan-v0.4.0-bin/bin/incan
  • make build INCAN=/Users/danny/Development/encero/tmp/incan-v0.4.0-bin/bin/incan
  • /Users/danny/Development/encero/tmp/incan-v0.4.0-bin/bin/incan fmt --check src
  • /Users/danny/Development/encero/tmp/incan-v0.4.0-bin/bin/incan fmt --check tests/test_session_backend_plan_validation.incn
  • /Users/danny/Development/encero/tmp/incan-v0.4.0-bin/bin/incan test tests/test_session_backend_plan_validation.incn -x --nocapture -> 7 passed

Docs impact

  • No docs changes needed
  • Docs updated
  • Docs follow Divio intent (tutorial/how-to/reference/explanation) where applicable

If docs updated:

  • Link(s): docs/language/reference/execution_context.md, docs/release_notes/v0_1.md

Checklist

  • I kept public docs user-focused and moved internals to contributing docs when appropriate
  • I avoided duplicating canonical install/run instructions in multiple places
  • I added/updated tests where it materially reduces regressions

@incan-triage-bot incan-triage-bot Bot added automation CI, Makefile, .github/, repo config documentation Improvements or additions to documentation package Library source, tests, incan.toml labels Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation CI, Makefile, .github/, repo config documentation Improvements or additions to documentation package Library source, tests, incan.toml

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature - implement additional Session execution backends beyond DataFusion

1 participant