Struct datafusion_substrait::extensions::Extensions
source · pub struct Extensions {
pub functions: HashMap<u32, String>,
pub types: HashMap<u32, String>,
pub type_variations: HashMap<u32, String>,
}
Expand description
Substrait uses SimpleExtensions to define behavior of plans in addition to what’s supported directly by the protobuf definitions. That includes functions, but also provides support for custom types and variations for existing types. This structs facilitates the use of these extensions in DataFusion. TODO: DF doesn’t yet use extensions for type variations https://github.com/apache/datafusion/issues/11544 TODO: DF doesn’t yet provide valid extensionUris https://github.com/apache/datafusion/issues/11545
Fields§
§functions: HashMap<u32, String>
§types: HashMap<u32, String>
§type_variations: HashMap<u32, String>
Implementations§
source§impl Extensions
impl Extensions
sourcepub fn register_function(&mut self, function_name: String) -> u32
pub fn register_function(&mut self, function_name: String) -> u32
Registers a function and returns the anchor (reference) to it. If the function has already been registered, it returns the existing anchor. Function names are case-insensitive (converted to lowercase).
sourcepub fn register_type(&mut self, type_name: String) -> u32
pub fn register_type(&mut self, type_name: String) -> u32
Registers a type and returns the anchor (reference) to it. If the type has already been registered, it returns the existing anchor.
Trait Implementations§
source§impl Debug for Extensions
impl Debug for Extensions
source§impl Default for Extensions
impl Default for Extensions
source§fn default() -> Extensions
fn default() -> Extensions
source§impl From<Extensions> for Vec<SimpleExtensionDeclaration>
impl From<Extensions> for Vec<SimpleExtensionDeclaration>
source§fn from(val: Extensions) -> Vec<SimpleExtensionDeclaration>
fn from(val: Extensions) -> Vec<SimpleExtensionDeclaration>
source§impl PartialEq for Extensions
impl PartialEq for Extensions
source§impl TryFrom<&Vec<SimpleExtensionDeclaration>> for Extensions
impl TryFrom<&Vec<SimpleExtensionDeclaration>> for Extensions
§type Error = DataFusionError
type Error = DataFusionError
impl StructuralPartialEq for Extensions
Auto Trait Implementations§
impl Freeze for Extensions
impl RefUnwindSafe for Extensions
impl Send for Extensions
impl Sync for Extensions
impl Unpin for Extensions
impl UnwindSafe for Extensions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more