You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/18 20:38:24 UTC

[GitHub] [arrow-datafusion] jorgecarleitao commented on pull request #2257: Move logical expression type-coercion code from `physical-expr` crate to `expr` crate

jorgecarleitao commented on PR #2257:
URL: https://github.com/apache/arrow-datafusion/pull/2257#issuecomment-1101742781

   The background of my thoughts back then was: there are two types of "coercion rules":
   
   * coercion rules that exist as a consequence of the supported ops from the physical engine (e.g. `i32 + i64 -> cast(i32 AS i64) + i64` when the engine does not support `i32 + i64`).
   
   * coercion rules related to the semantic meaning of what the user wants. For example, a user usually wants `sum(Vec<u8>)` to be `u64`, not `u8`, to avoid numeric overflows.
   
   imo the former is part of the step `logical -> physical`, the latter is part of the (run-time) type checking done when performing logical planning for schema resolution (i.e. what schema will the logical plan have)


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