Skip to content

Commit

Permalink
Fix size
Browse files Browse the repository at this point in the history
  • Loading branch information
lkt committed Apr 4, 2024
1 parent b637f84 commit 0217847
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datafusion/physical-expr/src/aggregate/array_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ where

fn evaluate(&mut self, emit_to: EmitTo) -> Result<ArrayRef> {
let array = emit_to.take_needed(&mut self.values);
// TODO: do we need null state?
// let nulls = self.null_state.build(emit_to);

// assert_eq!(array.len(), nulls.len());
Expand All @@ -356,7 +357,7 @@ where
.iter()
.map(|arr| arr.as_ref().unwrap_or(&Vec::new()).capacity())
.sum::<usize>()
* std::mem::size_of::<T>()
* std::mem::size_of::<<T as ArrowPrimitiveType>::Native>()
+ self.null_state.size()
}
}
Expand All @@ -366,7 +367,6 @@ mod tests {
use super::*;
use crate::expressions::col;
use crate::expressions::tests::{aggregate, aggregate_new};
use crate::{generic_test_op, generic_test_op_new};
use arrow::array::ArrayRef;
use arrow::array::Int32Array;
use arrow::datatypes::*;
Expand Down

0 comments on commit 0217847

Please sign in to comment.