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

Add Scalar to ScalarValue Nested Type #8846

Open
jayzhan211 opened this issue Jan 13, 2024 · 2 comments
Open

Add Scalar to ScalarValue Nested Type #8846

jayzhan211 opened this issue Jan 13, 2024 · 2 comments
Assignees

Comments

@jayzhan211
Copy link
Contributor

jayzhan211 commented Jan 13, 2024

          I know I'm coming in a little late, but have we considered instead making the type `Scalar<Arc<FixedSizeListArray>>`? ([Scalar being the one in arrow-rs](https://docs.rs/arrow/latest/arrow/array/struct.Scalar.html)) This would enforce that the length is 1, which might be nice. I could also understand if that makes it too awkward to work with.

Nested Type including, List, LargeList, FixedSizeList, Struct

Originally posted by @wjones127 in #8562 (comment)

File a ticket to trace this issue

Better start it after #7835

@jayzhan211
Copy link
Contributor Author

take

@jayzhan211
Copy link
Contributor Author

I found that I need to change the signature of create_hashes from arrays: &[ArrayRef] to arrays: &[&dyn Array],

pub fn create_hashes<'a>(
    arrays: &[&dyn Array],
    random_state: &RandomState,
    hashes_buffer: &'a mut Vec<u64>,
) -> Result<&'a mut Vec<u64>> {

Because now, we can only get &dyn Array from fn get() for Scalar

Is this breaking change reasonable?

Also, get_row_at_idx and maybe others that has argument type &[ArrayRef], is there any function that should not be changed from &[ArrayRef] to &[&dyn Array]?

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

No branches or pull requests

1 participant