MCPcopy Create free account
hub / github.com/apache/datafusion / evaluate

Method evaluate

datafusion/physical-expr/src/expressions/try_cast.rs:87–94  ·  view source on GitHub ↗
(&self, batch: &RecordBatch)

Source from the content-addressed store, hash-verified

85 }
86
87 fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue> {
88 let value = self.expr.evaluate(batch)?;
89 let options = CastOptions {
90 safe: true,
91 format_options: DEFAULT_FORMAT_OPTIONS,
92 };
93 value.cast_to(&self.cast_type, Some(&options))
94 }
95
96 fn return_field(&self, input_schema: &Schema) -> Result<FieldRef> {
97 self.expr

Callers

nothing calls this directly

Calls 1

cast_toMethod · 0.45

Tested by

no test coverage detected