mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-24 00:40:40 +00:00
feat: supports decimal type in RPC (#2788)
* refactor: ColumnDataTypeWrapper * feat: decimal128 grpc * feat: add test case * chore: add TODO * chore: empty line * chore: remove precision and scale * refactor: remove precision and scale * chore: remove sqlness test * chore: rename * chore: proto version * chore: cr comment. Co-authored-by: Yingwen <realevenyag@gmail.com> * Update src/mito2/src/memtable/time_series.rs Co-authored-by: Yingwen <realevenyag@gmail.com> --------- Co-authored-by: Yingwen <realevenyag@gmail.com>
This commit is contained in:
@@ -302,31 +302,37 @@ fn build_insert_column_schemas() -> Vec<PbColumnSchema> {
|
||||
column_name: "schema".to_string(),
|
||||
datatype: ColumnDataType::String.into(),
|
||||
semantic_type: SemanticType::Tag.into(),
|
||||
..Default::default()
|
||||
},
|
||||
PbColumnSchema {
|
||||
column_name: "name".to_string(),
|
||||
datatype: ColumnDataType::String.into(),
|
||||
semantic_type: SemanticType::Tag.into(),
|
||||
..Default::default()
|
||||
},
|
||||
PbColumnSchema {
|
||||
column_name: "engine".to_string(),
|
||||
datatype: ColumnDataType::String.into(),
|
||||
semantic_type: SemanticType::Tag.into(),
|
||||
..Default::default()
|
||||
},
|
||||
PbColumnSchema {
|
||||
column_name: "script".to_string(),
|
||||
datatype: ColumnDataType::String.into(),
|
||||
semantic_type: SemanticType::Field.into(),
|
||||
..Default::default()
|
||||
},
|
||||
PbColumnSchema {
|
||||
column_name: "greptime_timestamp".to_string(),
|
||||
datatype: ColumnDataType::TimestampMillisecond.into(),
|
||||
semantic_type: SemanticType::Timestamp.into(),
|
||||
..Default::default()
|
||||
},
|
||||
PbColumnSchema {
|
||||
column_name: "gmt_modified".to_string(),
|
||||
datatype: ColumnDataType::TimestampMillisecond.into(),
|
||||
semantic_type: SemanticType::Field.into(),
|
||||
..Default::default()
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -358,7 +364,9 @@ pub fn build_scripts_schema() -> RawSchema {
|
||||
let cs = ColumnSchema::new(
|
||||
c.column_name,
|
||||
// Safety: the type always exists
|
||||
ColumnDataTypeWrapper::try_new(c.datatype).unwrap().into(),
|
||||
ColumnDataTypeWrapper::try_new(c.datatype, c.datatype_extension)
|
||||
.unwrap()
|
||||
.into(),
|
||||
false,
|
||||
);
|
||||
if c.semantic_type == SemanticType::Timestamp as i32 {
|
||||
|
||||
Reference in New Issue
Block a user