Dandandan opened a new pull request, #22206: URL: https://github.com/apache/datafusion/pull/22206
## Which issue does this PR close? - Closes #22194. ## Rationale for this change `arrow_cast` and `arrow_try_cast` accepted Arrow time type strings that combine `Time32` / `Time64` with unsupported units. Those invalid types could reach later planning or execution paths and panic in Arrow array code. ## What changes are included in this PR? - Validate parsed `arrow_cast` / `arrow_try_cast` target types before returning fields or simplifying casts. - Reject `Time32(Microsecond)`, `Time32(Nanosecond)`, `Time64(Second)`, and `Time64(Millisecond)`. - Add sqllogictest coverage for the invalid combinations from the issue. ## Are these changes tested? - `cargo test -p datafusion-sqllogictest --test sqllogictests -- arrow_typeof` - `cargo clippy -p datafusion-functions --all-targets --all-features -- -D warnings` - `cargo fmt --all` - `cargo clippy --all-targets --all-features -- -D warnings` ## Are there any user-facing changes? Invalid Arrow time type combinations now return a planning error instead of being accepted by `arrow_cast` / `arrow_try_cast`. -- 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]
