Expand description
Utility functions for the interval arithmetic library
Functionsยง
- check_
support - Indicates whether interval arithmetic is supported for the given expression.
Currently, we do not support all
PhysicalExprs for interval calculations. We do not support every type of [Operator]s either. Over time, this check will relax as more types ofPhysicalExprs andOperators are supported. Currently,CastExpr,NegativeExpr,BinaryExpr,ColumnandLiteralare supported. - convert_
duration_ ๐bound_ to_ interval - Converts a
ScalarValuecontaining aDurationto one containing a time interval, if applicable. Otherwise, returnsNone. - convert_
duration_ type_ to_ interval - Converts an [
Interval] ofDurations to one of time intervals, if applicable. Otherwise, returnsNone. - convert_
interval_ ๐bound_ to_ duration - Converts an
ScalarValuecontaining a time interval to one containing aDuration, if applicable. Otherwise, returnsNone. - convert_
interval_ type_ to_ duration - Converts an [
Interval] of time intervals to one ofDurations, if applicable. Otherwise, returnsNone. - get_
inverse_ op - interval_
dt_ ๐to_ duration_ ms - If the day field of the
ScalarValue::IntervalDayTimeis zero, this function returns the milliseconds part. Otherwise, it returns an error. - interval_
mdn_ ๐to_ duration_ ns - If both the month and day fields of
ScalarValue::IntervalMonthDayNanoare zero, this function returns the nanoseconds part. Otherwise, it returns an error. - is_
datatype_ supported - Indicates whether interval arithmetic is supported for the given data type.
- is_
operator_ supported - Indicates whether interval arithmetic is supported for the given operator.