[ASTERIXDB-2488][COMP] Support aggregate window functions - user model changes: yes - storage format changes: no - interface changes: no
Details: - Implement aggregate window functions: agg_func() OVER (frame_var AS)? (PARTITION BY ... ORDER BY ... frame_spec) - Where agg_func is a SQL/SQL++ aggregate function - Fix percent_rank() to always return 0 for the first tuple - Fix ntile() to handle NULL argument - Log query after each rewrite rule in SqlppQueryRewriter - Implement toString() for ADayTimeDuration, fix it for AYearMonthDuration - Add seek() method to RunFileReader
[ASTERIXDB-2394][COMP] Align VarCounter in query rewritting - user model changes: no - storage format changes: no - interface changes: no
Details: Currently, before we do certain language rewritings, we take a snapshot of the var counter in the context and pass it to the rewriter. This works fine in most of the cases, but it can fail when the rewriter introduces new variables. This will cause different variables map to the same variable id. Although this error may be fixed by another ScopingVisitor, the compiler could fail if there is no more visitor down in the rewriting workflow.