cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-8229) Aggregate functions do not return expected values or metadata
Date Fri, 31 Oct 2014 14:19:34 GMT


Benjamin Lerer updated CASSANDRA-8229:
    Attachment: CASSANDRA-8229.txt

This patch fix:
* the problem that the column names returned for functions was wrong: {{max(int -> int)}}
instead of {{max(a)}}
* the problem that one row should be returned when aggregate functions are used even if the
query was not returning any results. In which case the returned values are the initialization
aggregate values (e.g. 0 for sum, null for max, null for avg, 0 for count)
* the  problem that cqlsh was unable to handle count(a).

The patch add also some unit test to check the proper handling of exclusive slice with compact

> Aggregate functions do not return expected values or metadata
> -------------------------------------------------------------
>                 Key: CASSANDRA-8229
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>             Fix For: 3.0
>         Attachments: CASSANDRA-8229.txt
> Aggregrate functions do not behave as expected on the following points:
> * If no row is selected the resultset returned is empty whereas in the case of aggregates
it should returns some default values (e.g. {{SELECT count(*) ...}} should return 0 if no
row is returned).
> * The column name returned for {{max(a)}} when a is an int is {{max(int -> int)}}
and should be {{max(a)}} if no alias is used.
> * When used with limit the value returned is not always the expected one. It sometimes
include an extra row.

This message was sent by Atlassian JIRA

View raw message