alamb commented on issue #10926: URL: https://github.com/apache/datafusion/issues/10926#issuecomment-2171460701
> Should we also change the signature and return Result<Uint64Array>? Yes I think so > Should we also change the signature and return Result<Uint64Array>? I actually think using `new_null_array` is wrong here. It returns the wrong type -- for example if we are getting row counts for a `Utf8` column, using new_null_arrray will return a `StringArray` rather than a `UInt64Array`. I actually hit this issue when working on https://github.com/apache/datafusion/pull/10924 And I had to change it to ```rust let Some(parquet_index) = self.parquet_index else { let num_row_groups = metadatas.into_iter().count(); return Ok(Arc::new(UInt64Array::from_iter( std::iter::repeat(None).take(num_row_groups), ))); }; ``` To make a test pass -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org