Обсуждение: SQL Error [0A000]: ERROR: OVER is not supported for ordered-set aggregate percentile_cont

Поиск
Список
Период
Сортировка

SQL Error [0A000]: ERROR: OVER is not supported for ordered-set aggregate percentile_cont

От
Matias Montroull
Дата:
Hi,

I have a query like this:

select date_trunc('minute',created) as created,hostname,substring(datadir,0,15) as data_partition, query,sum(size) as disk_usage
from gp_wf_per_query a
JOIN gp_segment_configuration c ON a.segid = c.content
where datadir like '%primary%'
group by query, hostname, substring(datadir,0,15),date_trunc('minute',created)
order by  date_trunc('minute',created) desc,hostname desc, substring(datadir,0,15) asc;

and I'm getting an error:
SQL Error [0A000]: ERROR: OVER is not supported for ordered-set aggregate percentile_cont

Here's a create table statement and some sample data to reproduce the error:

CREATE TABLE initial (
created timestamp without time zone ,
hostname text ,
data_partition text ,
query text ,
disk_usage numeric 
);

I attach some sample data to load the table
Вложения

Re: SQL Error [0A000]: ERROR: OVER is not supported for ordered-set aggregate percentile_cont

От
"David G. Johnston"
Дата:
On Fri, Sep 24, 2021 at 1:30 PM Matias Montroull <matimontg@gmail.com> wrote:
and I'm getting an error:
SQL Error [0A000]: ERROR: OVER is not supported for ordered-set aggregate percentile_cont

Here's a create table statement and some sample data to reproduce the error:

I attach some sample data to load the table

Well, there generally isn't much to be done about "feature not supported" other than to change how you write the query.

That said, I don't see what the create table or the attached sql file have to do with the query shown.  You may want to try again putting together a self-contained example.

David J.