Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
huaxingao committed Aug 20, 2024
1 parent df38f7f commit 61709cc
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions native/core/src/execution/datafusion/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1567,14 +1567,17 @@ impl PhysicalPlanner {
}

// Cast sort expressions to Int64 to match DataFusion's window frame (offsets are Int64)
let cast_sort_exprs: Vec<PhysicalSortExpr> = sort_exprs.iter().map(|sort_expr| {
let expr = sort_expr.expr.clone();
let cast_expr = Arc::new(CastExpr::new(expr, DataType::Int64, None));
PhysicalSortExpr {
expr: cast_expr,
options: sort_expr.options.clone(),
}
}).collect();
let cast_sort_exprs: Vec<PhysicalSortExpr> = sort_exprs
.iter()
.map(|sort_expr| {
let expr = sort_expr.expr.clone();
let cast_expr = Arc::new(CastExpr::new(expr, DataType::Int64, None));
PhysicalSortExpr {
expr: cast_expr,
options: sort_expr.options.clone(),
}
})
.collect();

let window_func = match self.find_df_window_function(&window_func_name) {
Some(f) => f,
Expand Down

0 comments on commit 61709cc

Please sign in to comment.