fn primitive_source<T: ArrowPrimitiveType>( source: &Option<ArrayRef>, ) -> Result<&PrimitiveArray<T>, ArrowError>