alamb commented on code in PR #13187:
URL: https://github.com/apache/datafusion/pull/13187#discussion_r1826276429
##########
datafusion/common/src/stats.rs:
##########
@@ -258,6 +258,26 @@ impl Statistics {
self
}
+ /// Project the statistics to the given column indices.
+ ///
+ /// For example, if we had statistics for columns `{"a", "b", "c"}`,
+ /// projecting to `vec![2, 1]` would return statistics for columns `{"c",
+ /// "b"}`.
+ pub fn project(mut self, projection: Option<&Vec<usize>>) -> Self {
+ let Some(projection) = projection else {
+ return self;
+ };
+
+ // todo: it would be nice to avoid cloning column statistics if
Review Comment:
follow on PR to improve the performance:
https://github.com/apache/datafusion/pull/13225
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]