[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-2286][COMP][FUN][HYR] Parallel Sort Optimization - user model changes: yes - storage format changes: no - interface changes: yes
details: - new plan for sort operation which includes sampling and replicating the stream of data to be sorted. Sort-merge connector is removed from the plan. The sorted result now is in multiple partitions. - new optimization rule to check whether full parallel sort is applicable. - new Forward operator to read the replicated sort input stream and to receive the ouput of the sampling. - new sequential merge connector to merge a globally ordered result residing in multiple partitions (in addition to the connector's partition computer). - "asterix-lang-aql/pom.xml" is changed as a result of refactoring code related to the range map handling. - new private sampling function to generate the range map object (local & global functions) & their type computers.
user model changes: - new compiler property is added to enable and disable parallel sort.
interface changes: - "ILogicalOperatorVisitor.java" includes Forward Operator. - "ITuplePartitionComputer.java" includes initialize() to enable partitioner to do some initialization. FieldRangePartitionComputerFactory uses it to pick a range map. - "ITuplePartitionComputerFactory.java". createPartitioner() is changed to createPartitioner(IHyracksTaskContext hyracksTaskContext). Context is needed for transferring the range map throught the context.