Skip to content

Commit eaed23e

Browse files
committed
ci fix
1 parent b25dba0 commit eaed23e

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
@@ -320,6 +320,7 @@ mod tests {
320320
WindowFrameBound::Preceding(ScalarValue::UInt64(None)),
321321
WindowFrameBound::CurrentRow,
322322
)),
323+
Arc::clone(&s),
323324
));
324325

325326
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()));
@@ -1371,6 +1379,7 @@ fn roundtrip_scalar_udf_extension_codec() -> Result<()> {
13711379
&[],
13721380
Arc::new(WindowFrame::new(None)),
13731381
None,
1382+
Arc::clone(&schema),
13741383
))],
13751384
filter,
13761385
true,
@@ -1423,6 +1432,7 @@ fn roundtrip_udwf_extension_codec() -> Result<()> {
14231432
},
14241433
}],
14251434
Arc::new(window_frame),
1435+
Arc::clone(&schema),
14261436
));
14271437

14281438
let input = Arc::new(EmptyExec::new(schema.clone()));
@@ -1483,6 +1493,7 @@ fn roundtrip_aggregate_udf_extension_codec() -> Result<()> {
14831493
&[],
14841494
Arc::new(WindowFrame::new(None)),
14851495
None,
1496+
Arc::clone(&schema),
14861497
))],
14871498
filter,
14881499
true,
@@ -3143,6 +3154,7 @@ fn roundtrip_lead_with_default_value() -> Result<()> {
31433154
},
31443155
}],
31453156
Arc::new(WindowFrame::new(None)),
3157+
Arc::clone(&schema),
31463158
));
31473159

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

0 commit comments

Comments
 (0)