Skip to content

get_buffer_memory_size() returns an incorrect larger size #5352

@Yifeng-Sigma

Description

@Yifeng-Sigma

Which part is this question about

Question about get_buffer_memory_size() method

Describe your question

We have an arrow chunk which consists of two columns, all generic string type.
If we use value() method to pull out each string value and add up, the total size is 108684 bytes.
If we use value_data().len(), gives us 108684 bytes
If we use value_offsets().len() gives us 5430 bytes
But use get_buffer_memory_size() gives us 521664 bytes
NullBuffer is 0.

Noticed that the implementation of get_buffer_memory_size() is basically to add up value_offsets, value_data and null buffer. But why there's a significant difference? Here 108684 is what we expect.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions