On 12/4/22 14:34, Ankit Kumar Pandey wrote:

On 04/12/22 02:27, David Rowley wrote:


If you were to limit this to only working with the query you mentioned
in [1], i.e PARTITION BY without an ORDER BY, then you only need to
aggregate once per partition per aggregate and you only need to do
that once all of the tuples for the partition are in the tuplestore.
It seems to me like you could add all the records to a tuplesort and
then sort by the DISTINCT column then aggregate everything except for
consecutive duplicates. You can then aggregate any other aggregates
which share the same DISTINCT column, otherwise, you just destroy the
tuplesort and rinse and repeat for the next aggregate.
>
This looks like way to go that would ensure main use case of portability from Oracle.

The goal should not be portability from Oracle, but adherence to the standard.
--
Vik Fearing



Reply via email to