Open trel opened 6 years ago
I ran into this today, so a +1 from me;). It also is a bit confusing because the distinct is included implicitly in the query(I found out because there was a no-distinct option), so at first you don't know why you get a different count then the number of outputs without doing a count, so it might be good to make it explicit instead.
We will address this issue in the new GenQuery2 parser.
The current genQuery logic (4.2.1) does not support the distinct keyword within the
count()
construct. This prevents our ability to get a total of the number of data_objects under management without counting all the replicas or specifying resource hierarchy information.The 'distinct' keyword is automatically added to the first genQuery above, and the result is the three
DATA_NAME
s returned.Once the
count()
is added to the genQuery, the distinct is still applied, but outside thecount()
. I am interested in the result from this query (where distinct is within thecount()
), but it cannot currently be constructed via GenQuery:Suggested enhancement:
Create
count-distinct
keyword within genQuery to handle this type of request.This may also mean that it makes sense to add
-distinct
versions for some other aggregate keywords within genQuery:sum-distinct
avg-distinct
It does not make any sense to add:
min-distinct
max-distinct