Asura7969 commented on code in PR #8489:
URL: https://github.com/apache/arrow-datafusion/pull/8489#discussion_r1422134975
##########
datafusion/physical-plan/src/common.rs:
##########
@@ -139,17 +140,24 @@ pub fn compute_record_batch_statistics(
) -> Statistics {
let nb_rows = batches.iter().flatten().map(RecordBatch::num_rows).sum();
- let total_byte_size = batches
- .iter()
- .flatten()
- .map(|b| b.get_array_memory_size())
- .sum();
-
let projection = match projection {
Some(p) => p,
None => (0..schema.fields().len()).collect(),
};
+ let total_byte_size = batches
+ .iter()
+ .flatten()
+ .map(|b| {
+ b.columns()
+ .iter()
+ .enumerate()
+ .filter(|(index, _)| projection.contains(index))
Review Comment:
thanks for your advice
--
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]