it would be great eventually to cover these error cases with tests too (aka verify invalid inputs). I don't think it is needed for this PR _Originally posted by @alamb in https://github.com/apache/arrow-rs/pull/7666#discussion_r2150513133_