alamb commented on code in PR #27862:
URL: https://github.com/apache/datafusion/pull/27862#discussion_r4739381358


##########
datafusion/physical-expr/src/expressions/cast.rs:
##########
@@ -857,9 +857,9 @@ pub fn cast_with_target_field(
     // Otherwise we need the CastExpr to strip extension metadata from the 
source.
     if expr_type == *cast_type && is_type_only {
         let source_field = expr.return_field(input_schema)?;
-        let has_extension_metadata = source_field
-            .metadata()
-            .contains_key(EXTENSION_TYPE_NAME_KEY);
+        let metadata = source_field.metadata();

Review Comment:
   This seems like it would apply to more than just cast. I wonder if we should 
extract it into a function (so it is more discoverable and better documented)



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