Struct substrait_expr::builder::functions::FunctionDefinition
source · pub struct FunctionDefinition {
pub uri: String,
pub name: String,
pub implementations: Vec<FunctionImplementation>,
}Expand description
This is a rust equivalent of a YAML function definition
We chose to use mirror types here as the YAML schema is still a little loose and we wanted something simpler. The full types can be obtained using the substrait library and serde_yaml.
Fields§
§uri: StringThe URI of the function
Note: this is the one field that is not actually present in the YAML but is generally the URI of the YAML itself
name: StringThe name of the function
implementations: Vec<FunctionImplementation>The various implementation kernels supported by the function
Implementations§
source§impl FunctionDefinition
impl FunctionDefinition
sourcepub fn pick_implementation_from_args(
&self,
args: &[Expression],
schema: &SchemaInfo
) -> Result<Option<FunctionImplementation>, SubstraitExprError>
pub fn pick_implementation_from_args( &self, args: &[Expression], schema: &SchemaInfo ) -> Result<Option<FunctionImplementation>, SubstraitExprError>
Given input expressions this attempts to find a matching implementation
This is still very experimental and the implementation resolution rules are subject to change.
Currently this looks for an implementation that exactly matches the input expressions’ types. If any of the input types are the unknown type then those arguments are considered matching but the return type is changed to unknown.
Trait Implementations§
source§impl Clone for FunctionDefinition
impl Clone for FunctionDefinition
source§fn clone(&self) -> FunctionDefinition
fn clone(&self) -> FunctionDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more