All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.12.0 - 2026-08-19
Upgrading from 0.11.x? See the migration guide.
- Configurable retry/backoff via
RetryPolicy(max_retries,min_delay,max_delay,jitter) andClientBuilder::retry_policy. The default preserves the previous behaviour (3 retries, 1s→2s, no jitter). Retries are now idempotency-aware: idempotent page fetches (GET nextUri) retry on any transient failure (HTTP 502/503/504, connect/timeout), while query submission (POST /v1/statement) only retries when the request was definitely not processed (503, connection failures) so a non-idempotent statement (INSERT/DDL viaexecute) is never submitted twice. Query, decode, protocol and other errors fail fast Client::begin_transaction,Client::commitandClient::rollbackfor driving Trino transactions, plusClient::transaction_id/Client::set_transaction_idto inspect and set the session's transaction at runtime (previously only settable at build time viaClientBuilder::transaction_id).begin_transactionverifies that the coordinator actually returned a transaction id, soOk(())means a transaction is active — aSTART TRANSACTIONthat succeeds without a usableX-Trino-Started-Transaction-Id(a header-stripping proxy, or theNONEsentinel) is reported asError::Transactioninstead of silently leaving later statements outside any transactionError::Transaction— returned when a transaction operation is attempted in a state that does not allow it (starting one while another is active, or committing/rolling back without one)TransactionId::is_active- Interactive OAuth2 authentication (
Auth::new_oauth2/new_oauth2_with_handler). On a401Bearer challenge the client presents the login URL (browser + stderr by default, or a customRedirectHandler), polls the Trino token endpoint, and retries with the bearer token. Token is cached in-memory for the process. Coordinators with several authentication types enabled (e.g.http-server.authentication.type=PASSWORD,OAUTH2) send oneWWW-Authenticateheader per type, so every challenge header is scanned for the Bearer one rather than only the first
- Transactions were unusable. Trino returns a new transaction's identifier in
X-Trino-Started-Transaction-Id, but the client parsed that header with a function that recognised only four fixed literals. A real identifier matched none of them and was silently discarded, soSTART TRANSACTIONsucceeded on the coordinator while every subsequent statement sentX-Trino-Transaction-Id: NONEand ran outside the transaction — andCOMMIT/ROLLBACKcould not address it. The identifier is now retained and sent on every subsequent request - Unparseable
X-Trino-Set-Roleheader values are now logged instead of being dropped silently
- Breaking:
TransactionIdnow models what theX-Trino-Transaction-Idheader actually carries:NoTransaction | Id(String). TheStartTransaction,RollBackandCommitvariants are removed — they are SQL statements, not header values, and sending them produced a header Trino does not accept.to_stris replaced byas_header_value(&self) -> &strandfrom_strby the infalliblefrom_header_value(&str) -> Self.TransactionIdis no longerCopy(it now owns aString); it is stillClone, and now alsoPartialEqandEq. See the migration guide - Breaking:
Authis now#[non_exhaustive]and has a newOAuth2variant. ExhaustivematchonAuthmust add a wildcard arm - Updated the
base64requirement from 0.22 to 0.23 - Raised the minimum supported Rust version (MSRV) from 1.86 to 1.88. The
icu_*crates, pulled in transitively throughurl→idna, now require rustc 1.88; the CI job that enforces the MSRV was bumped to match
0.11.0 - 2026-07-19
Upgrading from 0.10.x? See the migration guide.
Client::get_all,Client::getandClient::executenow acceptimpl Into<String>for the SQL, so&strliterals work without.to_string()(consistent withClient::stream). ExistingStringcall sites are unaffectedVarBinarytype for TrinoVARBINARYcolumns — decodes/encodes the base64 wire format into raw bytes (base64is now a core dependency). Confirmed thatJson(serde_json::Value) andTimestampWithTimeZone(chrono::DateTime<FixedOffset>) already decode, and added tests- Crate-level documentation with a runnable quickstart, and doc comments on the core public API (
Client,ClientBuilder,get_all/get/get_next/cancel,ExecuteResult). docs.rs now builds with all features QueryError::kind()returning a#[non_exhaustive]TrinoErrorKindenum, for ergonomic, discoverable matching on the common Trino error names (TableNotFound,SchemaNotFound,SyntaxError, …) without comparing raw strings; falls back toTrinoErrorKind::OtherClient::stream— lazily stream query rows page by page without buffering the whole result set in memory (Direct and Spooled protocols). Returns aRowStreamthat resolves the result columns up front (RowStream::columns() -> &[Column]), implementsfutures::Stream, isSend/Unpin, and best-effort cancels the query on the coordinator if dropped before completion
- Declared a minimum supported Rust version (MSRV) of 1.86 and added a CI job that enforces it
- Unsupported Trino column types now fail with
Error::UnsupportedTypenaming the type (e.g.unsupported Trino type: HyperLogLog) instead of a generic error - Switched logging from the
logcrate totracing: the same events are now emitted viatracing, andget_all/stream/executeare wrapped in a span carrying thequery_idfor per-query correlation. Install atracingsubscriber to see them - The library now depends on
tokiowith only thertandsyncfeatures instead offull, shrinking the dependency footprint and compile time for consumers (no longer pullsfs/process/signal/…). Tests and examples keep the fuller feature set via dev-dependencies - Breaking: Restructured the
Errorenum for consistent, matchable errors. A Trino query failure is now a singleError::Query(Box<QueryError>)carrying the full structured error — match onerror_code/error_name/error_type, or reach it viastd::error::Error::source()(the top-levelDisplaystays concise:query error [NAME]: message). Both the query and execute code paths now map failures identically (anderror_code == 4still maps toError::Forbidden). Added typedError::Decode,Error::TlsandError::Protocolvariants in place of many stringlyInternalErrors.Erroris now#[non_exhaustive]so future variants can be added without a breaking change - Breaking: Unified the two Trino error representations — removed
error::TrinoError/TrinoErrorLocation;TrinoRetryResult::erroris nowOption<models::QueryError>, andQueryError::failure_infois nowOption<FailureInfo>
- Breaking: Removed the name-mapped
Errorvariants (CatalogNotFound,SchemaNotFound,TableNotFound,TableAlreadyExists,InvalidCatalog, …) and the unusedError::EmptyData(no longer produced since zero-row queries return an empty result). Match on the structuredError::Query'serror_nameinstead
0.10.0 - 2026-07-18
- Updated dependencies to remediate 13 RustSec advisories in transitive crates, including
aws-lc-sys(X.509/PKCS7 validation bypasses, timing side-channel),quinn-proto(DoS, memory exhaustion),rustls-webpki(CRL/name-constraint validation, parsing panic),bytes(integer overflow) andslab(out-of-bounds, yanked) #44
- Refreshed direct dependency versions (
backon,chrono,futures,http,log,regex,reqwest,serde_json,tokio,tracing-subscriber,uuid) #44 - Replaced the unmaintained
dotenvdev-dependency with the maintaineddotenvy#44 - Bumped
trino-rust-client-macrosto 0.7.2 (adds#[trino(rename = "...")]support)
- Breaking: Removed the unused
Trinofeature #40 - Breaking: The optional
spoolingcodec dependencies (base64,zstd,lz4,flate2) are no longer exposed as standalone public features; they are now declared viadep:and can only be enabled through thespoolingfeature #40
- Support configuring the name of the result field when using the
Trinoderive macro #43 - Derive
Serializeon the result, error, stat, warning and segment model types to allow serializing query results (credit to @sbernauer, originally #42)
0.9.3 - 2026-02-19
auth_http_insecureoption to allow authentication over HTTP #34
- Boxed
reqwest::ErrorandQueryErrorin error enum to reduceResultsize #32 - Removed unnecessary
clippy::result_large_errsuppressions #32 - Masked JWT token in
Auth::Jwtdebug output #34 - Refreshed dependency versions #35
0.9.2 - 2025-11-20
- Bumped trino-rust-client-macros to 0.7.1
- Integration tests are no longer published to crates.io
0.9.1 - 2025-11-20
- Spooling protocol support for efficient large result set handling #26
- New
spooling_encodingconfiguration option (supports json+zstd, json+lz4, json+gzip) - New
max_concurrent_segmentsconfiguration for controlling concurrent downloads - Spooling feature flag with compression support (zstd, lz4, gzip)
- Bumped trino-rust-client-macros to 0.7.0
0.8.0 - 2025-01-XX
- Return execute result with operation type and counts #24
- Fixed prepared statement header decoding #23
- Ensure finished prepared statement's results are parsed accordingly #22
0.5.1 - 2023-10-19
- Make Client::get and some functions public #29
0.5.0 - 2023-02-27
- v0.5.0 can be used with stable rust.
- Add SSL root certificate support #22
- Provide a feature flag for running as presto client #19
0.4.0 - 2022-02-07
- Use
Rust 2021
0.3.0 - 2021-05-26
- Use
Trinoprotocol - Add
executetoClient - Add more session properties
- Fix deserialization of
ClientTypeSignatureParameter
0.2.0 - 2021-01-06
- Add
len,as_slicemethods toDataSet<T> - Update
tokiostack to 1.0 - Use
rustlsinstead ofnative-tls
0.1.2 - 2020-10-30
- Make
QueryError::error_locationoptional
0.1.1 - 2020-10-09
- Add
'staticbound to key and value types of map like types
0.1.0 - 2020-10-01
- Initial release