Skip to content

Add Scalar to ScalarValue Nested Type #8846

Open

Description

@jayzhan211
          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

Activity

  1. jayzhan211 commented on Mar 3, 2024

    @jayzhan211
    ContributorAuthor

    take

  2. jayzhan211 commented on Mar 3, 2024

    @jayzhan211
    ContributorAuthor

    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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions