berkaysynnada commented on code in PR #11584:
URL: https://github.com/apache/datafusion/pull/11584#discussion_r1687531392


##########
datafusion/expr/src/interval_arithmetic.rs:
##########
@@ -332,6 +332,46 @@ impl Interval {
         Ok(Self::new(unbounded_endpoint.clone(), unbounded_endpoint))
     }
 
+    /// Creates an interval between -∞ to ∞.
+    pub fn make_infinity_interval(data_type: &DataType) -> Result<Self> {

Review Comment:
   We use `ScalarValue::Float(None)` for infinite bounds by convention. Even if 
you give Float(Some(f::INF)) or Float(Some(f::NaN)), they are converted to 
Float(None)'s during interval creation. We had given such a decision to have 
unique representation of unboundedness. You can check the details here: 
https://github.com/apache/datafusion/blob/deef834e7adfd859414448ab4da461e2d4eabb9e/datafusion/expr/src/interval_arithmetic.rs#L178
   
   I recommend here to use `make_unbounded` API with floating types to not 
break this convention.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to