Add support for SELECT DISTINCT ...

Description

Need to support returning distinct results.

  • is supported already by few vendors

  • is related and required by aggregate functions

Activity

Show:

Thomas Beale January 25, 2021 at 3:53 PM

Ah yes, I see what you mean. I agree - remove the parenthesis bit - the text is better without it.

Matija Polajnar January 25, 2021 at 1:09 PM

That’s a procedural statement that I see as an implementation detail. What if we gather all the data in parallel with a proprietary quantum computer (which we might or might not; I am not allowed to publicly state)? I see no additional value in this parenthesized sentence is what I’m trying to say.

Thomas Beale January 25, 2021 at 12:44 PM

Well, you can read it the other way as well: since ordering is not defined, whatever the first instance encountered is by definition just as good as any other. So ‘first’ here just means ‘first encountered’, not ‘first in an ordered list’. That’s the way I would interpret it at least. The text could be modfied to ‘keeps only the first encountered of any set of duplicates' or similar.

Matija Polajnar January 25, 2021 at 12:12 PM

I wonder whether “(keeps only the first row of each set of duplicates)” makes sense. The order of results in the result set is not defined AFAIK, unless ordering is used, in which case all identical rows wil end up being consecutive and then it makes no difference whether the first, last or any other row is retained.

Done

Details

Reporter

Components

Affects versions

Created October 26, 2020 at 9:56 PM
Updated March 5, 2021 at 8:33 AM
Resolved March 5, 2021 at 8:33 AM