hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepesh Khandelwal <deepe...@hotmail.com>
Subject Re: Review Request 57701: HIVE-16234: Add support for quarter in trunc udf
Date Thu, 16 Mar 2017 20:21:17 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57701/
-----------------------------------------------------------

(Updated March 16, 2017, 8:21 p.m.)


Review request for hive, Ashutosh Chauhan and Jason Dere.


Bugs: HIVE-16234
    https://issues.apache.org/jira/browse/HIVE-16234


Repository: hive-git


Description (updated)
-------

Hive has a Date function trunc(string date, string format) that returns date truncated to
the unit specified by the format. Supported formats: MONTH/MON/MM, YEAR/YYYY/YY.
Goal here is to extend support to QUARTER/Q.
Example:
SELECT trunc('2017-03-15', 'Q');
'2017-01-01'
SELECT trunc('2017-12-31', 'Q');
'2017-10-01'


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFTrunc.java a95248f 
  ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFTrunc.java 0021249 
  ql/src/test/queries/clientpositive/udf_trunc.q 2ac40cf 
  ql/src/test/results/clientpositive/udf_trunc.q.out 7874d52 


Diff: https://reviews.apache.org/r/57701/diff/1/


Testing
-------

Added unit tests


Thanks,

Deepesh Khandelwal


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message