(
&'a self,
datums: &[Datum<'a>],
temp_storage: &'a RowArena,
a: &'a impl Eval,
)
| 36 | |
| 37 | impl LazyUnaryFunc for CastMapToString { |
| 38 | fn eval<'a>( |
| 39 | &'a self, |
| 40 | datums: &[Datum<'a>], |
| 41 | temp_storage: &'a RowArena, |
| 42 | a: &'a impl Eval, |
| 43 | ) -> Result<Datum<'a>, EvalError> { |
| 44 | let a = a.eval(datums, temp_storage)?; |
| 45 | if a.is_null() { |
| 46 | return Ok(Datum::Null); |
| 47 | } |
| 48 | let mut buf = String::new(); |
| 49 | stringify_datum(&mut buf, a, &self.ty)?; |
| 50 | Ok(Datum::String(temp_storage.push_string(buf))) |
| 51 | } |
| 52 | |
| 53 | fn output_sql_type(&self, input_type: SqlColumnType) -> SqlColumnType { |
| 54 | SqlScalarType::String.nullable(input_type.nullable) |
nothing calls this directly
no test coverage detected