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

Eugene Koifman commented on HIVE-5814:
--------------------------------------

java.sql.Date works like this.
1. d = new Date(System.currentTimeMillis()
2. d.toString() - prints out human readable date, but implicitly takes into 
account local timezone
3. Date.valueOf("2014-01-01") calculates millis value again using local 
timezone.  
4. our LazySerde serializes Date using toString/valueOf which in my opinion is 
totally wrong.  Thus if operation in 1 is performed at 5AM UTC time (Apr 2nd 
for example) but hive is running in Palo Alto, it will save the date which is 1 
day before, i.e. Apr 1st.  It should just store the millis value (perhaps 
making sure to chop off the 'time' part if any, i.e. so that it represents 
midnight since Epoch) and read it back the same way.  Then we'd have 'absolute' 
notion of date.

> Add DATE, TIMESTAMP, DECIMAL, CHAR, VARCHAR types support in HCat
> -----------------------------------------------------------------
>
>                 Key: HIVE-5814
>                 URL: https://issues.apache.org/jira/browse/HIVE-5814
>             Project: Hive
>          Issue Type: New Feature
>          Components: HCatalog
>    Affects Versions: 0.12.0
>            Reporter: Eugene Koifman
>            Assignee: Eugene Koifman
>         Attachments: HCat-Pig Type Mapping Hive 0.13.pdf, HIVE-5814.2.patch, 
> HIVE-5814.3.patch, HIVE-5814.4.patch, HIVE-5814.5.patch
>
>
> Hive 0.12 added support for new data types.  Pig 0.12 added some as well.  
> HCat should handle these as well.    Also note that CHAR was added recently.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to