-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
consolidate binary_expr coercion rule code into binary_rule.rs
module
#1607
Conversation
cc @liukun4515 |
Thanks @alamb |
If #1606 merged, I will review this. |
No worries @liukun4515 -- you said that. I just figured I was already changing the code for #1606 so I would make progress here too Also note there is no actual consolidation of the logic -- I just moved the code to the same module. I envision your cleanup to consolidate the actual logic would be in a follow on PR |
0c3ee94
to
90d9a27
Compare
binary_rule.rs
module
90d9a27
to
c065f05
Compare
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, so much cleaner
Co-authored-by: xudong.w <[email protected]>
@@ -293,14 +289,192 @@ fn coercion_decimal_mathematics_type( | |||
} | |||
} | |||
|
|||
/// Determine if a DataType is signed numeric or not | |||
pub fn is_signed_numeric(dt: &DataType) -> bool { |
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.
} | ||
|
||
/// Determine if a DataType is numeric or not | ||
pub fn is_numeric(dt: &DataType) -> bool { |
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.
} | ||
} | ||
|
||
pub(crate) fn is_dictionary(t: &DataType) -> bool { |
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.
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
Builds on #1606, so draft until that is mergedWhich issue does this PR close?
Re #1605
Rationale for this change
While working on #1606 I found it confusing that some of the logic was in
coercion.rs
and some inbinary_rule.rs
What changes are included in this PR?
Moves all binary operator coercion logic into
binary_rule.rs
(just code motion, no changes now). I hope that the logic is consolidated more in a future PRAre there any user-facing changes?
no