()
| 3545 | } |
| 3546 | |
| 3547 | fn mock_session_state() -> MockSessionState { |
| 3548 | MockSessionState::default() |
| 3549 | .with_scalar_function(Arc::new(unicode::character_length().as_ref().clone())) |
| 3550 | .with_scalar_function(Arc::new(string::concat().as_ref().clone())) |
| 3551 | .with_scalar_function(Arc::new(make_udf( |
| 3552 | "nullif", |
| 3553 | vec![DataType::Int32, DataType::Int32], |
| 3554 | DataType::Int32, |
| 3555 | ))) |
| 3556 | .with_scalar_function(Arc::new(make_udf( |
| 3557 | "round", |
| 3558 | vec![DataType::Float64, DataType::Int64], |
| 3559 | DataType::Float32, |
| 3560 | ))) |
| 3561 | .with_scalar_function(Arc::new(make_udf( |
| 3562 | "arrow_cast", |
| 3563 | vec![DataType::Int64, DataType::Utf8], |
| 3564 | DataType::Float64, |
| 3565 | ))) |
| 3566 | .with_scalar_function(Arc::new(make_udf( |
| 3567 | "date_trunc", |
| 3568 | vec![DataType::Utf8, DataType::Timestamp(Nanosecond, None)], |
| 3569 | DataType::Int32, |
| 3570 | ))) |
| 3571 | .with_scalar_function(Arc::new(make_udf( |
| 3572 | "sqrt", |
| 3573 | vec![DataType::Int64], |
| 3574 | DataType::Int64, |
| 3575 | ))) |
| 3576 | .with_aggregate_function(sum_udaf()) |
| 3577 | .with_aggregate_function(approx_median_udaf()) |
| 3578 | .with_aggregate_function(count_udaf()) |
| 3579 | .with_aggregate_function(avg_udaf()) |
| 3580 | .with_aggregate_function(min_udaf()) |
| 3581 | .with_aggregate_function(max_udaf()) |
| 3582 | .with_aggregate_function(grouping_udaf()) |
| 3583 | .with_window_function(rank_udwf()) |
| 3584 | .with_window_function(row_number_udwf()) |
| 3585 | .with_expr_planner(Arc::new(CoreFunctionPlanner::default())) |
| 3586 | } |
| 3587 | |
| 3588 | fn logical_plan_from_state( |
| 3589 | sql: &str, |
no test coverage detected
searching dependent graphs…