Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Made cast accept CastOptions parameter #569

Closed
jorgecarleitao opened this issue Nov 4, 2021 · 0 comments · Fixed by #561
Closed

Made cast accept CastOptions parameter #569

jorgecarleitao opened this issue Nov 4, 2021 · 0 comments · Fixed by #561

Comments

@jorgecarleitao
Copy link
Owner

Different casts may have different options. To not have to cover every combination as a different function, we should make cast accept CastOptions.

This is backward incompatible. Migrate:

let b = wrapping_cast(&array, &DataType::UInt8).unwrap();

to

    let b = cast(
        &array,
        &DataType::UInt8,
        CastOptions {
            wrapped: true,
            ..Default::default()
        },
    )

and add Default::default() as an argument to cast

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

Successfully merging a pull request may close this issue.

1 participant