XiangpengHao commented on code in PR #11043:
URL: https://github.com/apache/datafusion/pull/11043#discussion_r1650374927


##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -160,11 +160,47 @@ impl<'a> TypeCoercionRewriter<'a> {
         op: Operator,
         right: Expr,
     ) -> Result<(Expr, Expr)> {
+        // try to coerce the scalar to the column type
+        fn coerce_scalar_to_col(

Review Comment:
   I think @Weijun-H is right that we need to consider not only coercion by 
data type but also their column types.
   Normally: 
   `(Utf8View, Utf8) => (Utf8View, Utf8View)`
   
   But:
   `(Scalar(Utf8View), Column(Utf8)) => (Scalar(Utf8), Column(Utf8)) `
   
   I'll take a closer look and think about what is the best way to approach 
this..



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