Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: UDF
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    1. HIVE-2694.D2673.1.patch
      29 kB
      Zhenxiao Luo
    2. HIVE-2694.4.patch.txt
      26 kB
      Zhenxiao Luo
    3. HIVE-2694.3.patch.txt
      26 kB
      Zhenxiao Luo
    4. HIVE-2694.2.patch.txt
      26 kB
      Zhenxiao Luo
    5. HIVE-2694.1.patch.txt
      30 kB
      Zhenxiao Luo
    6. ASF.LICENSE.NOT.GRANTED--HIVE-2694.D2673.1.patch
      29 kB
      Phabricator
    7. ASF.LICENSE.NOT.GRANTED--HIVE-2694.D1149.3.patch
      29 kB
      Phabricator
    8. ASF.LICENSE.NOT.GRANTED--HIVE-2694.D1149.2.patch
      23 kB
      Phabricator
    9. ASF.LICENSE.NOT.GRANTED--HIVE-2694.D1149.1.patch
      23 kB
      Phabricator

      Issue Links

        Activity

        Hide
        Carl Steinbach added a comment -

        Ref: http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_format

        Formats the number X to a format like '#,###,###.##', rounded to D decimal places, and returns the result as a string. If D is 0, the result has no decimal point or fractional part.

        mysql> SELECT FORMAT(12332.123456, 4);
        -> '12,332.1235'
        mysql> SELECT FORMAT(12332.1,4);
        -> '12,332.1000'
        mysql> SELECT FORMAT(12332.2,0);
        -> '12,332'

        Show
        Carl Steinbach added a comment - Ref: http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_format Formats the number X to a format like '#,###,###.##', rounded to D decimal places, and returns the result as a string. If D is 0, the result has no decimal point or fractional part. mysql> SELECT FORMAT(12332.123456, 4); -> '12,332.1235' mysql> SELECT FORMAT(12332.1,4); -> '12,332.1000' mysql> SELECT FORMAT(12332.2,0); -> '12,332'
        Hide
        Phabricator added a comment -

        zhenxiao requested code review of "HIVE-2694 [jira] Add FORMAT UDF".
        Reviewers: JIRA

        HIVE-2694: add format_number() UDF

        TEST PLAN
        EMPTY

        REVISION DETAIL
        https://reviews.facebook.net/D1149

        AFFECTED FILES
        ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java
        ql/src/test/queries/clientnegative/udf_format_number_wrong1.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong2.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong3.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong4.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong5.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong6.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong7.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong8.q
        ql/src/test/queries/clientpositive/udf_format_number.q
        ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong8.q.out
        ql/src/test/results/clientpositive/show_functions.q.out
        ql/src/test/results/clientpositive/udf_format_number.q.out

        MANAGE HERALD DIFFERENTIAL RULES
        https://reviews.facebook.net/herald/view/differential/

        WHY DID I GET THIS EMAIL?
        https://reviews.facebook.net/herald/transcript/2421/

        Tip: use the X-Herald-Rules header to filter Herald messages in your client.

        Show
        Phabricator added a comment - zhenxiao requested code review of " HIVE-2694 [jira] Add FORMAT UDF". Reviewers: JIRA HIVE-2694 : add format_number() UDF TEST PLAN EMPTY REVISION DETAIL https://reviews.facebook.net/D1149 AFFECTED FILES ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java ql/src/test/queries/clientnegative/udf_format_number_wrong1.q ql/src/test/queries/clientnegative/udf_format_number_wrong2.q ql/src/test/queries/clientnegative/udf_format_number_wrong3.q ql/src/test/queries/clientnegative/udf_format_number_wrong4.q ql/src/test/queries/clientnegative/udf_format_number_wrong5.q ql/src/test/queries/clientnegative/udf_format_number_wrong6.q ql/src/test/queries/clientnegative/udf_format_number_wrong7.q ql/src/test/queries/clientnegative/udf_format_number_wrong8.q ql/src/test/queries/clientpositive/udf_format_number.q ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out ql/src/test/results/clientnegative/udf_format_number_wrong8.q.out ql/src/test/results/clientpositive/show_functions.q.out ql/src/test/results/clientpositive/udf_format_number.q.out MANAGE HERALD DIFFERENTIAL RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/2421/ Tip: use the X-Herald-Rules header to filter Herald messages in your client.
        Hide
        Phabricator added a comment -

        cwsteinbach has requested changes to the revision "HIVE-2694 [jira] Add FORMAT UDF".

        INLINE COMMENTS
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:65 Instead of string comparisons on the type name, please do the following to verify the types:

        • Verify that the two OIs are PrimitiveObjectInspectors.
        • Cast both OIs to PrimtiveObjectInspector and then validate the type in a switch statement using PrimitiveObjectInspector.getPrimitiveCategory().
          ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:106 Let's make the StringBuilder a private instance variable and initialize it once in the constructor, and then clear it every time evaluate gets called:

        pattern.delete(0, pattern.length())
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:139 I think it should only be necessary to construct a new DecimalFormat object when evaluate is called with a new dValue. Otherwise, it seems like it should be possible to reuse the DecimalFormat object from the previous evaluation.
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:114 This doesn't look right to me. It's not possible to construct a single pattern that tells DecimalFormat to use the grouping separator for thousands?

        REVISION DETAIL
        https://reviews.facebook.net/D1149

        Show
        Phabricator added a comment - cwsteinbach has requested changes to the revision " HIVE-2694 [jira] Add FORMAT UDF". INLINE COMMENTS ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:65 Instead of string comparisons on the type name, please do the following to verify the types: Verify that the two OIs are PrimitiveObjectInspectors. Cast both OIs to PrimtiveObjectInspector and then validate the type in a switch statement using PrimitiveObjectInspector.getPrimitiveCategory(). ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:106 Let's make the StringBuilder a private instance variable and initialize it once in the constructor, and then clear it every time evaluate gets called: pattern.delete(0, pattern.length()) ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:139 I think it should only be necessary to construct a new DecimalFormat object when evaluate is called with a new dValue. Otherwise, it seems like it should be possible to reuse the DecimalFormat object from the previous evaluation. ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:114 This doesn't look right to me. It's not possible to construct a single pattern that tells DecimalFormat to use the grouping separator for thousands? REVISION DETAIL https://reviews.facebook.net/D1149
        Hide
        Phabricator added a comment -

        zhenxiao updated the revision "HIVE-2694 [jira] Add FORMAT UDF".
        Reviewers: JIRA, cwsteinbach

        HIVE-2694: Carl's comments addressed.
        New DecimalFormat constructed only if evaluated with a new dValue

        REVISION DETAIL
        https://reviews.facebook.net/D1149

        AFFECTED FILES
        ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java
        ql/src/test/queries/clientnegative/udf_format_number_wrong1.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong2.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong3.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong4.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong5.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong6.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong7.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong8.q
        ql/src/test/queries/clientpositive/udf_format_number.q
        ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong8.q.out
        ql/src/test/results/clientpositive/show_functions.q.out
        ql/src/test/results/clientpositive/udf_format_number.q.out

        Show
        Phabricator added a comment - zhenxiao updated the revision " HIVE-2694 [jira] Add FORMAT UDF". Reviewers: JIRA, cwsteinbach HIVE-2694 : Carl's comments addressed. New DecimalFormat constructed only if evaluated with a new dValue REVISION DETAIL https://reviews.facebook.net/D1149 AFFECTED FILES ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java ql/src/test/queries/clientnegative/udf_format_number_wrong1.q ql/src/test/queries/clientnegative/udf_format_number_wrong2.q ql/src/test/queries/clientnegative/udf_format_number_wrong3.q ql/src/test/queries/clientnegative/udf_format_number_wrong4.q ql/src/test/queries/clientnegative/udf_format_number_wrong5.q ql/src/test/queries/clientnegative/udf_format_number_wrong6.q ql/src/test/queries/clientnegative/udf_format_number_wrong7.q ql/src/test/queries/clientnegative/udf_format_number_wrong8.q ql/src/test/queries/clientpositive/udf_format_number.q ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out ql/src/test/results/clientnegative/udf_format_number_wrong8.q.out ql/src/test/results/clientpositive/show_functions.q.out ql/src/test/results/clientpositive/udf_format_number.q.out
        Hide
        Phabricator added a comment -

        cwsteinbach has requested changes to the revision "HIVE-2694 [jira] Add FORMAT UDF".

        INLINE COMMENTS
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:99 Cleaner to take advantage of fall-through here, e.g:

        switch (..)

        { case VOID: case FLOAT: case DOUBLE: break; default: ... }

        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:114 Fall-through
        ql/src/test/queries/clientpositive/udf_format_number.q:17 Please try formatting Double.MAX_VALUE and Long.MAX_VALUE.

        ql/src/test/queries/clientpositive/udf_format_number.q:23 Please try formatting Double.MIN_VALUE and Long.MIN_VALUE.
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:49 The MySQL docs describe this function as follows:

        "FORMAT(X,D)

        Formats the number X to a format like '#,###,###.##', rounded to D decimal places, and returns the result as a string. If D is 0, the result has no decimal point or fractional part."

        I think types in the current description (double, int) should be removed.

        Also, please make it clear in the doc string that this is intended to duplicated the functionality of MySQL's FORMAT UDF.
        ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out:1 Actually, I think it's acceptable for the first argument to be an integer type. In that case the digits to the right of the decimal point will always be zero. You can double check how the FORMAT UDF behaves in MySQL if you doubt this.
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:101 The integer types should also be acceptable. See my other comment below.
        ql/src/test/queries/clientpositive/udf_format_number.q:9 Also try formatting the values 0, 1, 12, 123, 1234

        REVISION DETAIL
        https://reviews.facebook.net/D1149

        Show
        Phabricator added a comment - cwsteinbach has requested changes to the revision " HIVE-2694 [jira] Add FORMAT UDF". INLINE COMMENTS ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:99 Cleaner to take advantage of fall-through here, e.g: switch (..) { case VOID: case FLOAT: case DOUBLE: break; default: ... } ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:114 Fall-through ql/src/test/queries/clientpositive/udf_format_number.q:17 Please try formatting Double.MAX_VALUE and Long.MAX_VALUE. ql/src/test/queries/clientpositive/udf_format_number.q:23 Please try formatting Double.MIN_VALUE and Long.MIN_VALUE. ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:49 The MySQL docs describe this function as follows: "FORMAT(X,D) Formats the number X to a format like '#,###,###.##', rounded to D decimal places, and returns the result as a string. If D is 0, the result has no decimal point or fractional part." I think types in the current description (double, int) should be removed. Also, please make it clear in the doc string that this is intended to duplicated the functionality of MySQL's FORMAT UDF. ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out:1 Actually, I think it's acceptable for the first argument to be an integer type. In that case the digits to the right of the decimal point will always be zero. You can double check how the FORMAT UDF behaves in MySQL if you doubt this. ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java:101 The integer types should also be acceptable. See my other comment below. ql/src/test/queries/clientpositive/udf_format_number.q:9 Also try formatting the values 0, 1, 12, 123, 1234 REVISION DETAIL https://reviews.facebook.net/D1149
        Hide
        Phabricator added a comment -

        zhenxiao updated the revision "HIVE-2694 [jira] Add FORMAT UDF".
        Reviewers: JIRA, cwsteinbach

        HIVE-2694: Carl's comments addressed
        also accepts integer as X value to format
        add testcases for Long/Double boundary values
        currently using -9223372036854775807 as Long.MIN_VALUE
        Found a Hive bug, PrimitiveObjectInspector.getPrimitiveCategory() returns DOUBLE for Long.MIN_VALUE -9223372036854775808. HIVE-2733 is created to track this bug

        REVISION DETAIL
        https://reviews.facebook.net/D1149

        AFFECTED FILES
        ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java
        ql/src/test/queries/clientnegative/udf_format_number_wrong1.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong2.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong3.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong4.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong5.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong6.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong7.q
        ql/src/test/queries/clientpositive/udf_format_number.q
        ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out
        ql/src/test/results/clientpositive/show_functions.q.out
        ql/src/test/results/clientpositive/udf_format_number.q.out

        Show
        Phabricator added a comment - zhenxiao updated the revision " HIVE-2694 [jira] Add FORMAT UDF". Reviewers: JIRA, cwsteinbach HIVE-2694 : Carl's comments addressed also accepts integer as X value to format add testcases for Long/Double boundary values currently using -9223372036854775807 as Long.MIN_VALUE Found a Hive bug, PrimitiveObjectInspector.getPrimitiveCategory() returns DOUBLE for Long.MIN_VALUE -9223372036854775808. HIVE-2733 is created to track this bug REVISION DETAIL https://reviews.facebook.net/D1149 AFFECTED FILES ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java ql/src/test/queries/clientnegative/udf_format_number_wrong1.q ql/src/test/queries/clientnegative/udf_format_number_wrong2.q ql/src/test/queries/clientnegative/udf_format_number_wrong3.q ql/src/test/queries/clientnegative/udf_format_number_wrong4.q ql/src/test/queries/clientnegative/udf_format_number_wrong5.q ql/src/test/queries/clientnegative/udf_format_number_wrong6.q ql/src/test/queries/clientnegative/udf_format_number_wrong7.q ql/src/test/queries/clientpositive/udf_format_number.q ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out ql/src/test/results/clientpositive/show_functions.q.out ql/src/test/results/clientpositive/udf_format_number.q.out
        Hide
        Phabricator added a comment -

        zhenxiao requested code review of "HIVE-2694 [jira] Add FORMAT UDF".
        Reviewers: JIRA

        HIVE-2694: Add FORMAT UDF

        TEST PLAN
        EMPTY

        REVISION DETAIL
        https://reviews.facebook.net/D2673

        AFFECTED FILES
        ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
        ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java
        ql/src/test/queries/clientnegative/udf_format_number_wrong1.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong2.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong3.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong4.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong5.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong6.q
        ql/src/test/queries/clientnegative/udf_format_number_wrong7.q
        ql/src/test/queries/clientpositive/udf_format_number.q
        ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out
        ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out
        ql/src/test/results/clientpositive/show_functions.q.out
        ql/src/test/results/clientpositive/udf_format_number.q.out

        MANAGE HERALD DIFFERENTIAL RULES
        https://reviews.facebook.net/herald/view/differential/

        WHY DID I GET THIS EMAIL?
        https://reviews.facebook.net/herald/transcript/6123/

        Tip: use the X-Herald-Rules header to filter Herald messages in your client.

        Show
        Phabricator added a comment - zhenxiao requested code review of " HIVE-2694 [jira] Add FORMAT UDF". Reviewers: JIRA HIVE-2694 : Add FORMAT UDF TEST PLAN EMPTY REVISION DETAIL https://reviews.facebook.net/D2673 AFFECTED FILES ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java ql/src/test/queries/clientnegative/udf_format_number_wrong1.q ql/src/test/queries/clientnegative/udf_format_number_wrong2.q ql/src/test/queries/clientnegative/udf_format_number_wrong3.q ql/src/test/queries/clientnegative/udf_format_number_wrong4.q ql/src/test/queries/clientnegative/udf_format_number_wrong5.q ql/src/test/queries/clientnegative/udf_format_number_wrong6.q ql/src/test/queries/clientnegative/udf_format_number_wrong7.q ql/src/test/queries/clientpositive/udf_format_number.q ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out ql/src/test/results/clientpositive/show_functions.q.out ql/src/test/results/clientpositive/udf_format_number.q.out MANAGE HERALD DIFFERENTIAL RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/6123/ Tip: use the X-Herald-Rules header to filter Herald messages in your client.
        Hide
        Carl Steinbach added a comment -

        @Zhenxiao: please see my comments on reviewboard. Thanks.

        Show
        Carl Steinbach added a comment - @Zhenxiao: please see my comments on reviewboard. Thanks.
        Hide
        Zhenxiao Luo added a comment -

        PrimitiveObjectInspector.getPrimitiveCategory() returns DOUBLE for LONG MIN_VAUE(-9223372036854775808)

        In testcase, use -9223372036854775807 for LONG boundary checking

        Show
        Zhenxiao Luo added a comment - PrimitiveObjectInspector.getPrimitiveCategory() returns DOUBLE for LONG MIN_VAUE(-9223372036854775808) In testcase, use -9223372036854775807 for LONG boundary checking
        Hide
        Zhenxiao Luo added a comment -

        Could not use Format as the UDF name, due to HIVE-2717(A bug in Hive.g).
        Use Format_number here.

        Show
        Zhenxiao Luo added a comment - Could not use Format as the UDF name, due to HIVE-2717 (A bug in Hive.g). Use Format_number here.
        Hide
        Carl Steinbach added a comment -

        @Zhenxiao: Please see my comments on phabricator. Thanks.

        Show
        Carl Steinbach added a comment - @Zhenxiao: Please see my comments on phabricator. Thanks.
        Hide
        Carl Steinbach added a comment -

        +1. Will commit if tests pass.

        Show
        Carl Steinbach added a comment - +1. Will commit if tests pass.
        Hide
        Carl Steinbach added a comment -

        Latest review request from Zhenxiao: https://reviews.facebook.net/D2673

        Show
        Carl Steinbach added a comment - Latest review request from Zhenxiao: https://reviews.facebook.net/D2673
        Hide
        Zhenxiao Luo added a comment -

        @Carl: HIVE-2694.3.patch.txt is the updated patch for the current trunk.

        Show
        Zhenxiao Luo added a comment - @Carl: HIVE-2694 .3.patch.txt is the updated patch for the current trunk.
        Hide
        Carl Steinbach added a comment -

        @Zhenxiao: Looks like the negative testcase outputs need to be updated. Can you please do this and then resubmit? Thanks.

        Show
        Carl Steinbach added a comment - @Zhenxiao: Looks like the negative testcase outputs need to be updated. Can you please do this and then resubmit? Thanks.
        Hide
        Zhenxiao Luo added a comment -

        @Carl: negative testcase outputs updated in the new patch HIVE-2694.4.patch.txt.

        Show
        Zhenxiao Luo added a comment - @Carl: negative testcase outputs updated in the new patch HIVE-2694 .4.patch.txt.
        Hide
        Carl Steinbach added a comment -

        Committed to trunk. Thanks Zhenxiao!

        Show
        Carl Steinbach added a comment - Committed to trunk. Thanks Zhenxiao!
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #1479 (See https://builds.apache.org/job/Hive-trunk-h0.21/1479/)
        HIVE-2694. Add FORMAT UDF (Zhenxiao Luo via cws) (Revision 1348976)

        Result = SUCCESS
        cws : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1348976
        Files :

        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong1.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong2.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong3.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong4.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong5.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong6.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong7.q
        • /hive/trunk/ql/src/test/queries/clientpositive/udf_format_number.q
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/show_functions.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/udf_format_number.q.out
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #1479 (See https://builds.apache.org/job/Hive-trunk-h0.21/1479/ ) HIVE-2694 . Add FORMAT UDF (Zhenxiao Luo via cws) (Revision 1348976) Result = SUCCESS cws : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1348976 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong1.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong2.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong3.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong4.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong5.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong6.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong7.q /hive/trunk/ql/src/test/queries/clientpositive/udf_format_number.q /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out /hive/trunk/ql/src/test/results/clientpositive/show_functions.q.out /hive/trunk/ql/src/test/results/clientpositive/udf_format_number.q.out
        Hide
        Phabricator added a comment -

        zhenxiao has abandoned the revision "HIVE-2694 [jira] Add FORMAT UDF".

        REVISION DETAIL
        https://reviews.facebook.net/D1149

        To: JIRA, cwsteinbach, zhenxiao
        Cc: cwsteinbach

        Show
        Phabricator added a comment - zhenxiao has abandoned the revision " HIVE-2694 [jira] Add FORMAT UDF". REVISION DETAIL https://reviews.facebook.net/D1149 To: JIRA, cwsteinbach, zhenxiao Cc: cwsteinbach
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/)
        HIVE-2694. Add FORMAT UDF (Zhenxiao Luo via cws) (Revision 1348976)

        Result = ABORTED
        cws : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1348976
        Files :

        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong1.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong2.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong3.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong4.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong5.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong6.q
        • /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong7.q
        • /hive/trunk/ql/src/test/queries/clientpositive/udf_format_number.q
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out
        • /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/show_functions.q.out
        • /hive/trunk/ql/src/test/results/clientpositive/udf_format_number.q.out
        Show
        Hudson added a comment - Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/ ) HIVE-2694 . Add FORMAT UDF (Zhenxiao Luo via cws) (Revision 1348976) Result = ABORTED cws : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1348976 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFormatNumber.java /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong1.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong2.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong3.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong4.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong5.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong6.q /hive/trunk/ql/src/test/queries/clientnegative/udf_format_number_wrong7.q /hive/trunk/ql/src/test/queries/clientpositive/udf_format_number.q /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong1.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong2.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong3.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong4.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong5.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong6.q.out /hive/trunk/ql/src/test/results/clientnegative/udf_format_number_wrong7.q.out /hive/trunk/ql/src/test/results/clientpositive/show_functions.q.out /hive/trunk/ql/src/test/results/clientpositive/udf_format_number.q.out
        Hide
        Ashutosh Chauhan added a comment -

        This issue is fixed and released as part of 0.10.0 release. If you find an issue which seems to be related to this one, please create a new jira and link this one with new jira.

        Show
        Ashutosh Chauhan added a comment - This issue is fixed and released as part of 0.10.0 release. If you find an issue which seems to be related to this one, please create a new jira and link this one with new jira.

          People

          • Assignee:
            Zhenxiao Luo
            Reporter:
            Carl Steinbach
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development