Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Function/UDF
    • Labels:
      None

      Description

      Function Definition

      INT8 round(value FLOAT8)
      INT8 floor(value FLOAT8)
      INT8 ceil(value FLOAT8)
      

      Example

      round

      select round(5.1) => 5
      select round(5.5) => 6
      select round(5.6) => 6
      select round(-5.1) => -5
      select round(-5.5) => -6
      select round(-5.6) => -6
      

      floor

      select round(5.1) => 5
      select round(5.5) => 5
      select round(-5.1) => -6
      select round(-5.6) => -6
      

      ceil

      select round(5.1) => 6
      select round(5.5) => 6
      select round(-5.1) => -5
      select round(-5.6) => -5
      
      1. TAJO-350.patch
        12 kB
        Hyoungjun Kim

        Activity

        Hide
        hjkim Hyoungjun Kim added a comment -

        I implemented round, floor, ceil.
        I made package named math in org.apache.tajo.engine.function package.
        Testcase is in TestMethFunction class.
        Please review this patch.

        Show
        hjkim Hyoungjun Kim added a comment - I implemented round, floor, ceil. I made package named math in org.apache.tajo.engine.function package. Testcase is in TestMethFunction class. Please review this patch.
        Hide
        hyunsik Hyunsik Choi added a comment -

        +1

        The patch and unit tests look nice for me.

        Show
        hyunsik Hyunsik Choi added a comment - +1 The patch and unit tests look nice for me.
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed the patch to master. Thank you for your contribution!

        Show
        hyunsik Hyunsik Choi added a comment - committed the patch to master. Thank you for your contribution!
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-trunk-postcommit #579 (See https://builds.apache.org/job/Tajo-trunk-postcommit/579/)
        TAJO-350: Implement round, floor, ceil. (hyoungjunkim via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=3233d3824b8b8c572afe096f41511794d2633e9c)

        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/math/Round.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/math/Ceil.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/math/Floor.java
        • CHANGES.txt
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMethFunction.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-trunk-postcommit #579 (See https://builds.apache.org/job/Tajo-trunk-postcommit/579/ ) TAJO-350 : Implement round, floor, ceil. (hyoungjunkim via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=3233d3824b8b8c572afe096f41511794d2633e9c ) tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/math/Round.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/math/Ceil.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/function/math/Floor.java CHANGES.txt tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMethFunction.java

          People

          • Assignee:
            hjkim Hyoungjun Kim
            Reporter:
            hjkim Hyoungjun Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development