Skip to content

extract enum fields to named structs - #315

Closed
cmoog wants to merge 3 commits into
apache:mainfrom
cmoog:named-structs
Closed

cmoog wants to merge 3 commits into
apache:mainfrom
cmoog:named-structs

Conversation

@cmoog

@cmoog cmoog commented Jun 3, 2021

Copy link
Copy Markdown

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.

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

alamb commented Dec 8, 2021 •

Copy link
Copy Markdown
Contributor

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

@AugustoFKL

Copy link
Copy Markdown
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

alamb commented Sep 27, 2022

Copy link
Copy Markdown
Contributor

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