diff --git a/Cargo.lock b/Cargo.lock index 3e9e7a2dc2..1ebddbaae1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,7 +84,7 @@ dependencies = [ "async-trait", "base64 0.13.0", "bytes 1.2.1", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "common_types", "common_util", "datafusion", @@ -1052,13 +1052,14 @@ dependencies = [ ] [[package]] -name = "ceresdb-client-rs" -version = "0.1.0" -source = "git+https://github.com/CeresDB/ceresdb-client-rs.git?rev=69948b9963597ccdb7c73756473393972dfdebd3#69948b9963597ccdb7c73756473393972dfdebd3" +name = "ceresdb-client" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2c1699cb154e97cfccd3d6a0679f561c6214a33d86b3eacb78685c7479d022" dependencies = [ "arrow 23.0.0", "async-trait", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=43939799b2e65e3fc5795118fc77593f7c4b19d7)", + "ceresdbproto", "dashmap 5.4.0", "futures 0.3.25", "paste 1.0.8", @@ -1074,7 +1075,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "ceresdb-client-rs", + "ceresdb-client", "sql", "sqlness", "sqlparser", @@ -1083,8 +1084,9 @@ dependencies = [ [[package]] name = "ceresdbproto" -version = "0.1.0" -source = "git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf#1194907cbc8b28017c6bede2636ee8e18122cfaf" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c656dfafeb22c315ec8ec842fa78e5e887c9411053e41ade06efb0f91c0589a" dependencies = [ "prost", "protoc-bin-vendored", @@ -1093,17 +1095,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "ceresdbproto" -version = "0.1.0" -source = "git+https://github.com/CeresDB/ceresdbproto.git?rev=43939799b2e65e3fc5795118fc77593f7c4b19d7#43939799b2e65e3fc5795118fc77593f7c4b19d7" -dependencies = [ - "prost", - "protoc-bin-vendored", - "tonic", - "tonic-build", -] - [[package]] name = "cexpr" version = "0.4.0" @@ -1235,7 +1226,7 @@ name = "cluster" version = "1.0.0-alpha02" dependencies = [ "async-trait", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "common_types", "common_util", "log", @@ -1286,7 +1277,7 @@ dependencies = [ "arrow_ext", "byteorder", "bytes_ext", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "chrono", "datafusion", "murmur3", @@ -1304,7 +1295,7 @@ version = "1.0.0-alpha02" dependencies = [ "arrow 32.0.0", "backtrace", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "chrono", "common_types", "crossbeam-utils 0.8.11", @@ -3500,7 +3491,7 @@ name = "meta_client" version = "1.0.0-alpha02" dependencies = [ "async-trait", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "common_types", "common_util", "futures 0.3.25", @@ -3995,7 +3986,7 @@ version = "1.0.0-alpha02" dependencies = [ "async-trait", "bytes 1.2.1", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "chrono", "clru", "common_util", @@ -5157,7 +5148,7 @@ version = "1.0.0-alpha02" dependencies = [ "arrow_ext", "async-trait", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "clru", "common_types", "common_util", @@ -5274,7 +5265,7 @@ name = "router" version = "1.0.0-alpha02" dependencies = [ "async-trait", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "cluster", "common_types", "common_util", @@ -5613,7 +5604,7 @@ dependencies = [ "async-trait", "bytes 1.2.1", "catalog", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "cluster", "common_types", "common_util", @@ -5941,7 +5932,7 @@ dependencies = [ "arrow 32.0.0", "async-trait", "catalog", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "common_types", "common_util", "datafusion", @@ -5960,8 +5951,9 @@ dependencies = [ [[package]] name = "sqlness" -version = "0.3.0" -source = "git+https://github.com/CeresDB/sqlness.git?rev=e6d602ed7d894ffb806580f17f4a6f1283abbf1f#e6d602ed7d894ffb806580f17f4a6f1283abbf1f" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc90b1d2e46d618148d3118ec25c3cb4c18563fef8589095fc21389952c54864" dependencies = [ "async-trait", "derive_builder", @@ -6184,7 +6176,7 @@ dependencies = [ "arrow 32.0.0", "async-trait", "catalog", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "common_types", "common_util", "futures 0.3.25", @@ -6202,7 +6194,7 @@ dependencies = [ "arrow 32.0.0", "arrow_ext", "async-trait", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "common_types", "common_util", "datafusion", @@ -7102,7 +7094,7 @@ name = "wal" version = "1.0.0-alpha02" dependencies = [ "async-trait", - "ceresdbproto 0.1.0 (git+https://github.com/CeresDB/ceresdbproto.git?rev=1194907cbc8b28017c6bede2636ee8e18122cfaf)", + "ceresdbproto", "chrono", "common_types", "common_util", diff --git a/Cargo.toml b/Cargo.toml index 744f55d59a..fe298cba9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,6 +61,7 @@ bytes = "1.1.0" bytes_ext = { path = "components/bytes_ext" } catalog = { path = "catalog" } catalog_impls = { path = "catalog_impls" } +ceresdbproto = "1.0.1" chrono = "0.4" clap = "3.0" clru = "0.6.1" @@ -115,10 +116,6 @@ wal = { path = "wal" } message_queue = { path = "components/message_queue" } zstd = { version = "0.12", default-features = false } -[workspace.dependencies.ceresdbproto] -git = "https://github.com/CeresDB/ceresdbproto.git" -rev = "1194907cbc8b28017c6bede2636ee8e18122cfaf" - [dependencies] analytic_engine = { workspace = true } catalog = { workspace = true } diff --git a/integration_tests/Cargo.toml b/integration_tests/Cargo.toml index 34e74e290f..3226e8ac06 100644 --- a/integration_tests/Cargo.toml +++ b/integration_tests/Cargo.toml @@ -8,8 +8,8 @@ workspace = true [dependencies] anyhow = "1.0.58" async-trait = "0.1" -ceresdb-client-rs = { git = "https://github.com/CeresDB/ceresdb-client-rs.git", rev = "69948b9963597ccdb7c73756473393972dfdebd3" } +ceresdb-client = "1.0" sql = { workspace = true } -sqlness = { git = "https://github.com/CeresDB/sqlness.git", rev = "e6d602ed7d894ffb806580f17f4a6f1283abbf1f" } +sqlness = "0.4.0" sqlparser = { workspace = true } tokio = { workspace = true } diff --git a/integration_tests/src/database.rs b/integration_tests/src/database.rs index 404070a11d..6f0c1a4178 100644 --- a/integration_tests/src/database.rs +++ b/integration_tests/src/database.rs @@ -11,7 +11,7 @@ use std::{ }; use async_trait::async_trait; -use ceresdb_client_rs::{ +use ceresdb_client::{ db_client::{Builder, DbClient, Mode}, model::sql_query::{display::CsvFormatter, Request}, RpcContext, @@ -20,7 +20,7 @@ use sql::{ ast::{Statement, TableName}, parser::Parser, }; -use sqlness::Database; +use sqlness::{Database, QueryContext}; use sqlparser::ast::{SetExpr, Statement as SqlStatement, TableFactor}; const BINARY_PATH_ENV: &str = "CERESDB_BINARY_PATH"; @@ -42,7 +42,7 @@ pub struct CeresDB { #[async_trait] impl Database for CeresDB { - async fn query(&self, query: String) -> Box { + async fn query(&self, _context: QueryContext, query: String) -> Box { Self::execute(query, self.db_client.clone()).await } } diff --git a/router/src/cluster_based.rs b/router/src/cluster_based.rs index d3be086dea..09ad461a76 100644 --- a/router/src/cluster_based.rs +++ b/router/src/cluster_based.rs @@ -28,7 +28,6 @@ fn make_route(table_name: &str, endpoint: &str) -> Result { Ok(Route { table: table_name.to_string(), endpoint: Some(endpoint.into()), - ..Default::default() }) } diff --git a/router/src/rule_based.rs b/router/src/rule_based.rs index 96d9e74d8d..5b6c617cfe 100644 --- a/router/src/rule_based.rs +++ b/router/src/rule_based.rs @@ -162,7 +162,6 @@ impl Router for RuleBasedRouter { let route = Route { table, endpoint: Some(pb_endpoint), - ..Default::default() }; route_results.push(route); } diff --git a/server/src/grpc/forward.rs b/server/src/grpc/forward.rs index deeead9cc8..5f1c2d0d40 100644 --- a/server/src/grpc/forward.rs +++ b/server/src/grpc/forward.rs @@ -401,7 +401,6 @@ mod tests { Some(v) => Ok(vec![Route { table: req.tables[0].clone(), endpoint: Some(v.clone().into()), - ext: vec![], }]), } }