-
Notifications
You must be signed in to change notification settings - Fork 662
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
Use ArrayFormatter in cast kernel #4668
Conversation
@@ -622,21 +622,6 @@ where | |||
Ok(Arc::new(array)) | |||
} | |||
|
|||
// cast the List array to Utf8 array | |||
macro_rules! cast_list_to_string { |
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.
Changing to use ArrayFormatter is both faster, as it avoids intermediate string allocations, whilst also respecting format options
@@ -8989,4 +8950,19 @@ mod tests { | |||
fn test_const_options() { | |||
assert!(CAST_OPTIONS.safe) | |||
} | |||
|
|||
#[test] | |||
fn test_list_format_options() { |
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.
Test for #4669
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.
It looks good that it removes custom logic in many places.
Which issue does this PR close?
Closes #4669
Rationale for this change
What changes are included in this PR?
Follow up to #4666 uses ArrayFormatter in more places instead of custom logic
Are there any user-facing changes?