(
&'a self,
datums: &[Datum<'a>],
temp_storage: &'a RowArena,
a: &'a impl Eval,
)
| 56 | |
| 57 | impl LazyUnaryFunc for CastArrayToString { |
| 58 | fn eval<'a>( |
| 59 | &'a self, |
| 60 | datums: &[Datum<'a>], |
| 61 | temp_storage: &'a RowArena, |
| 62 | a: &'a impl Eval, |
| 63 | ) -> Result<Datum<'a>, EvalError> { |
| 64 | let a = a.eval(datums, temp_storage)?; |
| 65 | if a.is_null() { |
| 66 | return Ok(Datum::Null); |
| 67 | } |
| 68 | let mut buf = String::new(); |
| 69 | stringify_datum(&mut buf, a, &self.ty)?; |
| 70 | Ok(Datum::String(temp_storage.push_string(buf))) |
| 71 | } |
| 72 | |
| 73 | fn output_sql_type(&self, input_type: SqlColumnType) -> SqlColumnType { |
| 74 | SqlScalarType::String.nullable(input_type.nullable) |
no test coverage detected