(v: &Value, dim: &str)
| 121 | } |
| 122 | |
| 123 | pub(super) fn value_to_coord_literal(v: &Value, dim: &str) -> Result<ArrayCoordLiteral> { |
| 124 | match v { |
| 125 | Value::Integer(i) => Ok(ArrayCoordLiteral::Int64(*i)), |
| 126 | Value::Float(f) => Ok(ArrayCoordLiteral::Float64(*f)), |
| 127 | Value::String(s) => Ok(ArrayCoordLiteral::String(s.clone())), |
| 128 | other => Err(SqlError::TypeMismatch { |
| 129 | detail: format!("ARRAY_SLICE dim '{dim}' bound: unsupported value kind {other:?}"), |
| 130 | }), |
| 131 | } |
| 132 | } |