Skip to content

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

@adamreeve

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions