Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Function/UDF
    • Labels:
      None
    1. TAJO-365_3.patch
      8 kB
      Hyunsik Choi
    2. TAJO-365.2.patch
      8 kB
      DaeMyung Kang
    3. TAJO-365.patch
      8 kB
      DaeMyung Kang

      Activity

      Hide
      charsyam DaeMyung Kang added a comment -

      Please review this.

      Show
      charsyam DaeMyung Kang added a comment - Please review this.
      Hide
      sirpkt Keuntae Park added a comment -

      It looks good to me.
      'mvn clean install' finished successfully.
      However, patch file contains CRs, so clean the patch file please.

      Show
      sirpkt Keuntae Park added a comment - It looks good to me. 'mvn clean install' finished successfully. However, patch file contains CRs, so clean the patch file please.
      Hide
      sirpkt Keuntae Park added a comment -

      DaeMyung, when I tested with Math.toDegrees(), it returns different value from what you specified in testDegrees() method in TestMathFunctions.java

      testSimpleEval("select degrees(0.8) as col1 ", new String[]{"45.836624293484775"}
      

      but, Math.toDegrees(0.8) returns 45.83662361046586

      What makes this difference? (even though the difference is very small)

      Show
      sirpkt Keuntae Park added a comment - DaeMyung, when I tested with Math.toDegrees(), it returns different value from what you specified in testDegrees() method in TestMathFunctions.java testSimpleEval("select degrees(0.8) as col1 ", new String[]{"45.836624293484775"} but, Math.toDegrees(0.8) returns 45.83662361046586 What makes this difference? (even though the difference is very small)
      Hide
      charsyam DaeMyung Kang added a comment -

      Keuntae Park hi. it is because of TAJO type convention FLOAT4 to FLOAT8.

      for example.
      at that time, 0.4f will be converted to 0.4000000035(double)
      so it makes different result.

      the good way to solve this problem is that change default float point value from FLOAT4 to FLOAT8.
      but I think it is another issue

      Show
      charsyam DaeMyung Kang added a comment - Keuntae Park hi. it is because of TAJO type convention FLOAT4 to FLOAT8. for example. at that time, 0.4f will be converted to 0.4000000035(double) so it makes different result. the good way to solve this problem is that change default float point value from FLOAT4 to FLOAT8. but I think it is another issue
      Hide
      charsyam DaeMyung Kang added a comment -

      I removed CR

      Show
      charsyam DaeMyung Kang added a comment - I removed CR
      Hide
      hyunsik Hyunsik Choi added a comment -

      +1

      The patch looks good for me. However, the latest patch needs rebase. So, I created the updated patch against the latest repository. Besides, I added more unit tests for minus values.

      Show
      hyunsik Hyunsik Choi added a comment - +1 The patch looks good for me. However, the latest patch needs rebase. So, I created the updated patch against the latest repository. Besides, I added more unit tests for minus values.
      Hide
      hyunsik Hyunsik Choi added a comment -

      committed. Thanks, all guys.

      Show
      hyunsik Hyunsik Choi added a comment - committed. Thanks, all guys.
      Hide
      hudson Hudson added a comment -

      SUCCESS: Integrated in Tajo-trunk-postcommit #606 (See https://builds.apache.org/job/Tajo-trunk-postcommit/606/)
      TAJO-365: Implement degrees/radians function. (DaeMyung Kang via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=0ddf6ef4aa2991d88e4a26346e6678da5c14267b)

      • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/math/Radians.java
      • CHANGES.txt
      • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java
      • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/math/Degrees.java
      • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java
      Show
      hudson Hudson added a comment - SUCCESS: Integrated in Tajo-trunk-postcommit #606 (See https://builds.apache.org/job/Tajo-trunk-postcommit/606/ ) TAJO-365 : Implement degrees/radians function. (DaeMyung Kang via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=0ddf6ef4aa2991d88e4a26346e6678da5c14267b ) tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/math/Radians.java CHANGES.txt tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/math/Degrees.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java

        People

        • Assignee:
          charsyam DaeMyung Kang
          Reporter:
          charsyam DaeMyung Kang
        • Votes:
          0 Vote for this issue
          Watchers:
          3 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development