diff --git a/CHANGELOG.md b/CHANGELOG.md index bb8a38e..a3f2e29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,15 @@ All notable changes to this project will be documented in this file. - Support configuring compression for OTEL ([#70]). - Improve tracing details by adding a `tower_http::trace::TraceLayer` that creates spans for every HTTP request ([#71]). + +### Changed + - Improve tracing for running queries on Trino, adding spans for the request to Trino and parsing ([#71]). +- Improve performance by using [`serde_json::value::RawValue`](https://docs.rs/serde_json/latest/serde_json/value/struct.RawValue.html) for the `data` and `columns` attributes to avoid unneeded deserialization and serialization of them ([#73]). [#70]: https://github.com/stackabletech/trino-lb/pull/70 [#71]: https://github.com/stackabletech/trino-lb/pull/71 +[#73]: https://github.com/stackabletech/trino-lb/pull/73 ## [0.4.1] - 2025-03-03 diff --git a/trino-lb-core/src/trino_api.rs b/trino-lb-core/src/trino_api.rs index 60e3ce9..5867151 100644 --- a/trino-lb-core/src/trino_api.rs +++ b/trino-lb-core/src/trino_api.rs @@ -5,6 +5,7 @@ use std::{ use prusto::{QueryError, Warning}; use serde::{Deserialize, Serialize}; +use serde_json::value::RawValue; use snafu::{ResultExt, Snafu}; use tracing::instrument; use url::Url; @@ -42,8 +43,8 @@ pub struct TrinoQueryApiResponse { pub info_uri: String, pub partial_cancel_uri: Option, - pub columns: Option, - pub data: Option, + pub columns: Option>, + pub data: Option>, pub error: Option, pub warnings: Vec,