[ https://issues.apache.org/jira/browse/IMPALA-1503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Armstrong resolved IMPALA-1503. ----------------------------------- Resolution: Duplicate > Impala's date_sub and date_add functions are not automatically casting > strings (in the correct format) to TIMESTAMP > ------------------------------------------------------------------------------------------------------------------- > > Key: IMPALA-1503 > URL: https://issues.apache.org/jira/browse/IMPALA-1503 > Project: IMPALA > Issue Type: Bug > Components: Frontend > Affects Versions: Impala 2.0 > Reporter: Alex Spencer > Assignee: Tim Armstrong > Priority: Minor > Labels: planner, timestamp > > To reproduce: > -- This query works: > select date_sub(now(), interval 5 minutes); > -- Get the string version of now and copy and place it below: > select now() as now; > -- Paste in string and run this, Impala will error: > select date_sub('2014-11-21 15:49:05.312610000', interval 5 minutes); > -- It should not error, but rather cast the string (as per the documentation: > http://www.cloudera.com/content/cloudera/en/documentation/cloudera-impala/latest/topics/impala_timestamp.html?scroll=timestamp > ****The first argument can be a string, which is automatically cast to > TIMESTAMP if it uses the recognized format, as described in TIMESTAMP Data > Type.**** -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org