[ 
https://issues.apache.org/jira/browse/HIVE-2019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13635327#comment-13635327
 ] 

Eric Hanson commented on HIVE-2019:
-----------------------------------

Agreed, especially with the phrase "right before executing the query." The 
timestamp should be gotten once at query execution startup time, not compile 
time. Although these two steps are pretty much the same in Hive now, someday 
there could be a plan cache, so a cached NOW() result would get stale. Or, if a 
compilation takes a long time for some reason, NOW() could get stale. This is 
how it is done in one commercial DBMS that I know. If there are multiple 
different flavors of date and time functions, they should all be based off the 
same internal hi-resolution timestamp. That way they would all be consistent 
within one query execution if multiple functions are used, say DATE(), NOW() 
etc. in the same query.
                
> Implement NOW() UDF
> -------------------
>
>                 Key: HIVE-2019
>                 URL: https://issues.apache.org/jira/browse/HIVE-2019
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>            Reporter: Carl Steinbach
>            Assignee: Priyadarshini
>         Attachments: HIVE-2019.patch
>
>
> Reference: 
> http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_now

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to