Skip to main content

VarProvider

Trait VarProvider 

Source
pub trait VarProvider: Debug {
    // Required methods
    fn get_value(
        &self,
        var_names: Vec<String>,
    ) -> Result<ScalarValue, DataFusionError>;
    fn get_type(&self, var_names: &[String]) -> Option<DataType>;
}
Expand description

A var provider for @variable and @@variable runtime values.

Required Methods§

Source

fn get_value( &self, var_names: Vec<String>, ) -> Result<ScalarValue, DataFusionError>

Get variable value

Source

fn get_type(&self, var_names: &[String]) -> Option<DataType>

Return the type of the given variable

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl VarProvider for SystemVar

Source§

fn get_value( &self, var_names: Vec<String>, ) -> Result<ScalarValue, DataFusionError>

get system variable value

Source§

fn get_type(&self, _: &[String]) -> Option<DataType>

Source§

impl VarProvider for UserDefinedVar

Source§

fn get_value( &self, var_names: Vec<String>, ) -> Result<ScalarValue, DataFusionError>

Get user defined variable value

Source§

fn get_type(&self, var_names: &[String]) -> Option<DataType>

Implementors§