(&self, target_type: &Box<dyn DataType>)
| 294 | } |
| 295 | |
| 296 | fn cast_op(&self, target_type: &Box<dyn DataType>) -> Result<Box<dyn Value>, String> { |
| 297 | // Cast Integer |
| 298 | if target_type.is_int() { |
| 299 | let value = self.value as i64; |
| 300 | return Ok(Box::new(IntValue { value })); |
| 301 | } |
| 302 | |
| 303 | Err("Unexpected value to perform `CAST` with".to_string()) |
| 304 | } |
| 305 | } |