Releases: spiceai/spice-rs
v3.1.0
What's Changed
- Bump version to v3.1.0 for the next release by @ewgenius in #64
- Update publish workflow to use crates.io OIDC auth to get registry token by @ewgenius in #63
- fix: Update arrow and tonic by @peasee in #65
- chore: Upgrade to arrow 57 and tonic 0.14 by @lukekim in #66
Full Changelog: v3.0.0...v3.1.0
v3.0
Announcing spice-rs v3.0 🎉
The v3.0 release optimizes the Spice client API, adds support for robust query retry, and supports more custom metadata configurations for spice query.
What's New in v3.0.0
Immutable client API: Client::query() now takes &self instead of &mut self, user can issue multiple simultaneous queries without mutable borrowing.
Automatic query retry: Support automatic query retry on transient network or server-side error when obtaining the result stream in Client::query().
Retryable query stream: Introducing RetryableQueryStream as the returned type of Client::query(). This feature provides robust retry of network interruptions during data streaming.
When a connection is reset during streaming, the stream consumer has two options:
- Option 1: Retry Query Stream
// When stream consumer continue polling after a ConnectionReset error:
// 1. The query is automatically reissued
// 2. Data streaming restarts from the beginning
// Example flow:
Poll 1: ✅ Received batch1
Poll 2: ✅ Received batch2
Poll 3: ❌ SpiceClientError::ConnectionReset error → Continue polling
Poll 4: ✅ Received batch1* (query restarted automatically)
Poll 5: ✅ Received batch2*
Poll 6: ✅ Received batch3*
...- Option 2: Stop polling
// Stream consumer can stop polling when it receives a ConnectionReset error
// The stream won't be retried
// Example flow:
Poll 1: ✅ Received batch1
Poll 2: ✅ Received batch2
Poll 3: ❌ SpiceClientError::ConnectionReset error → Stop polling and handle errorExpanded support for query parameters: Support custom User-Agent and Cache-Control query metadata configurations.
Follow the Spice OSS quickstart to install and run the spice runtime locally, and query data using the spice-rs SDK:
use spiceai::ClientBuilder;
#[tokio::main]
async fn main() {
let client = ClientBuilder::new().build().await.unwrap();
let data = client.query(
"SELECT trip_distance, total_amount FROM taxi_trips ORDER BY trip_distance DESC LIMIT 10;"
).await;
}Contributors
Breaking Changes
Client::query()now takes&selfinstead of&mut self, and returns a retryable stream typeRetryableQueryStream
// Old:
fn query(&mut self, sql: &str) -> FlightRecordBatchStream
// New:
fn query(&self, sql: &str) -> RetryableQueryStreamWhat's Changed
- Fix a typo in README.md by @digadeesh in #42
- feat: Add spice user agent, update for clippy rules by @peasee in #44
- Adding custom User-Agent to spice-rs by @eadgbear in #48
- Prepend user-supplied user-agent by @phillipleblanc in #49
- Fix broken system tls loading and test by @Sevenannn in #52
- Support query retry, parameterized query, and cache control header by @Sevenannn in #51
- Enable all tests in CI by @Sevenannn in #55
- feat: Retryable query stream by @Sevenannn in #57
- Fix macos test by @Sevenannn in #58
- docs: Add endgame release process by @peasee in #46
Full Changelog: v2.0.0...v3.0.0
v2.0
Announcing spice-rs v2.0! 🎉
The v2.0 release adds full support for Spice OSS and now connects to localhost by default instead of the Spice Cloud service.
Follow the Spice OSS quickstart to install and run the spice runtime locally, and query data using the spice-rs SDK:
use spiceai::ClientBuilder;
#[tokio::main]
async fn main() {
let mut client = ClientBuilder::new().build().await.unwrap();
let data = client.query(
"SELECT trip_distance, total_amount FROM taxi_trips ORDER BY trip_distance DESC LIMIT 10;"
).await;
}Read the docs to learn more.
Breaking Changes
- Asset Prices is now deprecated and the Prices() method and types were removed. Asset prices data can continue to be fetched using HTTP clients directly from the Spice cloud service.
- The SDK now connects to localhost by default (API Key is now optional).
What's Changed
- Add missing environment by @lukekim in #32
- Add description and license by @lukekim in #33
- Update Spice SDK installation in README.md by @sgrebnov in #34
- Remove deprecated Asset Prices API support by @lukekim in #35
- Cleanup DS_Store by @ewgenius in #37
- Add
ClientBuilderand support for connecting to local spice runtime by @ewgenius in #38 - Version to 2.0.0 by @ewgenius in #39
- Update arrow and arrow-flight to 51.0.0, and tonic to 0.11.0 by @ewgenius in #40
New Contributors
Full Changelog: v1.0.3...v2.0.0
v1.0.3
What's Changed
- Add fire_query method to client by @gloomweaver in #22
- Support firecache hotfix by @gloomweaver in #23
- Kkhramkov/support firecache 2 by @gloomweaver in #24
- Re-export futures::StreamExt by @gloomweaver in #25
- Code cleanup by @gloomweaver in #26
- Add docs, change external API by @gloomweaver in #27
- Upgrade arrow and arrow-flight to 49.0.0 by @mitchdevenport in #30
- Add publish to CI by @lukekim in #31
New Contributors
- @gloomweaver made their first contribution in #22
- @mitchdevenport made their first contribution in #30
- @lukekim made their first contribution in #31
Full Changelog: v1.0.2...v1.0.3
v1.0.2
What's Changed
- Update README.md by @Jeadie in #7
- Rust SDK v1.0.2 updates by @Sevenannn in #9
- Update README.md by @Jeadie in #10
- Update README.md by @Sevenannn in #11
- Create rust.yml by @Jeadie in #15
- Fix serde by @Jeadie in #16
Full Changelog: v1.0.1...v1.0.2
v1.0.1
Announcing spice-rs v1.0.1! 🎉
Spice.ai is now generally available! Read the announcement blog post to see how Spice helps developers to build high-performance, highly-available, data and AI-driven applications.
spice-rs is the easiest way to query data in Rust from Spice.ai over a high-performance Apache Arrow connection.
Get started in 3 steps:
- Sign up for a free API key at Spice.ai
- Add
spice-rsas a dependency in yourCargo.tomlfile. - Import
spice-rs, create a client and start querying Spice's built-in live-updating web3 data:
use spice_rs::new_spice_client;
let client = new_spice_client("API_KEY".to_string());
let data = client.query("SELECT * FROM eth.recent_blocks LIMIT 10;".to_string()).await;Explore over 100+ built-in, real-time web3 datasets available in Spice.ai!
Have questions or feedback? Contact us
What's Changed
- add README fix up prices by @Jeadie in #4
- Update README.md by @Jeadie in #5
- Change new_spice_client return type by @Sevenannn in #6
Full Changelog: v1.0.0...v1.0.1