Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitRanque committed Jun 10, 2024
1 parent 79fa81a commit 15313d8
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions crates/ndc-clickhouse/src/sql/query_builder/typecasting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())),
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}"),

}
}
}
Expand Down

0 comments on commit 15313d8

Please sign in to comment.