Skip to content

Don't create CompressionContext when no compression is selected [IPC] #9463

@EmilyMatt

Description

@EmilyMatt

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

When attempting to run Miri on a program using arrow-ipc, there are always error on foreign calls, even when not using ZSTD, due to the CompressionContext being created all the time, even when compression is None.
I don't think we should be making unnecessary FFI calls unless we intend to use the encoder/decoder.
This is relevant both for the arrow-ipc crate, and the arrow-flight crate, but both are from the same underlying issue.

Describe the solution you'd like

CompressionContext should be an Option, or the zstd encoder/decoder within it should be an Option.
This Option should only be Some when compression is specified.

Describe alternatives you've considered

Tried disabling the feature, but it leads to a cascade of compilation failures so big it's not really worth trying to untangle right now.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions