Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
94ebd97
added sqlite conn to metastore, metastore new changed from sync to async
YaroslavLitvinov Oct 23, 2025
ebc781e
Merge remote-tracking branch 'origin/main' into yaro/sqlite-metastore
YaroslavLitvinov Oct 23, 2025
f551732
add patchdog workflow
YaroslavLitvinov Oct 23, 2025
0f10c4f
add workflow dispatch
YaroslavLitvinov Oct 23, 2025
5914c47
stage before merging main
YaroslavLitvinov Oct 24, 2025
0851f8b
Merge remote-tracking branch 'origin/main' into yaro/sqlite-metastore
YaroslavLitvinov Oct 24, 2025
9aa26a3
metastore tests separated from implemetation; remove utoipa::ToSchema…
YaroslavLitvinov Oct 25, 2025
ed61103
metastore api simplify
YaroslavLitvinov Oct 25, 2025
76c45c8
added ID to RwObject
YaroslavLitvinov Oct 26, 2025
dd7aed6
broken, staged
YaroslavLitvinov Oct 27, 2025
5d3f7f4
staged wip
YaroslavLitvinov Oct 28, 2025
5305557
merged
YaroslavLitvinov Oct 29, 2025
b588851
stage volumes basic ops ok
YaroslavLitvinov Oct 29, 2025
51e493c
move from iter_volumes to get_volumes
YaroslavLitvinov Oct 29, 2025
82f8e9a
volume tests fixes
YaroslavLitvinov Oct 30, 2025
47b0224
wip
YaroslavLitvinov Nov 1, 2025
145ea36
make it compilable after databases support
YaroslavLitvinov Nov 2, 2025
5f2f634
run test server in separate thread
YaroslavLitvinov Nov 3, 2025
c793523
staged
YaroslavLitvinov Nov 3, 2025
7776c57
Merge remote-tracking branch 'origin/main' into yaro/sqlite-metastore
YaroslavLitvinov Nov 3, 2025
82fe602
wip
YaroslavLitvinov Nov 4, 2025
c1433fa
before changes
YaroslavLitvinov Nov 4, 2025
5877ce7
wip
YaroslavLitvinov Nov 5, 2025
797b957
draft
YaroslavLitvinov Nov 5, 2025
2e52499
some fixes, tests failing
YaroslavLitvinov Nov 6, 2025
c8dce28
fix known metastore bugs
YaroslavLitvinov Nov 6, 2025
f839468
lint
YaroslavLitvinov Nov 6, 2025
e337143
fmt
YaroslavLitvinov Nov 6, 2025
dbd70da
merged with main
YaroslavLitvinov Nov 6, 2025
1bd415d
Merge remote-tracking branch 'origin' into yaro/sqlite-metastore
YaroslavLitvinov Nov 6, 2025
ea97b3e
couple of snapshots
YaroslavLitvinov Nov 6, 2025
27774f7
staged work, use ids for compile time checks
YaroslavLitvinov Nov 7, 2025
e328080
fmt
YaroslavLitvinov Nov 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 153 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ insta = { version = "1.42.0", features = ["json", "filters", "redactions"] }
cfg-if = { version = "1.0.3" }
rusqlite = { version = "0.37.0", features = ["blob", "trace", "bundled"] }
deadpool-sqlite = { version = "0.12.1", features = ["tracing"] }
deadpool = { version = "0.12.3" }
deadpool-diesel = { version = "0.6.1", features = ["sqlite", "tracing"] }

