Skip to content

Make compression adaptive with V2 data pages #3344

@pitrou

Description

@pitrou

Describe the enhancement requested

When writing a V2 data page, it seems that compression is always unconditionally enabled even when compression doesn't actually yield any benefits:

boolean compressed = false;
BytesInput compressedData = BytesInput.empty();
if (data.size() > 0) {
// TODO: decide if we compress
compressedData = compressor.compress(data);
compressed = true;
}

It would be relatively easy to use a hardcoded threshold (for example 98%) above which compression is disabled, which makes reading faster.

Component(s)

Core

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions