From 417d4af97f6b16a0f0ab432538d1b5a59cbed65d Mon Sep 17 00:00:00 2001 From: luofucong Date: Wed, 13 Sep 2023 20:16:52 +0800 Subject: [PATCH] fix: resolve PR comments --- src/common/meta/src/instruction.rs | 4 ++-- src/servers/tests/interceptor.rs | 5 +---- src/table/src/metadata.rs | 2 ++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/meta/src/instruction.rs b/src/common/meta/src/instruction.rs index cee8b8faa4f7..d5783400f61d 100644 --- a/src/common/meta/src/instruction.rs +++ b/src/common/meta/src/instruction.rs @@ -15,7 +15,7 @@ use std::fmt::{Display, Formatter}; use serde::{Deserialize, Serialize}; -use store_api::storage::RegionId; +use store_api::storage::{RegionId, RegionNumber}; use strum::Display; use table::metadata::TableId; @@ -27,7 +27,7 @@ pub struct RegionIdent { pub cluster_id: ClusterId, pub datanode_id: DatanodeId, pub table_id: TableId, - pub region_number: u32, + pub region_number: RegionNumber, } impl RegionIdent { diff --git a/src/servers/tests/interceptor.rs b/src/servers/tests/interceptor.rs index cca377f4ff4d..1482a92078e4 100644 --- a/src/servers/tests/interceptor.rs +++ b/src/servers/tests/interceptor.rs @@ -72,10 +72,7 @@ fn test_grpc_interceptor() { let ctx = QueryContext::arc(); let req = Request::Inserts(InsertRequests { - inserts: vec![InsertRequest { - row_count: 0, - ..Default::default() - }], + inserts: vec![InsertRequest::default()], }); let fail = GrpcQueryInterceptor::pre_execute(&di, &req, ctx.clone()); diff --git a/src/table/src/metadata.rs b/src/table/src/metadata.rs index f384f8633170..ad1c7eb3571f 100644 --- a/src/table/src/metadata.rs +++ b/src/table/src/metadata.rs @@ -448,6 +448,8 @@ pub struct TableInfo { /// Id and version of the table. #[builder(default, setter(into))] pub ident: TableIdent, + + // TODO(LFC): Remove the catalog, schema and table names from TableInfo. /// Name of the table. #[builder(setter(into))] pub name: String,