Skip to content

[C++][Parquet] Make MemoryPool settable on ReaderProperties #51264

Description

@pitrou

Describe the enhancement requested

In arrow/dataset/file_parquet.cc, we have to set all Parquet ReaderProperties explicitly one by one from the source configuration, only because we cannot use the ReaderProperties copy constructor and afterwards set the MemoryPool to a different value:

// Can't mutate pool after construction
parquet::ReaderProperties properties(pool);
if (parquet_scan_options->reader_properties->is_buffered_stream_enabled()) {
properties.enable_buffered_stream();
} else {
properties.disable_buffered_stream();
}
properties.set_buffer_size(parquet_scan_options->reader_properties->buffer_size());

We should make MemoryPool settable on ReaderProperties, and then simplify the dataset code to use the ReaderProperties copy constructor.

Component(s)

C++, Parquet

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions