-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add support for Zstd, Brotli, Gzip compression to client #26875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR implements client-side support for Zstd, Brotli, and Gzip compression by adding the necessary dependencies, wiring a CompressionInterceptor into the OkHttpClient builder based on URI settings, updating the JDBC shading plugin to relocate the new libraries, and adjusting the JDBC driver tests to recognize jni artifacts. Class diagram for CompressionInterceptor integrationclassDiagram
class HttpClientFactory {
+unauthenticatedClientBuilder(uri: TrinoUri, String): OkHttpClient.Builder
-setupCompression(builder: OkHttpClient.Builder)
}
class CompressionInterceptor {
+CompressionInterceptor(zstd: Zstd, brotli: Brotli, gzip: Gzip)
}
class Zstd
class Brotli
class Gzip
HttpClientFactory --> CompressionInterceptor : uses
CompressionInterceptor --> Zstd : uses
CompressionInterceptor --> Brotli : uses
CompressionInterceptor --> Gzip : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked that compression is negotiated by the client when it's enabled on the server side:
|
Description
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:
Summary by Sourcery
Enable optional Brotli, Zstd, and Gzip compression in the Trino client by adding the necessary dependencies, configuring a CompressionInterceptor in the HTTP client factory, and adjusting package relocation rules in the JDBC client
New Features:
Enhancements:
Tests: