mhilton opened a new issue, #20671:
URL: https://github.com/apache/datafusion/issues/20671

   ### Describe the bug
   
   Trying to use nanosecond as a part with date_part results in an error. The 
[documentation](https://datafusion.apache.org/user-guide/sql/scalar_functions.html#date-part)
 says it should work.
   
   ### To Reproduce
   
   Call the date_part function with the part specified as `'nanosecond'`.  e.g: 
([fiddle](https://datafusion-fiddle.vercel.app?q=eyJzdGF0ZW1lbnQiOiItLSBQdXQgeW91ciBzZWxlY3Qgc3RhdGVtZW50IGhlcmUgYW5kIGhpdCBDdHJsK0VudGVyIHRvIHN1Ym1pdC5cblxuU0VMRUNUIGRhdGVfcGFydCgnbmFub3NlY29uZCcsIG5vdygpKTsifQ==))
   
   ```sql
   SELECT date_part('nanosecond', now());
   ```
   
   ### Expected behavior
   
   The result to be the number of seconds (including any fractional part * 
1_000_000_000.
   
   ### Additional context
   
   To support this `date_part()` will have to return an `Int64`, rather than an 
`Int32` if the part is `'nanosecond'`. It already has special handling for 
`'epoch'`, so I can't see this being a problem.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to