Samyak2 commented on code in PR #18948:
URL: https://github.com/apache/datafusion/pull/18948#discussion_r2567143947
##########
datafusion/datasource/src/file_groups.rs:
##########
@@ -218,14 +209,21 @@ impl FileGroupPartitioner {
let total_size = flattened_files
.iter()
- .map(|f| f.object_meta.size as i64)
+ .map(|f| {
+ if let Some(range) = &f.range {
+ range.end - range.start
+ } else {
+ f.object_meta.size as i64
+ }
+ })
.sum::<i64>();
if total_size < (repartition_file_min_size as i64) || total_size == 0 {
return None;
}
let target_partition_size =
(total_size as u64).div_ceil(target_partitions as u64);
+ println!("total_size={total_size},
target_partitions={target_partitions},
target_partition_size={target_partition_size}");
Review Comment:
Yep! Sorry, forgot to remove it
--
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]