[jira] [Commented] (HIVE-2019) Implement NOW() UDF

2013-04-18 Thread Eric Hanson (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-2019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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


[jira] [Commented] (HIVE-2019) Implement NOW() UDF

2013-04-17 Thread Zhuoluo (Clark) Yang (JIRA)

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

Zhuoluo (Clark) Yang commented on HIVE-2019:


If we use now() for filters, the result will be uncertain.
Because if a Map Task is scheduled first, the now() of this map task is 
earlier, if this task is scheduled later, the now() of this map task is later.
In our production environment, a lot of hive tasks are scheduled at mid night, 
the now() of the Tasks may cross a day for the scheduling orders.
I think it is necessary to add a kind of UDF called UDCF. (User Defined Client 
Functions). if we get the client side now() and make it a constant during 
compile time, it will be no such problems.

 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


[jira] [Commented] (HIVE-2019) Implement NOW() UDF

2013-04-17 Thread Zhuoluo (Clark) Yang (JIRA)

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

Zhuoluo (Clark) Yang commented on HIVE-2019:


[~priyadarshini] I think the patch is a little bit simple, and should consider 
distributed situation. I think a better way is to fold the NOW() into a 
constant during compile time.

 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


[jira] [Commented] (HIVE-2019) Implement NOW() UDF

2013-04-17 Thread Edward Capriolo (JIRA)

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

Edward Capriolo commented on HIVE-2019:
---

UDFs have a deterministic annotation you should explore.

 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


[jira] [Commented] (HIVE-2019) Implement NOW() UDF

2013-04-17 Thread Zhuoluo (Clark) Yang (JIRA)

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

Zhuoluo (Clark) Yang commented on HIVE-2019:


Actually, NOW() is not a non-deterministic UDF like rand(), for every time you 
call it, it returns different answers. Is HIVE-746 a related JIRA issue?

 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


[jira] [Commented] (HIVE-2019) Implement NOW() UDF

2013-04-17 Thread Navis (JIRA)

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

Navis commented on HIVE-2019:
-

Agreed. NOW() should be replaced with a constant right before executing the 
query. It's non-deterministic in compile time but can be regarded as 
deterministic in runtime. 

 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


[jira] [Commented] (HIVE-2019) Implement NOW() UDF

2011-12-15 Thread Priyadarshini (Commented) (JIRA)

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

Priyadarshini commented on HIVE-2019:
-

I am working on this.
I have few doubts to clarify with respect to this.
select now(),now() from tname
The above query shud return the same time in both ofthe columns ? I find that 
in the reference link it does it.
One more doubt is if we want of this format,
select now()+0 from tname
i.e adding some integers to the now() function, it shuould be possible that 
now() fucntion should take argument like which format user want.
So for operations for adding some integer to now() funciton, we may hav to pass 
the format also

 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

 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: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (HIVE-2019) Implement NOW() UDF

2011-12-15 Thread Priyadarshini (Commented) (JIRA)

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

Priyadarshini commented on HIVE-2019:
-

I will implement 2 possible uses
One with default - now()
Other that takes a format as an argument and supports adding integer to it
i.e 
seelct now(format string) + 1 from tname

 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

 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: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira