common_function::function

Trait Function

source
pub trait Function:
    Display
    + Sync
    + Send {
    // Required methods
    fn name(&self) -> &str;
    fn return_type(
        &self,
        input_types: &[ConcreteDataType],
    ) -> Result<ConcreteDataType>;
    fn signature(&self) -> Signature;
    fn eval(
        &self,
        _func_ctx: FunctionContext,
        _columns: &[VectorRef],
    ) -> Result<VectorRef>;
}
Expand description

Scalar function trait, modified from databend to adapt datafusion TODO(dennis): optimize function by it’s features such as monotonicity etc.

Required Methods§

source

fn name(&self) -> &str

Returns the name of the function, should be unique.

source

fn return_type( &self, input_types: &[ConcreteDataType], ) -> Result<ConcreteDataType>

The returned data type of function execution.

source

fn signature(&self) -> Signature

The signature of function.

source

fn eval( &self, _func_ctx: FunctionContext, _columns: &[VectorRef], ) -> Result<VectorRef>

Evaluate the function, e.g. run/execute the function.

Implementors§

source§

impl Function for DateAddFunction

source§

impl Function for DateFormatFunction

source§

impl Function for DateSubFunction

source§

impl Function for IsNullFunction

source§

impl Function for GeohashFunction

source§

impl Function for GeohashNeighboursFunction

source§

impl Function for H3CellBase

source§

impl Function for H3CellCenterChild

source§

impl Function for H3CellCenterLatLng

source§

impl Function for H3CellContains

source§

impl Function for H3CellDistanceEuclideanDegree

source§

impl Function for H3CellDistanceSphereKm

source§

impl Function for H3CellIsPentagon

source§

impl Function for H3CellParent

source§

impl Function for H3CellResolution

source§

impl Function for H3CellToChildPos

source§

impl Function for H3CellToChildren

source§

impl Function for H3CellToChildrenSize

source§

impl Function for H3CellToString

source§

impl Function for H3ChildPosToCell

source§

impl Function for H3GridDisk

source§

impl Function for H3GridDiskDistances

source§

impl Function for H3GridDistance

source§

impl Function for H3GridPathCells

source§

impl Function for H3LatLngToCell

source§

impl Function for H3LatLngToCellString

source§

impl Function for H3StringToCell

source§

impl Function for STArea

source§

impl Function for STDistance

source§

impl Function for STDistanceSphere

source§

impl Function for STContains

source§

impl Function for STIntersects

source§

impl Function for STWithin

source§

impl Function for S2CellLevel

source§

impl Function for S2CellParent

source§

impl Function for S2CellToToken

source§

impl Function for S2LatLngToCell

source§

impl Function for LatLngToPointWkt

source§

impl Function for JsonGetBool

source§

impl Function for JsonGetFloat

source§

impl Function for JsonGetInt

source§

impl Function for JsonGetString

source§

impl Function for JsonIsArray

source§

impl Function for JsonIsBool

source§

impl Function for JsonIsFloat

source§

impl Function for JsonIsInt

source§

impl Function for JsonIsNull

source§

impl Function for JsonIsObject

source§

impl Function for JsonIsString

source§

impl Function for JsonPathExistsFunction

source§

impl Function for JsonPathMatchFunction

source§

impl Function for JsonToStringFunction

source§

impl Function for ParseJsonFunction

source§

impl Function for MatchesFunction

source§

impl Function for ClampFunction

source§

impl Function for ModuloFunction

source§

impl Function for PowFunction

source§

impl Function for RateFunction

source§

impl Function for RangeFunction

source§

impl Function for ClipFunction

source§

impl Function for GreatestFunction

source§

impl Function for ToUnixtimeFunction

source§

impl Function for BuildFunction

source§

impl Function for CurrentSchemaFunction

source§

impl Function for DatabaseFunction

source§

impl Function for PGGetUserByIdFunction

source§

impl Function for PGTableIsVisibleFunction

source§

impl Function for PGVersionFunction

source§

impl Function for TimezoneFunction

source§

impl Function for VersionFunction