Skip to content

extract enum fields to named structs #315

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

Closed
wants to merge 3 commits into from
Closed

extract enum fields to named structs #315

wants to merge 3 commits into from

Conversation

cmoog
Copy link

@cmoog cmoog commented Jun 3, 2021

Addresses #311

Maybe it's appropriate to continue this refactor for Expr as well as the remaining Statement variants? Those seem much less pressing though since nearly all have <= 3 fields.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

This seems like a useful improvement to me (though as @cmoog points out a fairly large backwards incompatible change which will cause pain for downstream crates)

Any other thoughts?

cc @Dandandan and @andygrove

@Dandandan
Copy link
Contributor

Addresses #311

Maybe it's appropriate to continue this refactor for Expr as well as the remaining Statement variants? Those seem much less pressing though since nearly all have <= 3 fields.

Thank you for this PR.

I think it make sense if we do this, consistently do it for all statement variants.

I would be OK to not do the same thing for Expr now, I am not sure if there is a similar need to do it there too?

@alamb
Copy link
Contributor

alamb commented Dec 8, 2021

Closing old seemingly stalled PR. Please re-open if this was a mistake

@AugustoFKL
Copy link
Contributor

@alamb @Dandandan I currently would love to have that approach, since my usage is requiring a lot of "unreachable!()" because of that.

Is that idea still OK? I can work on that this week

@alamb
Copy link
Contributor

alamb commented Sep 27, 2022

Hi @AugustoFKL -- I think given that the sqlparser API is basically stable, I don't really want to contemplate such a large change at this time :(

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.

4 participants