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/06/27 18:35:40 UTC

[GitHub] [arrow-datafusion] alamb commented on pull request #6221: refactor: separate get_result_type from `coerce_type`

alamb commented on PR #6221:
URL: https://github.com/apache/arrow-datafusion/pull/6221#issuecomment-1610030064

   > One slightly unfortunate quirk of this separation is it isn't clear if the inputs to get_result_type are before or after type coercion.
   
   In my opinion, `get_result_type` should always be called *after* type coercion and if the function doesn't support the current input types, it should error. 
   
   Basically I think once the "Analyzer" pass has run on the expr tree the rest of the code shouldn't have to guess / coerce types anymore -- the types would always line up or the query would be rejected. 
   
   I think this is the standard approach in other databases (and, eg. the type checking / semantic pass in compilers)


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