[patch.crates-io]
datafusion = { git = "https://github.com/Embucket/datafusion.git", rev = "832c278922863064571c0a7c5716a3ff87ce5201" }
Expand Down
15 changes: 5 additions & 10 deletions crates/api-iceberg-rest/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ impl IntoResponse for Error {
fields(status_code),
skip(self)
)]
#[allow(clippy::match_same_arms)]
fn into_response(self) -> axum::response::Response {
tracing::error!(error_message = %self.output_msg(), "Iceberg API error");
let metastore_error = match self {
Expand Down Expand Up @@ -87,16 +88,10 @@ impl IntoResponse for Error {
| core_metastore::Error::TableNotFound { .. }
| core_metastore::Error::ObjectNotFound { .. } => http::StatusCode::NOT_FOUND,
core_metastore::Error::ObjectStore { .. }
| core_metastore::Error::ObjectStorePath { .. }
| core_metastore::Error::CreateDirectory { .. }
| core_metastore::Error::SlateDB { .. }
| core_metastore::Error::UtilSlateDB { .. }
| core_metastore::Error::Iceberg { .. }
| core_metastore::Error::IcebergSpec { .. }
| core_metastore::Error::Serde { .. }
| core_metastore::Error::TableMetadataBuilder { .. }
| core_metastore::Error::TableObjectStoreNotFound { .. }
| core_metastore::Error::UrlParse { .. } => http::StatusCode::INTERNAL_SERVER_ERROR,
| core_metastore::Error::ObjectStorePath { .. } => {
http::StatusCode::INTERNAL_SERVER_ERROR
}
_ => http::StatusCode::INTERNAL_SERVER_ERROR,
};

// Record the result as part of the current span.
Expand Down
8 changes: 4 additions & 4 deletions crates/api-iceberg-rest/src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ use crate::state::State as AppState;
use axum::http::StatusCode;
use axum::{Json, extract::Path, extract::Query, extract::State};
use core_metastore::error::{self as metastore_error};
use core_metastore::{SchemaIdent as MetastoreSchemaIdent, TableIdent as MetastoreTableIdent};
use core_metastore::{
ListParams, SchemaIdent as MetastoreSchemaIdent, TableIdent as MetastoreTableIdent,
};
use core_utils::scan_iterator::ScanIterator;
use iceberg_rest_catalog::models::{
CatalogConfig, CommitTableResponse, CreateNamespaceRequest, CreateNamespaceResponse,
Expand Down Expand Up @@ -94,10 +96,8 @@ pub async fn list_namespaces(
) -> Result<Json<ListNamespacesResponse>> {
let schemas = state
.metastore
.iter_schemas(&database_name)
.collect()
.get_schemas(ListParams::default().by_parent_name(database_name.clone()))
.await
.context(metastore_error::UtilSlateDBSnafu)
.context(api_iceberg_rest_error::MetastoreSnafu {
operation: Operation::ListNamespaces,
})?;
Expand Down
2 changes: 1 addition & 1 deletion crates/api-iceberg-rest/src/state.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use core_metastore::metastore::Metastore;
use core_metastore::Metastore;
use std::sync::Arc;

use serde::{Deserialize, Serialize};
Expand Down
5 changes: 3 additions & 2 deletions crates/api-snowflake-rest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ default-server = [
"dep:tower-http",
"dep:axum",
"dep:snafu",
"dep:tracing",
"dep:flate2",
"dep:indexmap",
"dep:datafusion",
Expand All @@ -36,12 +35,12 @@ error-stack-trace = { path = "../error-stack-trace" }
error-stack = { path = "../error-stack" }

tracing-subscriber = { version = "0.3.20", features = ["env-filter", "registry", "fmt", "json"] }
tracing = { workspace = true }

tower-sessions = { workspace = true, optional = true }
tower-http = { workspace = true, optional = true }
axum = { workspace = true, optional = true }
snafu = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }
flate2 = { version = "1", optional = true}
indexmap = { workspace = true, optional = true }
base64 = { version = "0.22" }
Expand All @@ -55,6 +54,8 @@ time = { workspace = true }
uuid = { workspace = true }
tokio = { workspace = true }
cfg-if = { workspace = true }
axum-server = "0.7.2"
futures = "0.3.31"

[dev-dependencies]
insta = { workspace = true }
Expand Down
5 changes: 3 additions & 2 deletions crates/api-snowflake-rest/src/server/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ pub async fn abort(
request_id,
}): Json<AbortRequestBody>,
) -> Result<Json<serde_json::value::Value>> {
state
let _query_status = state
.execution_svc
.abort_query(RunningQueryId::ByRequestId(request_id, sql_text))?;
.abort_query(RunningQueryId::ByRequestId(request_id, sql_text))
.await?;
Ok(Json(serde_json::value::Value::Null))
}
Loading
Loading