Dandandan commented on pull request #9596:
URL: https://github.com/apache/arrow/pull/9596#issuecomment-788175032


   .
   
   > I think this implementation looks really nice -- thank you @sundy-li . I 
believe that the code does what the PR description says it does.
   > 
   > I wonder if you happen to know what Postgres does in this situation (eg 
adding 2 32-bit numbers together?) I can imagine certain situations when the 
users wants to choose performance over avoiding possible overflow and would 
prefer not to upcast both arguments to 64-bit.
   > 
   > @Dandandan / @andygrove what do you think about what the default behavior 
should be?
   
   > I think this implementation looks really nice -- thank you @sundy-li . I 
believe that the code does what the PR description says it does.
   > 
   > I wonder if you happen to know what Postgres does in this situation (eg 
adding 2 32-bit numbers together?) I can imagine certain situations when the 
users wants to choose performance over avoiding possible overflow and would 
prefer not to upcast both arguments to 64-bit.
   > 
   > @Dandandan / @andygrove what do you think about what the default behavior 
should be?
   
   I think it could be acceptable to do a bit more here than PostgreSQL does? 
It think it will make DataFusion behave differently however from PostgreSQL.
   E.g. PostgreSQL returns an error `integer out of range` on `SELECT 
20000000000 + 20000000000` which I think the coercion will avoid by upcasting 
to 64 bit integers.
   
   > I think this implementation looks really nice -- thank you @sundy-li . I 
believe that the code does what the PR description says it does.
   > 
   > I wonder if you happen to know what Postgres does in this situation (eg 
adding 2 32-bit numbers together?) I can imagine certain situations when the 
users wants to choose performance over avoiding possible overflow and would 
prefer not to upcast both arguments to 64-bit.
   > 
   > @Dandandan / @andygrove what do you think about what the default behavior 
should be?
   
   I think it could be acceptable to do a bit more here than PostgreSQL does? 
It think it will make DataFusion behave differently however from PostgreSQL.
   E.g. PostgreSQL returns an error `integer out of range` on `SELECT 
20000000000 + 20000000000` but I think the coercion will avoid this error by 
upcasting to 64 bit integers.


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

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


Reply via email to