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

GH-44392: [GLib] Add GArrowDecimal32DataType #44580

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

hiroyuki-sato
Copy link
Contributor

@hiroyuki-sato hiroyuki-sato commented Oct 30, 2024

Rationale for this change

arrow::Decimal32Type data type has been introduced. It is also necessary to support the same data type in GLib.

What changes are included in this PR?

This PR implements GArrowDecimal32DataType.

Are these changes tested?

YES

Are there any user-facing changes?

Before this change garrow_decimal_data_type_new() returns GArrowDecimal64DataType if the precision is less than garrow_decimal64_data_type_max_precision().
After this change, it returns GArrowDecimal32DataType if the precision is less than garrow_decimal32_data_type_max_precision().

Copy link

⚠️ GitHub issue #44392 has been automatically assigned in GitHub to PR creator.

* #GArrowDecimal32DataType is used if @precision up to 9
* #GArrowDecimal64DataType is used if @precision up to 19
* #GArrowDecimal128DataType is used if @precision up to 38
* Otherwise, #GArrowDecimal256DataType is used
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kou What do you think of this comment?

Comment on lines -118 to -119
/* TODO: Remove = 44 when we add STRING_VIEW..DECIMAL32. */
GARROW_TYPE_DECIMAL64 = 44,
Copy link
Member

Choose a reason for hiding this comment

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

We can't remove this.
If we remove this, GARROW_TYPE_DECIMAL32 is 39 and GARROW_TYPE_DECIMAL64 is 40.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks fixed. I didn't understand what STRING_VIEW meant. Oh, It is the data type.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Oct 30, 2024
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

@kou kou merged commit 5b68eca into apache:main Oct 30, 2024
11 checks passed
@kou kou removed the awaiting changes Awaiting changes label Oct 30, 2024
@github-actions github-actions bot added the awaiting merge Awaiting merge label Oct 30, 2024
Copy link

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 5b68eca.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants