jnturton commented on PR #2638:
URL: https://github.com/apache/drill/pull/2638#issuecomment-1240777691

   > Queries like that will work in MySQL and other RDBMS.  In Drill I think 
they won't fail, but the results are not what people expect.   For cases like 
this, would '2020-01-01' be automatically cast to a date?  Would the same thing 
happen in situations like...
   
   ```
   apache drill> select date_diff('2022-09-08', '1970-01-01');
   EXPR$0  19243 days 0:00:00
   
   1 row selected (0.157 seconds)
   apache drill> select sqrt('5');
   EXPR$0  2.23606797749979
   
   1 row selected (0.119 seconds)
   apache drill> select substring(current_date, 1, 4);
   EXPR$0  2022
   
   1 row selected (0.146 seconds)
   apache drill> select now() > '2022-09-08';
   EXPR$0  true
   ```


-- 
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: dev-unsubscr...@drill.apache.org

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

Reply via email to