You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PartialOrd, Addition and Subtraction support for Interval Types #5412
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently, comparison operators are not supported for different kinds of intervals (such as IntervalYearMonth vs IntervalDayTime). We cannot add or subtract interval types also. They can be supported by making some arithmetic calculations.
Describe the solution you'd like
impl PartialOrd for ScalarValue {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
use ScalarValue::*;
// This purposely doesn't have a catch-all "(_, _)" so that
// any newly added enum variant will require editing this list
// or else face a compile error
match (self, other) {
These match arms can be extended to handle the required comparisons.
impl_op macro's match arms can be extended to support addition and subtraction.
changed the title [-]PartialOrd and Addition and Subtraction support for Interval Types[/-][+]PartialOrd, Addition and Subtraction support for Interval Types[/+]on Mar 9, 2023
Activity
[-]PartialOrd support for Interval Types[/-][+]PartialOrd and Addition and Subtraction support for Interval Types[/+][-]PartialOrd and Addition and Subtraction support for Interval Types[/-][+]PartialOrd, Addition and Subtraction support for Interval Types[/+]