You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/03/23 10:59:42 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5696: Return plan error when adding utf8 and timestamp

alamb commented on code in PR #5696:
URL: https://github.com/apache/arrow-datafusion/pull/5696#discussion_r1145974783


##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -1213,6 +1214,13 @@ pub fn binary(
 ) -> Result<Arc<dyn PhysicalExpr>> {
     let lhs_type = &lhs.data_type(input_schema)?;
     let rhs_type = &rhs.data_type(input_schema)?;
+    if (is_utf8_or_large_utf8(lhs_type) && is_timestamp(rhs_type))

Review Comment:
   Thanks @Weijun-H  -- this does indeed fix the bug as stated. 
   
    I was trying to figure out how this code even executes (and was not caught earlier)
   
   It seems like maybe this could be related to
   
   https://github.com/apache/arrow-datafusion/blob/d8925bebc1f5382b044ce80f78bc465a9145e425/datafusion/expr/src/type_coercion/binary.rs#L80-L85
   
   🤔 
   
   Maybe it is time to figure out a better coercion story



-- 
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-unsubscribe@arrow.apache.org

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