diff --git a/src/server/Cargo.toml b/src/server/Cargo.toml index 454c168894..03ad792971 100644 --- a/src/server/Cargo.toml +++ b/src/server/Cargo.toml @@ -32,10 +32,10 @@ workspace = true [dependencies] actix-web = "4" +arrow = { workspace = true } futures = { workspace = true } metric_engine = { workspace = true } +object_store = { workspace = true } tokio = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } -object_store = { workspace = true } -arrow = { workspace = true } diff --git a/src/server/src/main.rs b/src/server/src/main.rs index 99c109a6c6..c02bc93900 100644 --- a/src/server/src/main.rs +++ b/src/server/src/main.rs @@ -23,6 +23,7 @@ use actix_web::{ web::{self, Data}, App, HttpResponse, HttpServer, Responder, }; +use arrow::datatypes::{DataType, Field, Schema}; use metric_engine::{ storage::{CloudObjectStorage, CompactRequest, TimeMergeStorageRef}, types::StorageOptions, @@ -53,7 +54,11 @@ async fn main() -> std::io::Result<()> { tracing_subscriber::fmt::init(); let port = 5000; - let schema = todo!(); + let schema = Arc::new(Schema::new(vec![ + Field::new("pk1", DataType::Int64, true), + Field::new("pk2", DataType::Int64, true), + Field::new("value", DataType::Int64, true), + ])); let store = Arc::new(LocalFileSystem::new()); let storage = Arc::new( CloudObjectStorage::try_new(