You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "berkaysynnada (via GitHub)" <gi...@apache.org> on 2025/04/08 14:29:02 UTC

Re: [PR] Fix: after repartitioning, the `PartitionedFile` and `FileGroup` statistics should be inexact/recomputed [datafusion]

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


##########
datafusion/datasource/src/file_groups.rs:
##########
@@ -351,8 +361,17 @@ impl FileGroupPartitioner {
                 if i == last_group {
                     range_end = file_size as i64;
                 }
-                target_group
-                    .push(original_file.clone().with_range(range_start, range_end));
+                let updated_file =
+                    original_file.clone().with_range(range_start, range_end);
+                if let Some(stat) = updated_file.statistics.clone() {

Review Comment:
   You can get this clone() away



-- 
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-unsubscribe@datafusion.apache.org

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


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