(&self, input_schema: &Schema)
| 233 | } |
| 234 | |
| 235 | fn nullable(&self, input_schema: &Schema) -> Result<bool> { |
| 236 | // A cast is nullable if **either** the child is nullable or the |
| 237 | // target field allows nulls. This conservative rule prevents |
| 238 | // optimizers from assuming a non-null result when a null input could |
| 239 | // still propagate. `return_field()` continues to expose the exact |
| 240 | // target metadata separately. |
| 241 | let child_nullable = self.expr.nullable(input_schema)?; |
| 242 | let target_nullable = self.resolved_target_field(input_schema)?.is_nullable(); |
| 243 | Ok(child_nullable || target_nullable) |
| 244 | } |
| 245 | |
| 246 | fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue> { |
| 247 | let value = self.expr.evaluate(batch)?; |
nothing calls this directly
no test coverage detected