Skip to content

Commit 4bc0ac3

Browse files
committed
feat(tests): improve formatting and readability in aggregate tests
- Refactored the formatting in `basic.rs` to enhance readability by breaking long lines into shorter segments. - Updated `min_max.rs` for consistent formatting in the `test_min_max_dictionary_ignores_unreferenced_values` function.
1 parent a077a27 commit 4bc0ac3

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

datafusion/core/tests/sql/aggregates/basic.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,16 @@ async fn count_distinct_dictionary_mixed_values() -> Result<()> {
445445

446446
#[tokio::test]
447447
async fn min_max_dictionary_uses_planned_dictionary_path() -> Result<()> {
448-
let ctx = SessionContext::new_with_config(SessionConfig::new().with_target_partitions(2));
448+
let ctx =
449+
SessionContext::new_with_config(SessionConfig::new().with_target_partitions(2));
449450

450451
let dict_type =
451452
DataType::Dictionary(Box::new(DataType::Int32), Box::new(DataType::Utf8));
452-
let schema = Arc::new(Schema::new(vec![Field::new("dict", dict_type.clone(), true)]));
453+
let schema = Arc::new(Schema::new(vec![Field::new(
454+
"dict",
455+
dict_type.clone(),
456+
true,
457+
)]));
453458

454459
let batch1 = RecordBatch::try_new(
455460
schema.clone(),

datafusion/functions-aggregate/src/min_max.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,10 +1358,8 @@ mod tests {
13581358

13591359
#[test]
13601360
fn test_min_max_dictionary_ignores_unreferenced_values() -> Result<()> {
1361-
let dict_array_ref = string_dictionary_batch(
1362-
&["a", "z", "zz_unused"],
1363-
&[Some(1), Some(1), None],
1364-
);
1361+
let dict_array_ref =
1362+
string_dictionary_batch(&["a", "z", "zz_unused"], &[Some(1), Some(1), None]);
13651363
let dict_type = dict_array_ref.data_type().clone();
13661364

13671365
assert_dictionary_min_max(&dict_type, &[dict_array_ref], "z", "z")

0 commit comments

Comments
 (0)