-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Refactor Expr::GetIndexedField to use a struct #3838
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.
Thanks @ygf11
| Expr::GetIndexedField(get_indexed_field) => { | ||
| let expr = create_physical_name(&get_indexed_field.expr, false)?; | ||
| Ok(format!("{}[{}]", expr, get_indexed_field.key)) |
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 recommend this style so that if we ever change GetIndexedField the compiler will tell us all the places where a new field may be needed
| Expr::GetIndexedField(get_indexed_field) => { | |
| let expr = create_physical_name(&get_indexed_field.expr, false)?; | |
| Ok(format!("{}[{}]", expr, get_indexed_field.key)) | |
| Expr::GetIndexedField(GetIndexedField { expr, key }) => { | |
| let expr = create_physical_name(expr, false)?; | |
| Ok(format!("{}[{}]", expr, key)) |
jackwener
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, thanks @ygf11
|
@ygf11 There are some conflicts in this PR now, so I will move to draft until those are resolved - please mark this as ready for review once these are resolved. |
|
@alamb @andygrove @jackwener I resolved comment and conflicts, PTAL. |
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.
Thanks @ygf11
Which issue does this PR close?
Part of #2175 and #3807
Rationale for this change
Refactor
Expr::GetIndexedFieldto use a struct.What changes are included in this PR?
Are there any user-facing changes?