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

[53.0.0_maintenance] perf: Use Cow in get_format_string in FFI_ArrowSchema (#6853) #6937

Merged
merged 3 commits into from
Jan 5, 2025

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Jan 3, 2025

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

* add cast_decimal bench

* format

* save

* revert

* criterion disable default features

* address feedback
@github-actions github-actions bot added the arrow Changes to the arrow crate label Jan 3, 2025
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 @andygrove 🙏

@@ -685,66 +686,68 @@ impl TryFrom<&DataType> for FFI_ArrowSchema {
}
}

fn get_format_string(dtype: &DataType) -> Result<String, ArrowError> {
fn get_format_string(dtype: &DataType) -> Result<Cow<'static, str>, ArrowError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I double checked that this is not a public API (and this is fine for a non breaking API release)

https://docs.rs/arrow-schema/latest/arrow_schema/?search=get_format_string

Looks good ✅

@alamb alamb merged commit 3a93166 into apache:53.0.0_maintenance Jan 5, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants