Skip to content

Commit 7b989e8

Browse files
committed
style: fix formatting
1 parent bd7660c commit 7b989e8

19 files changed

Lines changed: 85 additions & 52 deletions

File tree

nodedb-sql/src/planner/select.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,9 @@ fn plan_select(
163163

164164
// 6. Check for GROUP BY / aggregation.
165165
if has_aggregation(select, functions) {
166-
let mut plan =
167-
super::aggregate::plan_aggregate(select, table, &filters, &scope, functions, &temporal)?;
166+
let mut plan = super::aggregate::plan_aggregate(
167+
select, table, &filters, &scope, functions, &temporal,
168+
)?;
168169

169170
// Semi/anti subquery joins belong below the aggregate so they filter
170171
// the input rows before grouping. Scalar subqueries remain above the

nodedb-strict/src/decode.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,7 @@ impl TupleDecoder {
353353
}
354354

355355
/// Extract a fixed Int64 column as a raw i64.
356-
fn extract_i64(
357-
decoder: &TupleDecoder,
358-
tuple: &[u8],
359-
col_idx: usize,
360-
) -> Result<i64, StrictError> {
356+
fn extract_i64(decoder: &TupleDecoder, tuple: &[u8], col_idx: usize) -> Result<i64, StrictError> {
361357
let raw = decoder
362358
.extract_fixed_raw(tuple, col_idx)?
363359
.ok_or(StrictError::TypeMismatch {

nodedb-strict/src/encode.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,10 @@ mod tests {
502502
let decoder = crate::decode::TupleDecoder::new(&schema);
503503
let (sys, vf, vu) = decoder.extract_bitemporal_timestamps(&tuple).unwrap();
504504
assert_eq!((sys, vf, vu), (100, 200, i64::MAX));
505-
assert_eq!(decoder.extract_by_name(&tuple, "id").unwrap(), Value::Integer(42));
505+
assert_eq!(
506+
decoder.extract_by_name(&tuple, "id").unwrap(),
507+
Value::Integer(42)
508+
);
506509
assert_eq!(
507510
decoder.extract_by_name(&tuple, "name").unwrap(),
508511
Value::String("alice".into())
@@ -530,7 +533,13 @@ mod tests {
530533
.unwrap();
531534
let encoder = TupleEncoder::new(&schema);
532535
let err = encoder.encode_bitemporal(0, 0, 0, &[]).unwrap_err();
533-
assert!(matches!(err, StrictError::ValueCountMismatch { expected: 1, got: 0 }));
536+
assert!(matches!(
537+
err,
538+
StrictError::ValueCountMismatch {
539+
expected: 1,
540+
got: 0
541+
}
542+
));
534543
}
535544

536545
#[test]

nodedb-types/src/collection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl std::str::FromStr for CollectionType {
188188
columns: vec![],
189189
version: 1,
190190
dropped_columns: Vec::new(),
191-
bitemporal: false,
191+
bitemporal: false,
192192
},
193193
))),
194194
"columnar" => Ok(Self::columnar()),
@@ -199,7 +199,7 @@ impl std::str::FromStr for CollectionType {
199199
columns: vec![],
200200
version: 1,
201201
dropped_columns: Vec::new(),
202-
bitemporal: false,
202+
bitemporal: false,
203203
},
204204
ttl: None,
205205
capacity_hint: 0,

nodedb-types/src/columnar/schema.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ impl StrictSchema {
187187
BITEMPORAL_SYSTEM_FROM,
188188
ColumnType::Int64,
189189
));
190-
columns.push(ColumnDef::required(BITEMPORAL_VALID_FROM, ColumnType::Int64));
190+
columns.push(ColumnDef::required(
191+
BITEMPORAL_VALID_FROM,
192+
ColumnType::Int64,
193+
));
191194
columns.push(ColumnDef::required(
192195
BITEMPORAL_VALID_UNTIL,
193196
ColumnType::Int64,

nodedb/src/bridge/physical_plan/wire.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ mod tests {
169169
gap_fill: "null".into(),
170170
computed_columns: vec![],
171171
rls_filters: vec![],
172-
system_as_of_ms: None,
173-
valid_at_ms: None,
172+
system_as_of_ms: None,
173+
valid_at_ms: None,
174174
}));
175175
}
176176

nodedb/src/control/planner/auto_tier.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ fn build_scan_task(
225225
gap_fill: gap_fill.to_string(),
226226
computed_columns: Vec::new(),
227227
rls_filters: Vec::new(),
228-
system_as_of_ms: None,
229-
valid_at_ms: None,
228+
system_as_of_ms: None,
229+
valid_at_ms: None,
230230
}),
231231
post_set_op: PostSetOp::None,
232232
}

nodedb/src/control/server/native/dispatch/plan_builder/timeseries.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ pub(crate) fn build_scan(fields: &TextFields, collection: &str) -> crate::Result
3131
gap_fill: String::new(),
3232
computed_columns: Vec::new(),
3333
rls_filters: Vec::new(),
34-
system_as_of_ms: None,
35-
valid_at_ms: None,
34+
system_as_of_ms: None,
35+
valid_at_ms: None,
3636
}))
3737
}
3838

nodedb/src/control/server/pgwire/ddl/collection/create/handler.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ pub fn create_collection(
8787
let collection_type = if upper.contains("TYPE") && upper.contains("KEY_VALUE") {
8888
super::super::super::kv::parse_kv_collection(sql, &upper)?
8989
} else if upper.contains("TYPE") && upper.contains("STRICT") {
90-
let schema =
91-
super::super::helpers::parse_typed_schema_with_flags(sql, bitemporal_flag)
92-
.map_err(|e| sqlstate_error("42601", &e))?;
90+
let schema = super::super::helpers::parse_typed_schema_with_flags(sql, bitemporal_flag)
91+
.map_err(|e| sqlstate_error("42601", &e))?;
9392
nodedb_types::CollectionType::strict(schema)
9493
} else if upper.contains("TYPE") && upper.contains("COLUMNAR") {
9594
resolve_columnar(sql, &upper, &mut columnar_schema_columns)

nodedb/src/control/server/pgwire/ddl/convert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub async fn convert_collection(
9393
columns,
9494
version: 1,
9595
dropped_columns: Vec::new(),
96-
bitemporal: false,
96+
bitemporal: false,
9797
};
9898
if target_type == "kv" {
9999
nodedb_types::CollectionType::kv(schema)

0 commit comments

Comments
 (0)