apache/tajo — pull request #308 by sirpkt (2014-12-18 09:28:07+00:00)
Title: 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()