Skip to content

Commit 58a43ae

Browse files
committed
ci fix
1 parent 08a16b2 commit 58a43ae

5 files changed

Lines changed: 16 additions & 3 deletions

File tree

datafusion/core/tests/physical_optimizer/window_optimize.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ mod test {
5050
&[],
5151
Arc::new(frame),
5252
None,
53+
Arc::clone(&schema),
5354
);
5455

5556
let bounded_agg_exec = BoundedWindowAggExec::try_new(

datafusion/expr/src/window_state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use crate::{
2626

2727
use arrow::{
2828
array::ArrayRef,
29-
compute::{SortOptions, concat, concat_batches},
29+
compute::{concat, concat_batches},
3030
datatypes::{DataType, SchemaRef},
3131
record_batch::RecordBatch,
3232
};
@@ -648,7 +648,7 @@ fn check_equality(current: &[ScalarValue], target: &[ScalarValue]) -> Result<boo
648648
mod tests {
649649
use super::*;
650650

651-
use arrow::array::Float64Array;
651+
use arrow::{array::Float64Array, compute::SortOptions};
652652

653653
fn get_test_data() -> (Vec<ArrayRef>, Vec<SortOptions>) {
654654
let range_columns: Vec<ArrayRef> = vec![Arc::new(Float64Array::from(vec![

datafusion/physical-expr/src/window/standard.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ impl WindowExpr for StandardWindowExpr {
175175
) -> Result<()> {
176176
let field = self.expr.field()?;
177177
let out_type = field.data_type();
178-
let sort_options = self.order_by.iter().map(|o| o.options).collect::<Vec<_>>();
179178
// create a WindowAggState to clone when `window_agg_state` does not contain the respective
180179
// group, which is faster than potentially creating a new one at every iteration
181180
let new_state = WindowAggState::new(out_type)?;

datafusion/physical-optimizer/src/limit_pushdown_past_window.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ mod tests {
316316
WindowFrameBound::Preceding(ScalarValue::UInt64(None)),
317317
WindowFrameBound::CurrentRow,
318318
)),
319+
Arc::clone(&s),
319320
));
320321

321322
let window: Arc<dyn ExecutionPlan> = Arc::new(BoundedWindowAggExec::try_new(

datafusion/proto/tests/cases/roundtrip_physical_plan.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ fn roundtrip_udwf() -> Result<()> {
359359
PhysicalSortExpr::new(col("b", &schema)?, SortOptions::new(true, true))
360360
],
361361
Arc::new(WindowFrame::new(None)),
362+
Arc::clone(&schema),
362363
));
363364

364365
let input = Arc::new(EmptyExec::new(schema.clone()));
@@ -402,6 +403,7 @@ fn roundtrip_window() -> Result<()> {
402403
},
403404
}],
404405
Arc::new(window_frame),
406+
Arc::clone(&schema),
405407
));
406408

407409
let plain_aggr_window_expr = Arc::new(PlainAggregateWindowExpr::new(
@@ -417,6 +419,7 @@ fn roundtrip_window() -> Result<()> {
417419
&[],
418420
Arc::new(WindowFrame::new(None)),
419421
None,
422+
Arc::clone(&schema),
420423
));
421424

422425
let window_frame = WindowFrame::new_bounds(
@@ -438,6 +441,7 @@ fn roundtrip_window() -> Result<()> {
438441
&[],
439442
Arc::new(window_frame),
440443
None,
444+
Arc::clone(&schema),
441445
));
442446

443447
let input = Arc::new(EmptyExec::new(schema.clone()));
@@ -467,6 +471,7 @@ fn roundtrip_window_distinct() -> Result<()> {
467471
&[], // no order by
468472
Arc::new(WindowFrame::new(None)), // unbounded frame
469473
None,
474+
Arc::clone(&schema),
470475
));
471476

472477
// Create a distinct sum window expression with bounded frame (becomes SlidingAggregateWindowExpr)
@@ -491,6 +496,7 @@ fn roundtrip_window_distinct() -> Result<()> {
491496
&[], // no order by
492497
Arc::new(bounded_frame), // bounded frame
493498
None,
499+
Arc::clone(&schema),
494500
));
495501

496502
let input = Arc::new(EmptyExec::new(schema.clone()));
@@ -523,6 +529,7 @@ fn test_distinct_window_serialization_end_to_end() -> Result<()> {
523529
&[],
524530
Arc::new(WindowFrame::new(None)),
525531
None,
532+
Arc::clone(&schema),
526533
));
527534

528535
// Test 2: DISTINCT SUM (without ignore nulls)
@@ -546,6 +553,7 @@ fn test_distinct_window_serialization_end_to_end() -> Result<()> {
546553
&[],
547554
Arc::new(bounded_frame),
548555
None,
556+
Arc::clone(&schema),
549557
));
550558

551559
let input = Arc::new(EmptyExec::new(schema.clone()));
@@ -1384,6 +1392,7 @@ fn roundtrip_scalar_udf_extension_codec() -> Result<()> {
13841392
&[],
13851393
Arc::new(WindowFrame::new(None)),
13861394
None,
1395+
Arc::clone(&schema),
13871396
))],
13881397
filter,
13891398
true,
@@ -1436,6 +1445,7 @@ fn roundtrip_udwf_extension_codec() -> Result<()> {
14361445
},
14371446
}],
14381447
Arc::new(window_frame),
1448+
Arc::clone(&schema),
14391449
));
14401450

14411451
let input = Arc::new(EmptyExec::new(schema.clone()));
@@ -1496,6 +1506,7 @@ fn roundtrip_aggregate_udf_extension_codec() -> Result<()> {
14961506
&[],
14971507
Arc::new(WindowFrame::new(None)),
14981508
None,
1509+
Arc::clone(&schema),
14991510
))],
15001511
filter,
15011512
true,
@@ -3185,6 +3196,7 @@ fn roundtrip_lead_with_default_value() -> Result<()> {
31853196
},
31863197
}],
31873198
Arc::new(WindowFrame::new(None)),
3199+
Arc::clone(&schema),
31883200
));
31893201

31903202
let input = Arc::new(EmptyExec::new(schema.clone()));

0 commit comments

Comments
 (0)