Skip to content

Commit

Permalink
feat: add json datatype for grpc protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu committed Oct 29, 2024
1 parent e8ca43e commit 8c097eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/api/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ impl From<ColumnDataTypeWrapper> for ConcreteDataType {
ConcreteDataType::binary_datatype()
}
}
ColumnDataType::Json => ConcreteDataType::json_datatype(),
ColumnDataType::String => ConcreteDataType::string_datatype(),
ColumnDataType::Date => ConcreteDataType::date_datatype(),
ColumnDataType::Datetime => ConcreteDataType::datetime_datatype(),
Expand Down Expand Up @@ -417,6 +418,10 @@ pub fn values_with_capacity(datatype: ColumnDataType, capacity: usize) -> Values
decimal128_values: Vec::with_capacity(capacity),
..Default::default()
},
ColumnDataType::Json => Values {
string_values: Vec::with_capacity(capacity),
..Default::default()
},
}
}

Expand Down
1 change: 1 addition & 0 deletions src/operator/src/req_convert/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ fn push_column_to_rows(column: Column, rows: &mut [Row]) -> Result<()> {
(Float64, F64Value, f64_values),
(Binary, BinaryValue, binary_values),
(String, StringValue, string_values),
(Json, StringValue, string_values),
(Date, DateValue, date_values),
(Datetime, DatetimeValue, datetime_values),
(
Expand Down

0 comments on commit 8c097eb

Please sign in to comment.