pub fn return_type(&self, _arg_types: &[DataType]) -> Result<DataType> {
        match self {
            BuiltinScalarFunction::ToYear => Ok(DataType::UInt16),
            BuiltinScalarFunction::ToMonth => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToDayOfYear => Ok(DataType::UInt16),
            BuiltinScalarFunction::ToDayOfMonth => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToDayOfWeek => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToDate => Ok(DataType::Date16),
            BuiltinScalarFunction::ToDateTime => Ok(DataType::Timestamp32(None)),
            BuiltinScalarFunction::ToQuarter => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToHour => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToMinute => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToSecond => Ok(DataType::UInt8),
            BuiltinScalarFunction::EndsWith => Ok(DataType::Boolean),
        }
    }
/// Returns the datatype of the scalar function
Returns the datatype of the scalar function
Returns the datatype of the scalar function
pub fn return_type(&self, _arg_types: &[DataType]) -> Result<DataType> {
        match self {
            BuiltinScalarFunction::ToYear => Ok(DataType::UInt16),
            BuiltinScalarFunction::ToMonth => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToDayOfYear => Ok(DataType::UInt16),
            BuiltinScalarFunction::ToDayOfMonth => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToDayOfWeek => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToDate => Ok(DataType::Date16),
            BuiltinScalarFunction::ToDateTime => Ok(DataType::Timestamp32(None)),
            BuiltinScalarFunction::ToQuarter => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToHour => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToMinute => Ok(DataType::UInt8),
            BuiltinScalarFunction::ToSecond => Ok(DataType::UInt8),
            BuiltinScalarFunction::EndsWith => Ok(DataType::Boolean),
        }
    }
pub fn return_type ( & self , _arg_types : & [ DataType ] ) -> Result < DataType > { match self { BuiltinScalarFunction :: ToYear => Ok ( DataType :: UInt16 ) , BuiltinScalarFunction :: ToMonth => Ok ( DataType :: UInt8 ) , BuiltinScalarFunction :: ToDayOfYear => Ok ( DataType :: UInt16 ) , BuiltinScalarFunction :: ToDayOfMonth => Ok ( DataType :: UInt8 ) , BuiltinScalarFunction :: ToDayOfWeek => Ok ( DataType :: UInt8 ) , BuiltinScalarFunction :: ToDate => Ok ( DataType :: Date16 ) , BuiltinScalarFunction :: ToDateTime => Ok ( DataType :: Timestamp32 ( None ) ) , BuiltinScalarFunction :: ToQuarter => Ok ( DataType :: UInt8 ) , BuiltinScalarFunction :: ToHour => Ok ( DataType :: UInt8 ) , BuiltinScalarFunction :: ToMinute => Ok ( DataType :: UInt8 ) , BuiltinScalarFunction :: ToSecond => Ok ( DataType :: UInt8 ) , BuiltinScalarFunction :: EndsWith => Ok ( DataType :: Boolean ) , } }
Returns the datatype of the scalar function
Returns the datatype of the scalar function
&self
_arg_types
&[DataType]
&self
_arg_types
&[DataType]