-
Notifications
You must be signed in to change notification settings - Fork 213
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
feat(binder): support implicit type conversion in binary op #301
Conversation
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
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.
Rest LGTM, good work!
src/binder/expression/binary_op.rs
Outdated
let right_physical_kind = right_data_type.physical_kind(); | ||
if left_physical_kind != right_physical_kind { | ||
match (left_physical_kind, right_physical_kind) { | ||
( |
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.
This pattern match seems... hard to read? I think it's better to return true
/ false
for this match arm, and expand them in the match.
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.
Added comment for this not-equal check, which is used for filtering the case that need to do implicit casting. And the match
here is used for deciding inserting BoundTypeCast
to left expr or right expr.
close #280