Hi Shyam,

I think HIVE-192 is about the fact that there is no support for the timestamp 
type in Hive (or for that matter date and datetime types). In FB we are using 
strings to hold this information. 

If you are planning to add a built in function like localtimestamp, then that 
should probably go into a different JIRA.

We have tried to adhere to mysql way of doing things as we find more folks 
using it (at least in our company) and looks from your research that they are 
basically standards compliant. So my vote will be to go with mysql semantics 
and CURRENT_TIMESTAMP construct.

Ashish


-----Original Message-----
From: Shyam Sarkar [mailto:[email protected]] 
Sent: Wednesday, February 11, 2009 2:37 PM
To: [email protected]
Subject: Need LOCALTIMESTAMP ?

Hello,

Please help me to understand what I am going to implement for Timestamp. Do we 
need LOCALTIMESTAMP implementation? See the comparisons below::

=================================================================


LOCALTIMESTAMP
It's often important to get the value of current date and time. Below are the 
functions used to do that in the different implementations.

Standard The current timestamp (without time zone) is retrieved with the 
LOCALTIMESTAMP function which may be used as: 
SELECT LOCALTIMESTAMP ...
or
SELECT LOCALTIMESTAMP(precision) ...

Note that "SELECT LOCALTIMESTAMP() ..." is illegal: If you don't care about the 
precision, then you must not use any parenthesis.

If the DBMS supports the non-core time zone features (feature ID F411), then it 
must also provide the functions CURRENT_TIMESTAMP and 
CURRENT_TIMESTAMP(precision) which return a value of type TIMESTAMP WITH TIME 
ZONE. If it doesn't support time zones, then the DBMS must not provide a 
CURRENT_TIMESTAMP function.
 
PostgreSQL Follows the standard. 
Documentation
 
DB2 Doesn't have the LOCALTIMESTAMP function. 
Instead, it provides a special, magic value ('special register' in IBM 
language), CURRENT_TIMESTAMP (alias to 'CURRENT TIMESTAMP') which may be used 
as though it were a function without arguments. However, since DB2 doesn't 
provide TIMESTAMP WITH TIME ZONE support, the availability of CURRENT_TIMESTAMP 
could be said to be against the standard-at least confusing.

Documentation
 
MSSQL Doesn't have the LOCALTIMESTAMP function. 
Instead, it has CURRENT_TIMESTAMP which-however-doesn't return a value of 
TIMESTAMP WITH TIME ZONE, but rather a value of MSSQL's DATETIME type (which 
doesn't contain time zone information).

Documentation
 
MySQL Follows the standard. 
Documentation
 
Oracle Follows the standard. 
Informix On my TODO. 

====================================================================

Thanks,
[email protected]




      

Reply via email to