Skip to content

Conversation

@Weijun-H
Copy link
Member

@Weijun-H Weijun-H commented Sep 20, 2025

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Yes

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Sep 20, 2025
@Weijun-H Weijun-H force-pushed the 8382-decimal-display branch from 81f5411 to 3b3c6b0 Compare September 20, 2025 09:19
@Weijun-H Weijun-H marked this pull request as draft September 20, 2025 10:33
@Weijun-H Weijun-H force-pushed the 8382-decimal-display branch from 3b3c6b0 to e87504e Compare September 21, 2025 14:05
@Weijun-H Weijun-H marked this pull request as ready for review September 21, 2025 14:05
@Weijun-H Weijun-H force-pushed the 8382-decimal-display branch from ed8cd9b to 4e6a05e Compare September 21, 2025 19:26
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @Weijun-H -- this looks like a very nice usability improvement to me


/// Validates that `value` contains no more than `precision` decimal digits
fn validate_decimal_precision(value: Self::Native, precision: u8) -> Result<(), ArrowError>;
fn validate_decimal_precision(
Copy link
Contributor

Choose a reason for hiding this comment

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

this is technically a breaking API change as it adds new functions. However, I think it is reasonable

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you potentially add a new function with the new signature and deprecate the old one to ease upgrades?

Copy link
Contributor

Choose a reason for hiding this comment

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

I re-reviewed this and I think I missed it was a trait method (and we had some bad luck trying to deprecate traits) -- the compiler doesn't seem to complain if you implement a deprecated trait 🤔

Maybe we should just keep it the way you original had it? If you agree I can revert the cahnge

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry about the churn

Copy link
Member Author

Choose a reason for hiding this comment

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

No worry, I reverted the change

@alamb alamb added the api-change Changes to the arrow API label Sep 22, 2025
@alamb alamb added this to the 57.0.0 milestone Sep 22, 2025
@Weijun-H Weijun-H force-pushed the 8382-decimal-display branch from 3107320 to 307a217 Compare September 23, 2025 07:17
@alamb alamb merged commit 63d0003 into apache:main Sep 23, 2025
52 checks passed
@alamb
Copy link
Contributor

alamb commented Sep 23, 2025

Thanks again @Weijun-H

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

Labels

api-change Changes to the arrow API arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decimal precision validation displays value without accounting for scale

2 participants