Skip to content

Commit 3d40a87

Browse files
committed
Merge branch 'main' into agg-v2
2 parents 0ae9d0b + cd2b77e commit 3d40a87

File tree

417 files changed

+1167
-963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

417 files changed

+1167
-963
lines changed

Cargo.lock

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ members = [
3434
"src/query/pipeline/sinks",
3535
"src/query/pipeline/sources",
3636
"src/query/pipeline/transforms",
37-
"src/query/planners",
37+
"src/query/legacy-planners",
3838
"src/query/settings",
3939
"src/query/storages/fuse",
4040
"src/query/storages/fuse-meta",

src/meta/client/src/grpc_action.rs

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -68,36 +68,16 @@ pub enum MetaGrpcReq {
6868
ListKV(ListKVReq),
6969
}
7070

71-
impl From<MetaGrpcWriteReq> for MetaGrpcReq {
72-
fn from(r: MetaGrpcWriteReq) -> Self {
73-
match r {
74-
MetaGrpcWriteReq::UpsertKV(x) => x.into(),
75-
}
76-
}
77-
}
78-
79-
impl From<MetaGrpcReadReq> for MetaGrpcReq {
80-
fn from(r: MetaGrpcReadReq) -> Self {
81-
match r {
82-
MetaGrpcReadReq::GetKV(x) => x.into(),
83-
MetaGrpcReadReq::MGetKV(x) => x.into(),
84-
MetaGrpcReadReq::ListKV(x) => x.into(),
85-
}
86-
}
87-
}
88-
89-
/// Try convert tonic::Request<RaftRequest> to DoActionAction.
90-
impl TryInto<MetaGrpcWriteReq> for Request<RaftRequest> {
71+
impl TryInto<MetaGrpcReq> for Request<RaftRequest> {
9172
type Error = tonic::Status;
9273

93-
fn try_into(self) -> Result<MetaGrpcWriteReq, Self::Error> {
74+
fn try_into(self) -> Result<MetaGrpcReq, Self::Error> {
9475
let raft_request = self.into_inner();
9576

96-
// Decode DoActionAction from flight request body.
9777
let json_str = raft_request.data.as_str();
98-
let action = serde_json::from_str::<MetaGrpcWriteReq>(json_str)
78+
let req = serde_json::from_str::<MetaGrpcReq>(json_str)
9979
.map_err(|e| tonic::Status::internal(e.to_string()))?;
100-
Ok(action)
80+
Ok(req)
10181
}
10282
}
10383

@@ -110,7 +90,6 @@ impl tonic::IntoRequest<RaftRequest> for MetaGrpcWriteReq {
11090
}
11191
}
11292

113-
/// Try convert DoActionAction to tonic::Request<RaftRequest>.
11493
impl TryInto<Request<RaftRequest>> for MetaGrpcWriteReq {
11594
type Error = serde_json::Error;
11695

@@ -124,19 +103,6 @@ impl TryInto<Request<RaftRequest>> for MetaGrpcWriteReq {
124103
}
125104
}
126105

127-
impl TryInto<MetaGrpcReadReq> for Request<RaftRequest> {
128-
type Error = tonic::Status;
129-
130-
fn try_into(self) -> Result<MetaGrpcReadReq, Self::Error> {
131-
let raft_req = self.into_inner();
132-
133-
let json_str = raft_req.data.as_str();
134-
let action = serde_json::from_str::<MetaGrpcReadReq>(json_str)
135-
.map_err(|e| tonic::Status::internal(e.to_string()))?;
136-
Ok(action)
137-
}
138-
}
139-
140106
impl TryInto<Request<RaftRequest>> for MetaGrpcReadReq {
141107
type Error = serde_json::Error;
142108

src/meta/client/tests/it/grpc_server.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ impl MetaService for GrpcServiceForTestImpl {
5555
Ok(Response::new(Box::pin(output)))
5656
}
5757

58+
async fn kv_api(&self, _request: Request<RaftRequest>) -> Result<Response<RaftReply>, Status> {
59+
Err(Status::unimplemented("Not yet implemented"))
60+
}
61+
5862
async fn write_msg(
5963
&self,
6064
_request: Request<RaftRequest>,

0 commit comments

Comments
 (0)