Skip to content

Commit 3f67f16

Browse files
authored
minor: move struct definition out of aggregate/mod.rs, etc (#2458)
1 parent 5927bfc commit 3f67f16

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

datafusion/core/src/execution/context.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,15 @@ mod tests {
21112111
.await
21122112
.unwrap();
21132113

2114-
let expected = vec!["+---+", "| a |", "+---+", "| 1 |", "| 2 |", "+---+"];
2114+
#[rustfmt::skip]
2115+
let expected = vec![
2116+
"+---+",
2117+
"| a |",
2118+
"+---+",
2119+
"| 1 |",
2120+
"| 2 |",
2121+
"+---+"
2122+
];
21152123
assert_batches_eq!(expected, &result);
21162124

21172125
let result = ctx

datafusion/physical-expr/src/aggregate/count_distinct.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use super::*;
1918
use arrow::datatypes::{DataType, Field};
2019
use std::any::Any;
2120
use std::fmt::Debug;
@@ -31,6 +30,9 @@ use datafusion_common::ScalarValue;
3130
use datafusion_common::{DataFusionError, Result};
3231
use datafusion_expr::Accumulator;
3332

33+
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
34+
struct DistinctScalarValues(Vec<ScalarValue>);
35+
3436
/// Expression for a COUNT(DISTINCT) aggregation.
3537
#[derive(Debug)]
3638
pub struct DistinctCount {

datafusion/physical-expr/src/aggregate/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
use crate::PhysicalExpr;
1919
use arrow::datatypes::Field;
20-
use datafusion_common::{Result, ScalarValue};
20+
use datafusion_common::Result;
2121
use datafusion_expr::Accumulator;
2222
use std::any::Any;
2323
use std::fmt::Debug;
@@ -78,6 +78,3 @@ pub trait AggregateExpr: Send + Sync + Debug {
7878
"AggregateExpr: default name"
7979
}
8080
}
81-
82-
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
83-
struct DistinctScalarValues(Vec<ScalarValue>);

0 commit comments

Comments
 (0)