(
&mut self,
out_col: &ArrayRef,
partition_batch_state: &PartitionBatchState,
)
| 84 | } |
| 85 | |
| 86 | pub fn update( |
| 87 | &mut self, |
| 88 | out_col: &ArrayRef, |
| 89 | partition_batch_state: &PartitionBatchState, |
| 90 | ) -> Result<()> { |
| 91 | self.last_calculated_index += out_col.len(); |
| 92 | // no need to use concat if the current `out_col` is empty |
| 93 | if self.out_col.is_empty() { |
| 94 | self.out_col = Arc::clone(out_col); |
| 95 | } else { |
| 96 | self.out_col = concat(&[&self.out_col, &out_col])?; |
| 97 | } |
| 98 | self.n_row_result_missing = |
| 99 | partition_batch_state.record_batch.num_rows() - self.last_calculated_index; |
| 100 | self.is_end = partition_batch_state.is_end; |
| 101 | Ok(()) |
| 102 | } |
| 103 | |
| 104 | pub fn new(out_type: &DataType) -> Result<Self> { |
| 105 | let empty_out_col = ScalarValue::try_from(out_type)?.to_array_of_size(0)?; |
no test coverage detected