Github user sirpkt commented on a diff in the pull request:
https://github.com/apache/tajo/pull/454#discussion_r28210529
--- Diff:
tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java ---
@@ -491,14 +506,16 @@ public WindowSpec
buildWindowSpec(SQLParser.Window_specificationContext ctx) {
WindowFrameStartBoundType boundType = null;
if (checkIfExist(context.UNBOUNDED())) {
boundType = WindowFrameStartBoundType.UNBOUNDED_PRECEDING;
- } else if (checkIfExist(context.unsigned_value_specification())) {
+ } else if (checkIfExist(context.PRECEDING())) {
boundType = WindowFrameStartBoundType.PRECEDING;
+ } else if (checkIfExist(context.FOLLOWING())) {
+ boundType = WindowFrameStartBoundType.FOLLOWING;
} else {
boundType = WindowFrameStartBoundType.CURRENT_ROW;
--- End diff --
I'm a little confused about the code because it passes several weeks after
writing the code.
Sorry, forget about above comments.
Code in SQLAnalyzer.java only works when the user explicitly write the
window frame specification on sql string, while
ExprAnnotator::visitWindowFunction fills implicit information when user does
not specify it.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---