waitingkuo commented on issue #3980:
URL: 
https://github.com/apache/arrow-datafusion/issues/3980#issuecomment-1293806500

   i'm working on this apache/arrow-rs#1380 which is probably one of the root 
case for `extract` and `date_part`
   
https://github.com/apache/arrow-rs/blob/master/arrow/src/compute/kernels/temporal.rs#L694-L712
   
   in postgres `extract` returns `numeric/decimal` while `date_part` returns 
double precision. Should we follow it?
   https://www.postgresql.org/docs/15/functions-datetime.html
   
   btw, postgres doc recommend use `extract
   ```
   For historical reasons, the date_part function returns values of type double 
precision. 
   This can result in a loss of precision in certain uses. Using extract is 
recommended instead.
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to