feat(json2): type hint (#8247)

* feat(json2): type hint

* test(datatypes): add JsonSettings serde round-trip test

* minor refactor

This reverts commit 7ff5a5249a09be5396536284fe822b5761ef4e6a.

* fix: code review
This commit is contained in:
fys
2026-06-30 07:37:31 +00:00
committed by GitHub
parent d3cc1b1888
commit aa563628fb
26 changed files with 1756 additions and 2216 deletions
+3 -3
View File
@@ -309,11 +309,11 @@ pub(crate) fn parse_string_to_value(
JsonFormat::Json2(_) => {
let extension_type: Option<JsonExtensionType> =
column_schema.extension_type().context(DatatypeSnafu)?;
let json_structure_settings = extension_type
.and_then(|x| x.metadata().json_structure_settings.clone())
let json_settings = extension_type
.and_then(|x| x.metadata().json_settings.clone())
.unwrap_or_default();
let v = serde_json::from_str(&s).context(DeserializeSnafu { json: s })?;
json_structure_settings.encode(v).context(DatatypeSnafu)
json_settings.encode(v).context(DatatypeSnafu)
}
},
ConcreteDataType::Vector(d) => {