mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-24 17:00:37 +00:00
feat: create table with new json datatype (#7128)
* feat: create table with new json datatype Signed-off-by: luofucong <luofc@foxmail.com> * resolve PR comments Signed-off-by: luofucong <luofc@foxmail.com> --------- Signed-off-by: luofucong <luofc@foxmail.com>
This commit is contained in:
@@ -353,6 +353,13 @@ pub enum Error {
|
||||
#[snafu(implicit)]
|
||||
location: Location,
|
||||
},
|
||||
|
||||
#[snafu(transparent)]
|
||||
Datatypes {
|
||||
source: datatypes::error::Error,
|
||||
#[snafu(implicit)]
|
||||
location: Location,
|
||||
},
|
||||
}
|
||||
|
||||
impl ErrorExt for Error {
|
||||
@@ -406,9 +413,10 @@ impl ErrorExt for Error {
|
||||
MissingTableMutationHandler { .. } => StatusCode::Unexpected,
|
||||
GetRegionMetadata { .. } => StatusCode::RegionNotReady,
|
||||
TableReadOnly { .. } => StatusCode::Unsupported,
|
||||
GetFulltextOptions { source, .. } | GetSkippingIndexOptions { source, .. } => {
|
||||
source.status_code()
|
||||
}
|
||||
|
||||
GetFulltextOptions { source, .. }
|
||||
| GetSkippingIndexOptions { source, .. }
|
||||
| Datatypes { source, .. } => source.status_code(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -159,6 +159,10 @@ fn create_column(column_schema: &ColumnSchema, quote_style: char) -> Result<Colu
|
||||
extensions.inverted_index_options = Some(HashMap::new().into());
|
||||
}
|
||||
|
||||
if let Some(settings) = column_schema.json_structure_settings()? {
|
||||
extensions.set_json_structure_settings(settings);
|
||||
}
|
||||
|
||||
Ok(Column {
|
||||
column_def: ColumnDef {
|
||||
name: Ident::with_quote(quote_style, name),
|
||||
|
||||
Reference in New Issue
Block a user