cgivre commented on PR #2638: URL: https://github.com/apache/drill/pull/2638#issuecomment-1243728471
> Turns out this particular one isn't possible without breaking other things that need VARCHAR to go to INT before it goes to DATE. > > ``` > apache drill> select date_diff('2022-09-08', '1970-01-01'); > EXPR$0 19243 days 0:00:00 > ``` > > So we're stuck with the following for date_diff. There do remain other automatic casts from VARCHAR to DATE that will still succeed though. > > ``` > apache drill> select date_diff('2022-09-08', date '1970-01-01'); > EXPR$0 19243 days 0:00:00 > ``` Maybe in for this edge case we do go ahead and make versions of the `DATE_DIFF()` function that accept strings and do the conversion manually. (Not in this PR.... ) -- 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