-
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
Minor: Encapsulate type check in GroupValuesColumn, avoid panic #12620
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.
Thanks @alamb it looks good to me. Only one minor suggestion for error handling.
datafusion/physical-plan/src/aggregates/group_values/column_wise.rs
Outdated
Show resolved
Hide resolved
datafusion/physical-plan/src/aggregates/group_values/column_wise.rs
Outdated
Show resolved
Hide resolved
fn supported_type(data_type: &DataType) -> bool { | ||
matches!( | ||
*data_type, | ||
DataType::Int8 |
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.
should we use DataType::is_signed_integer
DataType::is_unsigned_integer
we can also use is_numeric
but it includes Decimals
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 list needs to be kept in sync with what special implementations are available in GroupValuesColumns
-- I will add a comment to make that clearer
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 @alamb
…se.rs Co-authored-by: Oleks V <[email protected]>
…o alamb/minor_cleanup
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.
👍
Thank you for the review @jayzhan211 |
Thanks @comphead and @jayzhan211 |
Which issue does this PR close?
Follow on to #12269 from @jayzhan211
Rationale for this change
I had some minor suggestions during review: #12269 (review)
What changes are included in this PR?
Are these changes tested?
CI
Are there any user-facing changes?