Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.3.0
    • Component/s: Query Processor
    • Labels:
      None
    • Environment:

      Ubuntu, Java6, Hadoop 0.17, 0.18 and 0.19

    • Hadoop Flags:
      Reviewed
    • Release Note:
      HIVE-286. Use round(xxx,12) to make sure there is no precision matching problem in testCliDriver_udf7. (zshao via johan)

      Description

      The org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udf7 test fails.
      See this url for more information: http://hudson.zones.apache.org/hudson/job/Hive-trunk-h0.19/lastBuild/testReport/org.apache.hadoop.hive.cli/TestCliDriver/testCliDriver_udf7/

      1. HIVE-286.2.patch
        6 kB
        Zheng Shao
      2. hive-286.1.patch
        2 kB
        Raghotham Murthy

        Activity

        Hide
        Ashish Thusoo added a comment -

        Seems to be related to precision?

        diff -a -I (file:)\|(/tmp/.*) /home/hudson/hudson-slave/workspace/Hive-trunk-h0.19/hive/build/ql/test/logs/clientpositive/udf7.q.out /home/hudson/hudson-slave/workspace/Hive-trunk-h0.19/hive/ql/src/test/results/clientpositive/udf7.q.out
        77c77
        < 1.0986122886681098 NULL NULL 1.0986122886681098 NULL NULL 1.5849625007211563 NULL NULL 0.47712125471966244 NULL NULL 1.5849625007211563 NULL NULL NULL -1.0 7.38905609893065 8.0 8.0 0.125 8.0 2.0 NaN 1.0

        > 1.0986122886681096 NULL NULL 1.0986122886681096 NULL NULL 1.584962500721156 NULL NULL 0.4771212547196623 NULL NULL 1.584962500721156 NULL NULL NULL -1.0 7.38905609893065 8.0 8.0 0.125 8.0 2.0 NaN 1.0
        Exception: Client execution results dailed with error code = 1

        Show
        Ashish Thusoo added a comment - Seems to be related to precision? diff -a -I ( file:&#41;\ |(/tmp/.*) /home/hudson/hudson-slave/workspace/Hive-trunk-h0.19/hive/build/ql/test/logs/clientpositive/udf7.q.out /home/hudson/hudson-slave/workspace/Hive-trunk-h0.19/hive/ql/src/test/results/clientpositive/udf7.q.out 77c77 < 1.0986122886681098 NULL NULL 1.0986122886681098 NULL NULL 1.5849625007211563 NULL NULL 0.47712125471966244 NULL NULL 1.5849625007211563 NULL NULL NULL -1.0 7.38905609893065 8.0 8.0 0.125 8.0 2.0 NaN 1.0 — > 1.0986122886681096 NULL NULL 1.0986122886681096 NULL NULL 1.584962500721156 NULL NULL 0.4771212547196623 NULL NULL 1.584962500721156 NULL NULL NULL -1.0 7.38905609893065 8.0 8.0 0.125 8.0 2.0 NaN 1.0 Exception: Client execution results dailed with error code = 1
        Hide
        Raghotham Murthy added a comment -

        getting tired of seeing the build errors because of this. Cant we just use DecimalFormat and print out 4 digits after the decimal (similar to mysql)? We can later add a DECIMAL type which supports user specified precision and scale. I have attached changes to LazySimpleSerDe.

        Show
        Raghotham Murthy added a comment - getting tired of seeing the build errors because of this. Cant we just use DecimalFormat and print out 4 digits after the decimal (similar to mysql)? We can later add a DECIMAL type which supports user specified precision and scale. I have attached changes to LazySimpleSerDe.
        Hide
        Prasad Chakka added a comment -

        this change might break existing code which may assume large precision. we should make it configurable until we have proper decimal type.

        Show
        Prasad Chakka added a comment - this change might break existing code which may assume large precision. we should make it configurable until we have proper decimal type.
        Hide
        Zheng Shao added a comment -

        Agree. We should not sacrifice the precision in default.

        The MySQL function closest to sprintf is http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_format

        Let's add that format function instead, and use it in the test cases to make sure it does not fail again.

        Show
        Zheng Shao added a comment - Agree. We should not sacrifice the precision in default. The MySQL function closest to sprintf is http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_format Let's add that format function instead, and use it in the test cases to make sure it does not fail again.
        Hide
        Zheng Shao added a comment -

        Use round(xxx,12) to make sure there is no precision matching problem in testing.

        Show
        Zheng Shao added a comment - Use round(xxx,12) to make sure there is no precision matching problem in testing.
        Hide
        Johan Oskarsson added a comment -

        Committed revision 751398. Thanks Zheng!

        Show
        Johan Oskarsson added a comment - Committed revision 751398. Thanks Zheng!
        Hide
        Zheng Shao added a comment -

        Thanks for the quick commit Johan!
        Can you close the issue and put the new line in CHANGES.txt in the "Release note" section?

        Show
        Zheng Shao added a comment - Thanks for the quick commit Johan! Can you close the issue and put the new line in CHANGES.txt in the "Release note" section?
        Hide
        Johan Oskarsson added a comment -

        The release note is already there. So the Hive way is to close the issue rather then resolve it? Closing it now as requested.

        Show
        Johan Oskarsson added a comment - The release note is already there. So the Hive way is to close the issue rather then resolve it? Closing it now as requested.
        Hide
        Zheng Shao added a comment -

        Hi Johan, "Resolved" is good enough. Somehow I didn't see the issue was resolved last time. The next time you just need to resolve the issue as usual.

        Show
        Zheng Shao added a comment - Hi Johan, "Resolved" is good enough. Somehow I didn't see the issue was resolved last time. The next time you just need to resolve the issue as usual.

          People

          • Assignee:
            Zheng Shao
            Reporter:
            Johan Oskarsson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development