hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xuefu Zhang (JIRA)" <>
Subject [jira] [Commented] (HIVE-6046) add UDF for converting date time from one presentation to another
Date Wed, 19 Feb 2014 00:17:21 GMT


Xuefu Zhang commented on HIVE-6046:

[~kostiantyn] Thanks for updating the patch. 

1. Please generate and name the patch, and post review according to the guidelines. For reference,
here is hive "how to contribute" guideline:

2. UDF str_to_date is expected to convert a given string of a given format to a Date object.
Your implementation seems to return another string, which is not what the UDF is expected
to do.

3. let's not confuse Timestamp type with Date type. If the udf is named with date in it, we
probably want to stick to Date data type, although it might be beneficial if it can take timestamp
as input.

> add  UDF for converting date time from one presentation to another
> ------------------------------------------------------------------
>                 Key: HIVE-6046
>                 URL:
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.13.0
>            Reporter: Kostiantyn Kudriavtsev
>            Assignee: Kostiantyn Kudriavtsev
>         Attachments: HIVE-6046.patch, Hive-6046-Feb15.patch, Hive-6046.patch
> it'd be nice to have function for converting datetime to different formats, for example:
> format_date('2013-12-12 00:00:00.0', 'yyyy-MM-dd HH:mm:ss.S', 'yyyy/MM/dd')
> There are two signatures to facilitate further using:
> format_date(datetime, fromFormat, toFormat)
> format_date(timestamp, toFormat)

This message was sent by Atlassian JIRA

View raw message