pub struct ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: ScalarSparqlOp,{ /* private fields */ }
Expand description
Mediates between DataFusion’s API and a ScalarSparqlOp.
This includes the following tasks:
- Set up the argument types of the UDFs depending on the supported encodings
- Set up the argument types of the UDFs depending on the configured encodings in the engine
- Detecting the used input encoding and calling the correct ScalarSparqlOpImpl.
Implementations§
Source§impl<TScalarSparqlOp> ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: ScalarSparqlOp,
impl<TScalarSparqlOp> ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: ScalarSparqlOp,
Sourcepub fn new(
encodings: RdfFusionEncodings,
op: TScalarSparqlOp,
) -> ScalarSparqlOpAdapter<TScalarSparqlOp>
pub fn new( encodings: RdfFusionEncodings, op: TScalarSparqlOp, ) -> ScalarSparqlOpAdapter<TScalarSparqlOp>
Creates a new adapter for the given op
.
Trait Implementations§
Source§impl<TScalarSparqlOp> Debug for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: Debug + ScalarSparqlOp,
impl<TScalarSparqlOp> Debug for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: Debug + ScalarSparqlOp,
Source§impl<TScalarSparqlOp> Hash for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: ScalarSparqlOp,
While it would be possible to create two different SparqlOpAdapters for the same
ScalarSparqlOp that are not identical (different encodings), this situation is unlikely to
happen when using RDF Fusion “normally”. Therefore, we only hash the contained ScalarSparqlOp.
impl<TScalarSparqlOp> Hash for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: ScalarSparqlOp,
While it would be possible to create two different SparqlOpAdapters for the same ScalarSparqlOp that are not identical (different encodings), this situation is unlikely to happen when using RDF Fusion “normally”. Therefore, we only hash the contained ScalarSparqlOp.
Source§impl<TScalarSparqlOp> PartialEq for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: ScalarSparqlOp,
impl<TScalarSparqlOp> PartialEq for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: ScalarSparqlOp,
Source§fn eq(&self, other: &ScalarSparqlOpAdapter<TScalarSparqlOp>) -> bool
fn eq(&self, other: &ScalarSparqlOpAdapter<TScalarSparqlOp>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<TScalarSparqlOp> ScalarUDFImpl for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: ScalarSparqlOp + 'static,
impl<TScalarSparqlOp> ScalarUDFImpl for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: ScalarSparqlOp + 'static,
Source§fn signature(&self) -> &Signature
fn signature(&self) -> &Signature
Returns a
Signature
describing the argument types for which this
function has an implementation, and the function’s Volatility
. Read moreSource§fn return_type(
&self,
arg_types: &[DataType],
) -> Result<DataType, DataFusionError>
fn return_type( &self, arg_types: &[DataType], ) -> Result<DataType, DataFusionError>
Source§fn invoke_with_args(
&self,
args: ScalarFunctionArgs,
) -> Result<ColumnarValue, DataFusionError>
fn invoke_with_args( &self, args: ScalarFunctionArgs, ) -> Result<ColumnarValue, DataFusionError>
Invoke the function returning the appropriate result. Read more
Source§fn aliases(&self) -> &[String]
fn aliases(&self) -> &[String]
Returns any aliases (alternate names) for this function. Read more
Source§fn display_name(&self, args: &[Expr]) -> Result<String, DataFusionError>
fn display_name(&self, args: &[Expr]) -> Result<String, DataFusionError>
👎Deprecated since 50.0.0: This method is unused and will be removed in a future release
Returns the user-defined display name of function, given the arguments Read more
Source§fn schema_name(&self, args: &[Expr]) -> Result<String, DataFusionError>
fn schema_name(&self, args: &[Expr]) -> Result<String, DataFusionError>
Returns the name of the column this expression would create Read more
Source§fn return_field_from_args(
&self,
args: ReturnFieldArgs<'_>,
) -> Result<Arc<Field>, DataFusionError>
fn return_field_from_args( &self, args: ReturnFieldArgs<'_>, ) -> Result<Arc<Field>, DataFusionError>
What type will be returned by this function, given the arguments? Read more
Source§fn is_nullable(&self, _args: &[Expr], _schema: &dyn ExprSchema) -> bool
fn is_nullable(&self, _args: &[Expr], _schema: &dyn ExprSchema) -> bool
👎Deprecated since 45.0.0: Use
return_field_from_args
instead. if you use is_nullable
that returns non-nullable with return_type
, you would need to switch to return_field_from_args
, you might have errorSource§fn simplify(
&self,
args: Vec<Expr>,
_info: &dyn SimplifyInfo,
) -> Result<ExprSimplifyResult, DataFusionError>
fn simplify( &self, args: Vec<Expr>, _info: &dyn SimplifyInfo, ) -> Result<ExprSimplifyResult, DataFusionError>
Optionally apply per-UDF simplification / rewrite rules. Read more
Source§fn short_circuits(&self) -> bool
fn short_circuits(&self) -> bool
Returns true if some of this
exprs
subexpressions may not be evaluated
and thus any side effects (like divide by zero) may not be encountered. Read moreSource§fn evaluate_bounds(
&self,
_input: &[&Interval],
) -> Result<Interval, DataFusionError>
fn evaluate_bounds( &self, _input: &[&Interval], ) -> Result<Interval, DataFusionError>
Source§fn propagate_constraints(
&self,
_interval: &Interval,
_inputs: &[&Interval],
) -> Result<Option<Vec<Interval>>, DataFusionError>
fn propagate_constraints( &self, _interval: &Interval, _inputs: &[&Interval], ) -> Result<Option<Vec<Interval>>, DataFusionError>
Source§fn output_ordering(
&self,
inputs: &[ExprProperties],
) -> Result<SortProperties, DataFusionError>
fn output_ordering( &self, inputs: &[ExprProperties], ) -> Result<SortProperties, DataFusionError>
Calculates the
SortProperties
of this function based on its children’s properties.Source§fn preserves_lex_ordering(
&self,
_inputs: &[ExprProperties],
) -> Result<bool, DataFusionError>
fn preserves_lex_ordering( &self, _inputs: &[ExprProperties], ) -> Result<bool, DataFusionError>
Returns true if the function preserves lexicographical ordering based on
the input ordering. Read more
Source§fn coerce_types(
&self,
_arg_types: &[DataType],
) -> Result<Vec<DataType>, DataFusionError>
fn coerce_types( &self, _arg_types: &[DataType], ) -> Result<Vec<DataType>, DataFusionError>
Coerce arguments of a function call to types that the function can evaluate. Read more
Source§fn documentation(&self) -> Option<&Documentation>
fn documentation(&self) -> Option<&Documentation>
Returns the documentation for this Scalar UDF. Read more
impl<TScalarSparqlOp> Eq for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: Eq + ScalarSparqlOp,
Auto Trait Implementations§
impl<TScalarSparqlOp> Freeze for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: Freeze,
impl<TScalarSparqlOp> !RefUnwindSafe for ScalarSparqlOpAdapter<TScalarSparqlOp>
impl<TScalarSparqlOp> Send for ScalarSparqlOpAdapter<TScalarSparqlOp>
impl<TScalarSparqlOp> Sync for ScalarSparqlOpAdapter<TScalarSparqlOp>
impl<TScalarSparqlOp> Unpin for ScalarSparqlOpAdapter<TScalarSparqlOp>where
TScalarSparqlOp: Unpin,
impl<TScalarSparqlOp> !UnwindSafe for ScalarSparqlOpAdapter<TScalarSparqlOp>
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
Mutably borrows from an owned value. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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