Details

      Activity

      Hide
      hyunsik Hyunsik Choi added a comment -

      No problem These days are holiday season. I don't want you guys to feel any burden.

      Show
      hyunsik Hyunsik Choi added a comment - No problem These days are holiday season. I don't want you guys to feel any burden.
      Hide
      sirpkt Keuntae Park added a comment -

      Thank you, Hyunsik Choi.
      Sorry for late response

      Show
      sirpkt Keuntae Park added a comment - Thank you, Hyunsik Choi . Sorry for late response
      Hide
      hudson Hudson added a comment -

      SUCCESS: Integrated in Tajo-master-build #523 (See https://builds.apache.org/job/Tajo-master-build/523/)
      TAJO-920: Add FIRST_VALUE and LAST_VALUE window functions. (Keuntae Park via hyunsik) (hyunsik: rev fd49bff19dd27262cc7abdd4bbf3cd0d5de14dfb)

      • tajo-core/src/test/resources/queries/TestWindowQuery/firstValue1.sql
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueTimestamp.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueInt.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueTime.java
      • tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java
      • tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueLong.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueTimestamp.java
      • tajo-core/src/test/resources/results/TestWindowQuery/firstValue1.result
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueInt.java
      • tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLLexer.g4
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueDouble.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueString.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueLong.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueFloat.java
      • tajo-core/src/test/resources/results/TestWindowQuery/lastValue1.result
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueFloat.java
      • tajo-plan/src/main/java/org/apache/tajo/plan/ExprAnnotator.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueDouble.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueString.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValue.java
      • tajo-core/src/test/java/org/apache/tajo/engine/query/TestWindowQuery.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueDate.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueTime.java
      • CHANGES
      • tajo-core/src/test/resources/queries/TestWindowQuery/lastValue1.sql
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueDate.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValue.java
      Show
      hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #523 (See https://builds.apache.org/job/Tajo-master-build/523/ ) TAJO-920 : Add FIRST_VALUE and LAST_VALUE window functions. (Keuntae Park via hyunsik) (hyunsik: rev fd49bff19dd27262cc7abdd4bbf3cd0d5de14dfb) tajo-core/src/test/resources/queries/TestWindowQuery/firstValue1.sql tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueTimestamp.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueInt.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueTime.java tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4 tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueLong.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueTimestamp.java tajo-core/src/test/resources/results/TestWindowQuery/firstValue1.result tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueInt.java tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLLexer.g4 tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueDouble.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueString.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueLong.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueFloat.java tajo-core/src/test/resources/results/TestWindowQuery/lastValue1.result tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueFloat.java tajo-plan/src/main/java/org/apache/tajo/plan/ExprAnnotator.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueDouble.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueString.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValue.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestWindowQuery.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueDate.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueTime.java CHANGES tajo-core/src/test/resources/queries/TestWindowQuery/lastValue1.sql tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueDate.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValue.java
      Hide
      hudson Hudson added a comment -

      FAILURE: Integrated in Tajo-master-CODEGEN-build #163 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/163/)
      TAJO-920: Add FIRST_VALUE and LAST_VALUE window functions. (Keuntae Park via hyunsik) (hyunsik: rev fd49bff19dd27262cc7abdd4bbf3cd0d5de14dfb)

      • tajo-core/src/test/resources/queries/TestWindowQuery/firstValue1.sql
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueDouble.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValue.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueInt.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueFloat.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueFloat.java
      • tajo-plan/src/main/java/org/apache/tajo/plan/ExprAnnotator.java
      • tajo-core/src/test/java/org/apache/tajo/engine/query/TestWindowQuery.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueDouble.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueString.java
      • CHANGES
      • tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueTime.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueDate.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueTimestamp.java
      • tajo-core/src/test/resources/results/TestWindowQuery/lastValue1.result
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValue.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueDate.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueString.java
      • tajo-core/src/test/resources/results/TestWindowQuery/firstValue1.result
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueTime.java
      • tajo-core/src/test/resources/queries/TestWindowQuery/lastValue1.sql
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueLong.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueTimestamp.java
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueInt.java
      • tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4
      • tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueLong.java
      • tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLLexer.g4
      Show
      hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #163 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/163/ ) TAJO-920 : Add FIRST_VALUE and LAST_VALUE window functions. (Keuntae Park via hyunsik) (hyunsik: rev fd49bff19dd27262cc7abdd4bbf3cd0d5de14dfb) tajo-core/src/test/resources/queries/TestWindowQuery/firstValue1.sql tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueDouble.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValue.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueInt.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueFloat.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueFloat.java tajo-plan/src/main/java/org/apache/tajo/plan/ExprAnnotator.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestWindowQuery.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueDouble.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueString.java CHANGES tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueTime.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueDate.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueTimestamp.java tajo-core/src/test/resources/results/TestWindowQuery/lastValue1.result tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValue.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueDate.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueString.java tajo-core/src/test/resources/results/TestWindowQuery/firstValue1.result tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueTime.java tajo-core/src/test/resources/queries/TestWindowQuery/lastValue1.sql tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueLong.java tajo-core/src/main/java/org/apache/tajo/engine/function/window/FirstValueTimestamp.java tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueInt.java tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4 tajo-core/src/main/java/org/apache/tajo/engine/function/builtin/LastValueLong.java tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLLexer.g4
      Hide
      hyunsik Hyunsik Choi added a comment -

      Hi Keuntae Park,

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

      Show
      hyunsik Hyunsik Choi added a comment - Hi Keuntae Park , I just committed the patch to master branch. Thank you for your contribution!
      Hide
      githubbot ASF GitHub Bot added a comment -

      Github user asfgit closed the pull request at:

      https://github.com/apache/tajo/pull/308

      Show
      githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/308
      Hide
      githubbot ASF GitHub Bot added a comment -

      Github user hyunsik commented on the pull request:

      https://github.com/apache/tajo/pull/308#issuecomment-67804082

      Hi @sirpkt ,

      +1
      The patch looks good to me. I have one suggestion. Each test method name should have the prefix 'test'. For example, ```lastValue1``` should be ```testLastValue1```. It's trivial, so you can immediately commit the patch after fixing them.

      Show
      githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/308#issuecomment-67804082 Hi @sirpkt , +1 The patch looks good to me. I have one suggestion. Each test method name should have the prefix 'test'. For example, ```lastValue1``` should be ```testLastValue1```. It's trivial, so you can immediately commit the patch after fixing them.
      Hide
      githubbot ASF GitHub Bot added a comment -

      Github user sirpkt commented on the pull request:

      https://github.com/apache/tajo/pull/308#issuecomment-67730776

      I added implementation of first_value() and last_value() for INT, LONG, FLOAT, DOUBLE, TIME, DATE, TIMESTAMP.

      Show
      githubbot ASF GitHub Bot added a comment - Github user sirpkt commented on the pull request: https://github.com/apache/tajo/pull/308#issuecomment-67730776 I added implementation of first_value() and last_value() for INT, LONG, FLOAT, DOUBLE, TIME, DATE, TIMESTAMP.
      Hide
      githubbot ASF GitHub Bot added a comment -

      Github user hyunsik commented on the pull request:

      https://github.com/apache/tajo/pull/308#issuecomment-67616551

      Yes, you are right. Please go ahead!

      Show
      githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/308#issuecomment-67616551 Yes, you are right. Please go ahead!
      Hide
      githubbot ASF GitHub Bot added a comment -

      Github user sirpkt commented on the pull request:

      https://github.com/apache/tajo/pull/308#issuecomment-67602918

      I wish to implement remaining functions.
      However, I'm not sure the scope of supporting types.
      I think all the supported data types should be included, like INT2, INT4, INT8, FLOAT4, FLOAT8, BOOLEAN, DATE, TIME, and TIMESTAMP,
      Is it right?

      Show
      githubbot ASF GitHub Bot added a comment - Github user sirpkt commented on the pull request: https://github.com/apache/tajo/pull/308#issuecomment-67602918 I wish to implement remaining functions. However, I'm not sure the scope of supporting types. I think all the supported data types should be included, like INT2, INT4, INT8, FLOAT4, FLOAT8, BOOLEAN, DATE, TIME, and TIMESTAMP, Is it right?
      Hide
      githubbot ASF GitHub Bot added a comment -

      Github user hyunsik commented on the pull request:

      https://github.com/apache/tajo/pull/308#issuecomment-67583038

      The patch looks good to me. They are built-in functions, so your direction is right.

      Do you have a plan to implement remain types like INT, BIGINT, FLOAT, DOUBLE?

      Show
      githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/308#issuecomment-67583038 The patch looks good to me. They are built-in functions, so your direction is right. Do you have a plan to implement remain types like INT, BIGINT, FLOAT, DOUBLE?
      Hide
      githubbot ASF GitHub Bot added a comment -

      GitHub user sirpkt opened a pull request:

      https://github.com/apache/tajo/pull/308

      TAJO-920: Add FIRST_VALUE and LAST_VALUE window functions

      I implemented first_value() and last_value() for TEXT type first.

      • It adds first_value, last_value keyword in lexer and parser and modifies SQLAnalyzer to call corresponding functions.
      • first_value() is defined as window function, however, last_value() is defined as aggregation function because it needs to reach the end row of the given column to determine the last value.
      • With current window function structure, every window function name should be hardcoded in ExprAnnotator.java, so do it for first_value()

      You can merge this pull request into a Git repository by running:

      $ git pull https://github.com/sirpkt/tajo TAJO-920

      Alternatively you can review and apply these changes as the patch at:

      https://github.com/apache/tajo/pull/308.patch

      To close this pull request, make a commit to your master/trunk branch
      with (at least) the following in the commit message:

      This closes #308


      commit d07fdb3ccdf4b929d8562a4fc3535f7a3df68280
      Author: sirpkt <sirpkt@apache.org>
      Date: 2014-12-18T08:03:51Z

      TAJO-920: Add FIRST_VALUE and LAST_VALUE window functions

      commit 7464d62460bc7af2b268541c0be57d57d7e899ce
      Author: sirpkt <sirpkt@apache.org>
      Date: 2014-12-18T09:16:26Z

      TAJO-920: Add FIRST_VALUE and LAST_VALUE window functions


      Show
      githubbot ASF GitHub Bot added a comment - GitHub user sirpkt opened a pull request: https://github.com/apache/tajo/pull/308 TAJO-920 : Add FIRST_VALUE and LAST_VALUE window functions I implemented first_value() and last_value() for TEXT type first. It adds first_value, last_value keyword in lexer and parser and modifies SQLAnalyzer to call corresponding functions. first_value() is defined as window function, however, last_value() is defined as aggregation function because it needs to reach the end row of the given column to determine the last value. With current window function structure, every window function name should be hardcoded in ExprAnnotator.java, so do it for first_value() You can merge this pull request into a Git repository by running: $ git pull https://github.com/sirpkt/tajo TAJO-920 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/308.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #308 commit d07fdb3ccdf4b929d8562a4fc3535f7a3df68280 Author: sirpkt <sirpkt@apache.org> Date: 2014-12-18T08:03:51Z TAJO-920 : Add FIRST_VALUE and LAST_VALUE window functions commit 7464d62460bc7af2b268541c0be57d57d7e899ce Author: sirpkt <sirpkt@apache.org> Date: 2014-12-18T09:16:26Z TAJO-920 : Add FIRST_VALUE and LAST_VALUE window functions

        People

        • Assignee:
          sirpkt Keuntae Park
          Reporter:
          hyunsik Hyunsik Choi
        • Votes:
          0 Vote for this issue
          Watchers:
          3 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development