From 15313d87ecbf0b403633a3676d8450a2d43094b0 Mon Sep 17 00:00:00 2001 From: Benoit Ranque Date: Mon, 10 Jun 2024 08:32:20 -0400 Subject: [PATCH] fix formatting --- .../src/sql/query_builder/typecasting.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/crates/ndc-clickhouse/src/sql/query_builder/typecasting.rs b/crates/ndc-clickhouse/src/sql/query_builder/typecasting.rs index de296de..1c16e8e 100644 --- a/crates/ndc-clickhouse/src/sql/query_builder/typecasting.rs +++ b/crates/ndc-clickhouse/src/sql/query_builder/typecasting.rs @@ -68,12 +68,12 @@ impl RowsetTypeString { )]), (Some(rows), None) => ClickHouseDataType::Tuple(vec![( Some(Identifier::Unquoted("rows".to_string())), - ClickHouseDataType::Array(Box::new(rows.into_cast_type())) - )]), - (Some(rows), Some(aggregates)) => ClickHouseDataType::Tuple(vec![ - ( - Some(Identifier::Unquoted("rows".to_string())), - ClickHouseDataType::Array(Box::new(rows.into_cast_type())) + ClickHouseDataType::Array(Box::new(rows.into_cast_type())), + )]), + (Some(rows), Some(aggregates)) => ClickHouseDataType::Tuple(vec![ + ( + Some(Identifier::Unquoted("rows".to_string())), + ClickHouseDataType::Array(Box::new(rows.into_cast_type())), ), ( Some(Identifier::Unquoted("aggregates".to_string())), @@ -257,10 +257,7 @@ impl FieldTypeString { Ok(FieldTypeString::Array(Box::new(underlying_typestring))) } ( - ClickHouseTypeDefinition::Object { - name: _, - fields, - }, + ClickHouseTypeDefinition::Object { name: _, fields }, NestedField::Object(subfield_selector), ) => { let subfields = subfield_selector @@ -469,7 +466,6 @@ impl Display for TypeStringError { TypeStringError::NotSupported(feature) => write!(f, "Not supported: {feature}"), TypeStringError::NestedFieldTypeMismatch { expected, got } => write!(f, "Nested field selector type mismatch, expected: {expected}, got {got}"), TypeStringError::MissingNestedField { field_name, object_type } => write!(f, "Missing field {field_name} in object type {object_type}"), - } } }