File tree 2 files changed +13
-1
lines changed
physical-expr/src/equivalence/properties 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -949,6 +949,18 @@ impl Display for Interval {
949
949
}
950
950
}
951
951
952
+ impl From < ScalarValue > for Interval {
953
+ fn from ( value : ScalarValue ) -> Self {
954
+ Self :: new ( value. clone ( ) , value)
955
+ }
956
+ }
957
+
958
+ impl From < & ScalarValue > for Interval {
959
+ fn from ( value : & ScalarValue ) -> Self {
960
+ Self :: new ( value. to_owned ( ) , value. to_owned ( ) )
961
+ }
962
+ }
963
+
952
964
/// Applies the given binary operator the `lhs` and `rhs` arguments.
953
965
pub fn apply_operator ( op : & Operator , lhs : & Interval , rhs : & Interval ) -> Result < Interval > {
954
966
match * op {
Original file line number Diff line number Diff line change @@ -1600,7 +1600,7 @@ fn get_expr_properties(
1600
1600
} else if let Some ( literal) = expr. as_any ( ) . downcast_ref :: < Literal > ( ) {
1601
1601
Ok ( ExprProperties {
1602
1602
sort_properties : SortProperties :: Singleton ,
1603
- range : Interval :: try_new ( literal. value ( ) . clone ( ) , literal . value ( ) . clone ( ) ) ? ,
1603
+ range : literal. value ( ) . into ( ) ,
1604
1604
preserves_lex_ordering : true ,
1605
1605
} )
1606
1606
} else {
You can’t perform that action at this time.
0 commit comments