Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # dev - Review Request 18182: HIVE-5370. format_number udf should take user specifed format as argument


Copy link to this message
-
Re: Review Request 18182: HIVE-5370. format_number udf should take user specifed format as argument
Amareshwari Sriramadasu 2014-02-18, 04:25

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

(Updated Feb. 18, 2014, 4:25 a.m.)
Review request for hive, Ashutosh Chauhan and Navis Ryu.
Changes

Earlier patch was missing delete of a file
Bugs: HIVE-5370
    https://issues.apache.org/jira/browse/HIVE-5370
Repository: hive-git
Description

Added the format as optional argument.
Also takes care of null be being formatted. Current code throws NPE for null value, fixed it to return null on formatting of null.
Diffs (updated)

  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java a9a0176
  ql/src/test/queries/clientnegative/udf_format_number_wrong6.q e5b11b9
  ql/src/test/queries/clientpositive/udf_format_number.q 2504bd0
  ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out c3cb800
  ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out 1fe8a7c
  ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out 3953ef1
  ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out d51991f
  ql/src/test/results/clientpositive/udf_format_number.q.out 6771ae0

Diff: https://reviews.apache.org/r/18182/diff/
Testing

Unit tested
Thanks,

Amareshwari Sriramadasu