alamb commented on code in PR #13296:
URL: https://github.com/apache/datafusion/pull/13296#discussion_r1835011490


##########
datafusion/physical-plan/src/statistics.rs:
##########
@@ -277,6 +262,44 @@ impl MinMaxStatistics {
             .zip(self.min_by_sort_order.iter().skip(1))
             .all(|(max, next_min)| max < next_min)
     }
+
+    /// Computes a bin-packing of the min/max rows in these statistics
+    /// into chains, such that elements in a chain are non-overlapping and 
ordered
+    /// amongst one another.
+    /// This bin-packing is optimal in the sense that it has the fewest number 
of chains.
+    pub fn first_fit(&self) -> Vec<Vec<usize>> {

Review Comment:
   How do we know there are no overlapping ranges here? It seems like we would 
also have to check if the ranges overlapped and if any did we can't do this 
packing
   
   This may be checked elsewhere but I didn't see it in a cursory glance



-- 
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