refactor(parser): replace SubstraitError with TestCaseResult interface#234
Open
benbellick wants to merge 2 commits intomainfrom
Open
refactor(parser): replace SubstraitError with TestCaseResult interface#234benbellick wants to merge 2 commits intomainfrom
benbellick wants to merge 2 commits intomainfrom
Conversation
SubstraitError was a struct with a free-form string field that could hold arbitrary values. This replaces it with a sealed TestCaseResult interface and a NonValueOutcome enum type with two constants matching the spec: NonValueError (<!ERROR>) and NonValueUndefined (<!UNDEFINED>). TestCase.Result is now a TestCaseResult, which is either a *CaseLiteral for concrete values or a NonValueOutcome for error/undefined results. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #234 +/- ##
==========================================
- Coverage 68.84% 68.82% -0.02%
==========================================
Files 47 47
Lines 10862 10859 -3
==========================================
- Hits 7478 7474 -4
- Misses 3030 3032 +2
+ Partials 354 353 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SubstraitError held a free-form string that could be any value, but the
Substrait test case spec only defines two non-value outcomes:
<!ERROR>and<!UNDEFINED>. This replaces it with a sealed TestCaseResult interface and aNonValueOutcome enum, making the valid states explicit at the type level.
I also added some docs :)
Note: This PR was developed with AI assistance. All changes have been reviewed, and I take full responsibility for this contribution.