jayzhan211 commented on code in PR #11978:
URL: https://github.com/apache/datafusion/pull/11978#discussion_r1719931207


##########
datafusion/expr-common/src/columnar_value.rs:
##########
@@ -195,6 +214,10 @@ impl ColumnarValue {
                 kernels::cast::cast_with_options(array, cast_type, 
&cast_options)?,
             )),
             ColumnarValue::Scalar(scalar) => {
+                if scalar.data_type().logically_eq(cast_type) {

Review Comment:
   I think the general idea is we do logical type eq check in logical layer. Do 
actual casting in physical layer.
   



##########
datafusion/expr-common/src/columnar_value.rs:
##########
@@ -195,6 +214,10 @@ impl ColumnarValue {
                 kernels::cast::cast_with_options(array, cast_type, 
&cast_options)?,
             )),
             ColumnarValue::Scalar(scalar) => {
+                if scalar.data_type().logically_eq(cast_type) {

Review Comment:
   I think the general idea is that we do logical type eq check in logical 
layer. Do actual casting in physical layer.
   



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to