alamb commented on code in PR #8695:
URL: https://github.com/apache/arrow-datafusion/pull/8695#discussion_r1438878400


##########
datafusion/core/tests/sql/expr.rs:
##########
@@ -754,6 +755,39 @@ async fn test_extract_epoch() -> Result<()> {
         "946684800.0"
     );
     test_expression!("extract(epoch from NULL::timestamp)", "NULL");
+    // date

Review Comment:
   👍  I double checked this is consistent with postgres:
   
   ```
   postgres=# select extract(epoch from '1970-01-01'::date);
    extract
   ---------
          0
   (1 row)
   
   postgres=# select extract(epoch from '1970-01-02'::date);
    extract
   ---------
      86400
   (1 row)
   
   postgres=# select extract(epoch from '1969-12-31'::date);
    extract
   ---------
     -86400
   (1 row)
   
   ```



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