No, I didn't test, I was just reading the code, but I hadn't checked for
all occurrences of K_COUNT, so I hadn't noticed that it also occurs in the
allowedFunctionName grammar production rule. And I found the code that
dynamically creates a count function for each type here:
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/functions/AggregateFcts.java#L885

So, sorry for the confusion. Some comments in the grammar would have helped.

And it's not in the DataStax doc, but that's another issue I can follow up
on.

-- Jack Krupansky

On Mon, Apr 18, 2016 at 10:12 AM, Benjamin Lerer <
benjamin.le...@datastax.com> wrote:

> May be I misunderstood you.
> Do you mean that you tested it and that it is not working on the version
> you used?
>
> On Mon, Apr 18, 2016 at 3:50 PM, Jack Krupansky <jack.krupan...@gmail.com>
> wrote:
>
> > The CQL spec for COUNT says:
> >
> > "It also can be used to count the non null value of a given column.
> > Example:
> >
> > SELECT COUNT(scores) FROM plays;"
> >
> > But, the parser only recognizes COUNT(*) and COUNT(1).
> >
> > See:
> > https://cassandra.apache.org/doc/cql3/CQL-3.0.html
> > https://github.com/apache/cassandra/blob/trunk/src/antlr/Parser.g#L276
> >
> > Does this need a Jira, or can somebody just fix it to avoid the
> paperwork?
> >
> > Or, was this actually supposed to  work and the bug is some missing
> > implementation?
> >
> > Thanks.
> >
> > -- Jack Krupansky
> >
>

Reply via email to