-
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
fix: make get_valid_types handle TypeSignature::Numeric correctly #14060
base: main
Are you sure you want to change the base?
Conversation
} else if !logical_data_type.is_numeric() { | ||
return plan_err!( | ||
"The signature expected NativeType::Numeric but received {logical_data_type}" | ||
); |
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'm not entirely clear on the rationale for falling back to Float64 when the argument is of type Null.
However, I choose to keep this logic and make it a short-circuit before the numeric check.
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.
f64 is chosen since it is the most compatible type of numeric
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 need to bump Rust to 1.84 to pass CI |
1d39025
to
3cf710c
Compare
Which issue does this PR close?
Closes #14059.
Rationale for this change
What changes are included in this PR?
Make
get_valid_types
handle TypeSignature::Numeric(n) correctly, for various n.Are these changes tested?
Yes, added a unit test.
Are there any user-facing changes?
No.