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

feat: Add validate function for a substrait::Plan message #281

Merged
merged 4 commits into from
Nov 4, 2024

Conversation

wackywendell
Copy link
Contributor

Also refactors the parse / validation layer a bit to separate them a bit more.

Addresses #280.

I'm still fairly new to this code / repo, so I took a bit of time to see if I could address #280 in the "naive" way. Naive solutions are often as good as any... but sometimes, they are naive, so let me know if there's something I'm missing or if this is something we should avoid exposing!

Comment on lines +52 to +53
# For OSX, link in CoreFoundation, needed for some system symbols like
# _CFRelease, _CFStringGetBytes, …
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was outside the intent of this PR, but after running into this error and attempting to reproduce locally, I found this option helped. I know very little about CMake, so any recommendations here welcome 🙇

"failed to decode Protobuf message: "
"invalid wire type value: 7 (code 1001) (code 1001)\n"));
std::string(
"Info at plan: this version of the validator is EXPERIMENTAL. "
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that before the EXPERIMENTAL info was not printed when the substrait plan failed to decode into either a Plan or PlanVersion. Given that it is otherwise always printed, it seemed more consistent to have it always be printed (even under full decode failures) and update this test, rathen than to make the code match this test.

@wackywendell
Copy link
Contributor Author

wackywendell commented Oct 28, 2024

Sorry for the force-push - I usually try not to do that, but as no one had reviewed yet and the CI was failing on commit messages, I figured I'd fix those.

Next time I'll plan to make a Draft PR first, get it passing CI, then mark it for review.

Copy link
Member

@mbrobbel mbrobbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@wackywendell
Copy link
Contributor Author

@mbrobbel - thanks! Is this ready to merge, then? If so, can you do that - I don't have permissions?

@mbrobbel
Copy link
Member

mbrobbel commented Nov 4, 2024

@mbrobbel - thanks! Is this ready to merge, then? If so, can you do that - I don't have permissions?

Let's get #282 in first, then rebase/merge here to fix CI.

@wackywendell
Copy link
Contributor Author

@mbrobbel - thanks for approving and merging #282!

I can either rebase this on main (post #282), then force-push, which will be "cleaner" git history with the downside of making reviews harder to follow, or I can merge in main. Any preferences?

@mbrobbel
Copy link
Member

mbrobbel commented Nov 4, 2024

@mbrobbel - thanks for approving and merging #282!

I can either rebase this on main (post #282), then force-push, which will be "cleaner" git history with the downside of making reviews harder to follow, or I can merge in main. Any preferences?

It doesn't really matter because we squash merge in the substrait-io org. This will be one commit on main.

@wackywendell
Copy link
Contributor Author

OK, main merged in, let's see how CI goes... ⏳

@wackywendell
Copy link
Contributor Author

And CI passed! 🎉

@mbrobbel mbrobbel merged commit 0ac6248 into substrait-io:main Nov 4, 2024
37 checks passed
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.

2 participants