Skip to content

[C++][Parquet] Allow use of FileDecryptionProperties after CryptoFactory is destroyed #40328

Closed

Description

@adamreeve

Describe the enhancement requested

The CryptoFactory::GetFileDecryptionProperties method has this comment:

/// The returned FileDecryptionProperties object will use the cache inside this
/// CryptoFactory object, so please keep this
/// CryptoFactory object alive along with the returned
/// FileDecryptionProperties object.

I've recently been working on adding bindings to the Parquet key management tools API to ParquetSharp, a .NET Parquet library that wraps the Arrow C++ Parquet library: G-Research/ParquetSharp#426

I couldn't find a good way to keep the CryptoFactory alive as long as the FileDecryptionProperties are alive, so this means that users of the .NET library have to be aware of this requirement to avoid getting a native error from the C++ library that can't be caught as a .NET exception.

Ideally for our use case, the FileDecryptionProperties could remain alive independent of the CryptoFactory. It seems to me like this would also be better for other uses of the C++ API, by making the API simpler and more robust.

I will make a PR with a proposed change to fix this.

Component(s)

C++, Parquet

Activity

  1. adamreeve commented on Mar 3, 2024

    @adamreeve
    ContributorAuthor

    take

  2. added a commit that references this issue on Mar 21, 2024
  3. pitrou commented on Mar 21, 2024

    @pitrou
    Member

    Issue resolved by pull request 40329
    #40329

  4. added this to the 16.0.0 milestone on Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions