* effective implementation when data are in memory
* effective implementation when data are out of memory
* effective implementation for usage as window function - running median.
Better than before, we can choose between hashing and sorting based aggregation. But tuplesort implementation is not right for using as window function. Second issue can be a not possible reusing of tuplesort for more final functions - median, percentile in one query.
Ideas how to solve this task? Can we move forward in some points?