apache / apache/datafusion

[substrait] Build basic test suite to validate produced Substrait plans

Open
#15,069 15 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

In https://github.com/apache/datafusion/issues/12244 we found that DataFusion was producing invalid Substrait plans. The `datafusion-substrait` crate has quite a bit of tests but none that actually verify plans are valid according to the https://github.com/substrait-io/substrait-validator.

### Describe the solution you'd like

Add a test suite to the `datafusion-substrait` crate that uses https://github.com/substrait-io/substrait-validator to validate plans. We can start small and just add a test that would've failed prior to https://github.com/apache/datafusion/pull/15011.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in the datafusion-substrait crate and review its existing tests, then inspect the substrait-validator and the invalid-plan context from issue 12244. Add a basic test that validates produced plans and would have caught the problem fixed by pull request 15011. Done means the test suite runs successfully and rejects invalid plans.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.