officialasishkumar opened a new pull request, #21454: URL: https://github.com/apache/datafusion/pull/21454
## Which issue does this PR close? - Closes #21431. ## Rationale for this change Planning a malformed typed literal such as `time 17542368000000000` currently panics in `datafusion-sql` because the planner assumes every `TypedString` payload is string-backed and calls `into_string().unwrap()`. Invalid SQL should surface as a normal planner error rather than aborting the planning path. ## What changes are included in this PR? - Replace the `unwrap()` in the `SQLExpr::TypedString` planning path with explicit validation. - Return a planner error when the typed literal payload is not string-backed. - Add a regression test covering the invalid `TIME` typed literal reported in the issue. ## Are these changes tested? - `cargo test -p datafusion-sql` ## Are there any user-facing changes? Users now receive a planner error for malformed typed literals instead of a panic. -- 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]
