Theodus opened a new pull request, #24539: URL: https://github.com/apache/datafusion/pull/24539
## Which issue does this PR close? - Closes #24538. ## Rationale for this change The `ScalarValue` conversion fuzz tests round-trip arrays whose scalars all have the same `DataType`. The generator also omits timestamps with timezones and `FixedSizeBinary` arrays. The tests therefore do not cover mismatched type parameters. The added coverage exposes a bug in `ScalarValue::iter_to_array`. The function accepts mismatched decimal precision, decimal scale, timestamp timezone, and fixed-size binary width. It builds the array with the first scalar's parameters and discards the conflicting parameters. ## What changes are included in this PR? - Generate timestamps with timezones and `FixedSizeBinary` arrays with widths 1, 8, and 32. - Mutate each parameter independently and verify that `ScalarValue::iter_to_array` rejects the mismatch. - Make `ScalarValue::iter_to_array` reject inconsistent decimal parameters, timestamp timezones, and fixed-size binary widths. - Reuse index and null generation across the binary array generators. ## Are these changes tested? Yes. `scalar_value_iter_to_array_rejects_mixed_parameterized_types` covers decimal precision, decimal scale, timestamp timezone, and fixed-size binary width mismatches. The existing roundtrip test now covers timestamps with timezones and `FixedSizeBinary` arrays. ## Are there any user-facing changes? Yes. `ScalarValue::iter_to_array` now returns an error when its inputs have different parameterized logical types. The public API signature does not change. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
