Skip to content
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

Merged
merged 8 commits into from
Sep 26, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Sep 25, 2024

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?

  1. Move type checking into the same module that it needs to be kepy in sync with
  2. return internal error than panic on bug

Are these changes tested?

CI

Are there any user-facing changes?

Copy link
Contributor

@goldmedal goldmedal left a 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.

fn supported_type(data_type: &DataType) -> bool {
matches!(
*data_type,
DataType::Int8
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks @alamb

Copy link
Contributor

@jayzhan211 jayzhan211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alamb
Copy link
Contributor Author

alamb commented Sep 26, 2024

Thank you for the review @jayzhan211

@alamb alamb merged commit 9a3f8d1 into apache:main Sep 26, 2024
24 checks passed
@alamb
Copy link
Contributor Author

alamb commented Sep 26, 2024

Thanks @comphead and @jayzhan211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants