-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Refactor Expr::Case to use a struct
#3757
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
Conversation
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| when_then_expr, | ||
| else_expr, | ||
| } => { | ||
| Expr::Case(case) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you wanted to avoid &case I think you could do like
| Expr::Case(case) => { | |
| Expr::Case(Case { | |
| expr, | |
| when_then_expr, | |
| else_expr, | |
| }) => { |
Maybe the & is nicer syntax 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I debated between the two styles too. I don't have a strong preference either way
|
Benchmark runs are scheduled for baseline = 567ca5d and contender = 488b2ce. 488b2ce is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Part of #2175
Rationale for this change
There were recent discussions (see #2175) about making
Exprmore consistent withLogicalPlanwhere variants wrap structs. There seemed to be consensus that this was the direction we want to go.I have not seen anyone start on this so thought I would get the ball rolling.
This PR applies this for
Expr::Case.What changes are included in this PR?
Are there any user-facing changes?