Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow substrait.Plan as an input #280

Closed
wackywendell opened this issue Oct 25, 2024 · 2 comments
Closed

Allow substrait.Plan as an input #280

wackywendell opened this issue Oct 25, 2024 · 2 comments

Comments

@wackywendell
Copy link
Contributor

The current substrait-validator parse interface accepts a Buf object, but there is no equivalent function like validate that accepts an already decoded Plan object and validates it.

There is the parse_plan function, but (1) it's not public (it's pub in the parse module, but the parse module itself is not public), and (2) the external interface should probably be something a bit different, more like fn validate(plan: &Plan, config: &Config) -> ParseResult to match the public parse function.

Out of curiosity - is there any reason this isn't exposed? The one I can guess at is that it would expose the version of substrait that substrait-validator is depending on, and the caller would have to use the same one (or their Plan types wouldn't be the same type); that would limit the utility of this function, but still seems to me like it would be a nice complement to the parse function. Are there other reasons, or is this a good idea?

@wackywendell
Copy link
Contributor Author

Note: this looks like it has some similarities to #33, although that is Python-focused, and this issue is focused on the Rust API.

@wackywendell
Copy link
Contributor Author

#281 was merged, so calling this a success.

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

No branches or pull requests

1 participant