[
https://issues.apache.org/jira/browse/HIVE-19370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472664#comment-16472664
]
Bharathkrishna Guruvayoor Murali commented on HIVE-19370:
---------------------------------------------------------
Should I handle String inputs like 2018-05-10 12:20:10 to retain the time part.
I did not do this as of now because the inputs can have several formats if it
is String (whereas timestamp is only in one format and it was easier to handle).
Should I add an extra parameter in the UDF that accepts an optional DateFormat
string, where the user can pass the format they want the output to be in. If
the parser fails, I can fall-back to the default format. What are the thoughts
on this?
> Issue: ADD Months function on timestamp datatype fields in hive
> ---------------------------------------------------------------
>
> Key: HIVE-19370
> URL: https://issues.apache.org/jira/browse/HIVE-19370
> Project: Hive
> Issue Type: Bug
> Reporter: Amit Chauhan
> Assignee: Bharathkrishna Guruvayoor Murali
> Priority: Major
> Attachments: HIVE-19370.01.patch
>
>
> *Issue:*
> while using ADD_Months function on a timestamp datatype column the output
> omits the time part[HH:MM:SS] part from output.
> which should not be the case.
> *query:* EMAIL_FAILURE_DTMZ is of datatype timestamp in hive.
> hive> select CUSTOMER_ID,EMAIL_FAILURE_DTMZ,ADD_MONTHS (EMAIL_FAILURE_DTMZ ,
> 1) from TABLE1 where CUSTOMER_ID=125674937;
> OK
> 125674937 2015-12-09 12:25:53 2016-01-09
> *hiver version :*
> hive> !hive --version;
> Hive 1.2.1000.2.5.6.0-40
>
> can you please help if somehow I can get below as output:
>
> 125674937 2015-12-09 12:25:53 2016-01-09 12:25:53
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)