You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by sirpkt <gi...@git.apache.org> on 2014/12/18 10:28:11 UTC
[GitHub] tajo pull request: TAJO-920: Add FIRST_VALUE and LAST_VALUE window...
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 <si...@apache.org>
Date: 2014-12-18T08:03:51Z
TAJO-920: Add FIRST_VALUE and LAST_VALUE window functions
commit 7464d62460bc7af2b268541c0be57d57d7e899ce
Author: sirpkt <si...@apache.org>
Date: 2014-12-18T09:16:26Z
TAJO-920: Add FIRST_VALUE and LAST_VALUE window functions
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: TAJO-920: Add FIRST_VALUE and LAST_VALUE window...
Posted by hyunsik <gi...@git.apache.org>.
Github user hyunsik commented on the pull request:
https://github.com/apache/tajo/pull/308#issuecomment-67616551
Yes, you are right. Please go ahead!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: TAJO-920: Add FIRST_VALUE and LAST_VALUE window...
Posted by sirpkt <gi...@git.apache.org>.
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?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: TAJO-920: Add FIRST_VALUE and LAST_VALUE window...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/tajo/pull/308
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: TAJO-920: Add FIRST_VALUE and LAST_VALUE window...
Posted by hyunsik <gi...@git.apache.org>.
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?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: TAJO-920: Add FIRST_VALUE and LAST_VALUE window...
Posted by sirpkt <gi...@git.apache.org>.
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.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tajo pull request: TAJO-920: Add FIRST_VALUE and LAST_VALUE window...
Posted by hyunsik <gi...@git.apache.org>.
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.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---