mkleen commented on code in PR #22730:
URL: https://github.com/apache/datafusion/pull/22730#discussion_r3348142761


##########
datafusion/physical-expr/src/expressions/cast.rs:
##########
@@ -50,8 +50,8 @@ const DEFAULT_SAFE_CAST_OPTIONS: CastOptions<'static> = 
CastOptions {
 /// planning-time validation matches runtime validation, enabling fail-fast 
behavior
 /// instead of deferring errors to execution. Handles structs at any nesting 
level
 /// (e.g., `List<Struct>`, `Dictionary<_, Struct>`).
-fn can_cast_named_struct_types(source: &DataType, target: &DataType) -> bool {
-    validate_data_type_compatibility("", source, target).is_ok()
+fn can_cast_named_struct_types(source: &DataType, target: &DataType) -> 
Result<bool> {
+    validate_data_type_compatibility("", source, target).map(|_| true)

Review Comment:
   This make sure that the error message is not swallowed here.



-- 
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]

Reply via email to