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:
LFC
2025-10-24 10:16:49 +08:00
committed by GitHub
parent 2f637a262e
commit b53a0b86fb
16 changed files with 226 additions and 14 deletions

View File

@@ -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(),
}
}

View File

@@ -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),