Bug 3875 - Adding support for DISTINCT in custom single-argument aggregates
Summary: Adding support for DISTINCT in custom single-argument aggregates
Status: NEW
Alias: None
Product: SQL
Classification: Unclassified
Component: all (show other bugs)
Version: -- development
Hardware: x86_64 (amd64/em64t) Linux
: Normal enhancement
Assignee: SQL devs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-23 18:24 CET by Frédéric Jolliton
Modified: 2016-04-11 11:45 CEST (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Jolliton 2015-11-23 18:24:48 CET
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Build Identifier: 

That's probably more a feature request that a bug per se.

We have implemented various aggregates functions in C for MonetDB, such as "concat" to concatenate all the strings of a column, separated by comma. (These aggregates works fine and are pretty generics, and we plan to release the code for them if there are any interest.)

With PostgreSQL it is possible to use the DISTINCT keyword within a single argument aggregate function, such that "concat(DISTINCT name)" behave by concatenating only distinct names, which is very convenient (like SUM(DISTINCT value) that sums only distinct values for instance.)

But it seems that MonetDB can't even parse it. This is rejected right when reading the SQL query:

    syntax error, unexpected IDENT, expecting ')' or ',' in: "select concat(distinct name"

Is this feature planned to be supported at some point?

Reproducible: Always