()
| 396 | |
| 397 | #[test] |
| 398 | fn fold_st_geohash() { |
| 399 | let registry = FunctionRegistry::new(); |
| 400 | let expr = SqlExpr::Function { |
| 401 | name: "st_geohash".into(), |
| 402 | args: vec![ |
| 403 | SqlExpr::UnaryOp { |
| 404 | op: UnaryOp::Neg, |
| 405 | expr: Box::new(SqlExpr::Literal(SqlValue::Float(122.4))), |
| 406 | }, |
| 407 | SqlExpr::Literal(SqlValue::Float(37.8)), |
| 408 | SqlExpr::Literal(SqlValue::Int(6)), |
| 409 | ], |
| 410 | distinct: false, |
| 411 | }; |
| 412 | let v = fold_constant(&expr, ®istry); |
| 413 | match v { |
| 414 | Some(SqlValue::String(ref s)) if !s.is_empty() => {} |
| 415 | other => panic!("expected non-empty SqlValue::String, got {other:?}"), |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | #[test] |
| 420 | fn fold_st_distance_nested_st_point() { |
nothing calls this directly
no test coverage detected