Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
Impala 2.1
-
None
-
None
-
commit c9b65ee52689ab33a06124388b1cf679f9756982
Author: Skye Wanderman-Milne <skye@cloudera.com>
Date: Wed Oct 22 17:28:35 2014 -0700
GetNext() should always set eos.
Description
We currently don't support executing min/max over sliding windows (i.e. start is not unbounded), but we should support them if we can re-write the window to be unbounded preceding (i.e. because the end is unbounded we can flip the window and sort).
E.g.
Query: select MAX(bigint_col) OVER (ORDER BY int_col ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING) FROM alltypes t1 ERROR: AnalysisException: 'max(bigint_col)' is only supported with an UNBOUNDED PRECEDING start bound.
This query should be re-written to be "... order by int_col desc rows between unbounded preceding and current row" and then we can execute it.