viirya commented on code in PR #7885:
URL: https://github.com/apache/arrow-datafusion/pull/7885#discussion_r1367276428


##########
datafusion/physical-expr/src/intervals/interval_aritmetic.rs:
##########
@@ -235,18 +252,16 @@ impl Display for Interval {
 impl Interval {
     /// Creates a new interval object using the given bounds.
     ///
-    /// # Boolean intervals need special handling
+    /// As explained in [`Interval]` boolean `Interval`s are special and this
+    /// function ensures they are one of the three valid values:
     ///
-    /// For boolean intervals, having an open false lower bound is equivalent 
to
-    /// having a true closed lower bound. Similarly, open true upper bound is
-    /// equivalent to having a false closed upper bound. Also for boolean
-    /// intervals, having an unbounded left endpoint is equivalent to having a
-    /// false closed lower bound, while having an unbounded right endpoint is
-    /// equivalent to having a true closed upper bound. Therefore; input
-    /// parameters to construct an Interval can have different types, but they
-    /// all result in `[false, false]`, `[false, true]` or `[true, true]`.
+    /// 1. An open `false` lower bound is mapped to a `true` closed lower 
bound.
+    /// 2. an open `true` upper bound is mapped to  `false` closed

Review Comment:
   ```suggestion
       /// 2. An open `true` upper bound is mapped to  `false` closed
   ```



##########
datafusion/physical-expr/src/intervals/interval_aritmetic.rs:
##########
@@ -235,18 +252,16 @@ impl Display for Interval {
 impl Interval {
     /// Creates a new interval object using the given bounds.
     ///
-    /// # Boolean intervals need special handling
+    /// As explained in [`Interval]` boolean `Interval`s are special and this
+    /// function ensures they are one of the three valid values:
     ///
-    /// For boolean intervals, having an open false lower bound is equivalent 
to
-    /// having a true closed lower bound. Similarly, open true upper bound is
-    /// equivalent to having a false closed upper bound. Also for boolean
-    /// intervals, having an unbounded left endpoint is equivalent to having a
-    /// false closed lower bound, while having an unbounded right endpoint is
-    /// equivalent to having a true closed upper bound. Therefore; input
-    /// parameters to construct an Interval can have different types, but they
-    /// all result in `[false, false]`, `[false, true]` or `[true, true]`.
+    /// 1. An open `false` lower bound is mapped to a `true` closed lower 
bound.
+    /// 2. an open `true` upper bound is mapped to  `false` closed
+    /// upper bound.
+    /// 3. An unbounded lower endpoints is mapped to a `false` closed lower
+    /// bound
+    /// 4. An unbounded lower endpoint is mapped to a `true` closed upper 
bound.

Review Comment:
   ```suggestion
       /// 4. An unbounded upper endpoint is mapped to a `true` closed upper 
bound.
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to