Skip to content

Trino Python client is broken if lz4/zstd native libs can't be loaded instead of degrading gracefully #584

@xkrogen

Description

@xkrogen

After #509, dependencies were added on lz4/zstd, which have dependencies on platform-specific native libraries. Usually Python packaging will handle this transparently, but in some environments it may be challenging to get the native libs configured correctly and it generally makes the Trino client less portable. These encoding libraries are only required when the spooling protocol is used, and even if the spooling protocol is used, clients can choose which encoding to use, including json which does not require any native libs.

I propose that we make it so that if the imports for lz4/zstd fail, indicating an environment issue, we don't fail loading of the entire Trino library. Instead, it should just be impossible to use the json+lz4/json+zstd encodings for the spooled protocol, while leaving all other functionality intact.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions