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

Don't throw away visit result in BasePlanProtoVisitor #118

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

mortbopet
Copy link
Contributor

visitPlan is marked protected, meaning that non-subclasses of BasePlanProtoVisitor (which is probably what'll initiate the visit most of the time) cannot have access to the visit result.

Is there a specific reason that the traversal result has been hidden? If not, i suggest this change.

If so, subclasses are obviously free to implement a visitWithResult function to do the same thing.

Copy link
Member

@EpsilonPrime EpsilonPrime left a comment

Choose a reason for hiding this comment

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

I argued with myself whether it should be accessible (expecting that folks would need to pull the data out some other way or could decide to enter in a different place). Glad to have an opinion to help push the design one way or the other!

Related piece of information not useful to this review: I believe that this visitor class can be fully automatically constructed (useful to keep in line with the proto definition) but it can also be generated for any given proto as well. I've seen folks asking for generic protobuffer visitors so I know that there is demand. Now if I can only find the time...

@EpsilonPrime
Copy link
Member

Apparently I don't have the ability to update the branch and it won't let me approve the PR until the tests pass. Could you rebase the PR for me please? Thanks!

`visitPlan` is marked `protected`, meaning that non-subclasses of `BasePlanProtoVisitor` (which is probably what'll initiate the `visit` most of the time) cannot have access to the `visit` result.

Is there a specific reason that the traversal result has been hidden? If not, i suggest this change.

If so, subclasses are obviously free to implement a `visitWithResult` function to do the same thing.
@EpsilonPrime EpsilonPrime merged commit 693fe4e into substrait-io:main Sep 7, 2024
3 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