mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-17 21:40:37 +00:00
feat: add greptime's arrow json extension type (#7168)
* feat: add arrow json extension type * feat: add json structure settings to extension type * refactor: store json structure settings as extension metadata * chore: make binary an acceptable type for extension
This commit is contained in:
@@ -16,7 +16,9 @@
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use arrow_schema::extension::ExtensionType;
|
||||
use common_meta::SchemaOptions;
|
||||
use datatypes::extension::json::JsonExtensionType;
|
||||
use datatypes::schema::{
|
||||
COLUMN_FULLTEXT_OPT_KEY_ANALYZER, COLUMN_FULLTEXT_OPT_KEY_BACKEND,
|
||||
COLUMN_FULLTEXT_OPT_KEY_CASE_SENSITIVE, COLUMN_FULLTEXT_OPT_KEY_FALSE_POSITIVE_RATE,
|
||||
@@ -159,7 +161,12 @@ 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()? {
|
||||
if let Some(json_extension) = column_schema.extension_type::<JsonExtensionType>()? {
|
||||
let settings = json_extension
|
||||
.metadata()
|
||||
.json_structure_settings
|
||||
.clone()
|
||||
.unwrap_or_default();
|
||||
extensions.set_json_structure_settings(settings);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user