[jira] [Commented] (CASSANDRA-14209) group by select queries query results differ when using select * vs select fields
[ https://issues.apache.org/jira/browse/CASSANDRA-14209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16363977#comment-16363977 ] Andrés de la Peña commented on CASSANDRA-14209: --- The patch with the thorough tests looks good to me, +1 > group by select queries query results differ when using select * vs select > fields > - > > Key: CASSANDRA-14209 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14209 > Project: Cassandra > Issue Type: Bug >Reporter: Digant Modha >Assignee: Benjamin Lerer >Priority: Minor > Attachments: Re group by select queries.txt > > > {{I get two different out with these 2 queries. The only difference between > the 2 queries is that one does ‘select *’ and other does ‘select specific > fields’ without any aggregate functions.}} > {{I am using Apache Cassandra 3.10.}} > {{Consistency level set to LOCAL_QUORUM.}} > {{cassandra@cqlsh> select * from wp.position where account_id = 'user_1';}} > {{ account_id | security_id | counter | avg_exec_price | pending_quantity | > quantity | transaction_id | update_time}} > {{+-+-++--+--++-}} > {{ user_1 | AMZN | 2 | 1239.2 | 0 | 1011 | null | 2018-01-25 > 17:18:07.158000+}} > {{ user_1 | AMZN | 1 | 1239.2 | 0 | 1010 | null | 2018-01-25 > 17:18:07.158000+}} > {{(2 rows)}} > {{cassandra@cqlsh> select * from wp.position where account_id = 'user_1' > group by security_id;}} > {{ account_id | security_id | counter | avg_exec_price | pending_quantity | > quantity | transaction_id | update_time}} > {{+-+-++--+--++-}} > {{ user_1 | AMZN | 1 | 1239.2 | 0 | 1010 | null | 2018-01-25 > 17:18:07.158000+}} > {{(1 rows)}} > {{cassandra@cqlsh> select account_id,security_id, counter, > avg_exec_price,quantity, update_time from wp.position where account_id = > 'user_1' group by security_id ;}} > {{ account_id | security_id | counter | avg_exec_price | quantity | > update_time}} > {{+-+-++--+-}} > {{ user_1 | AMZN | 2 | 1239.2 | 1011 | 2018-01-25 17:18:07.158000+}} > {{(1 rows)}} > {{Table Description:}} > {{CREATE TABLE wp.position (}} > {{ account_id text,}} > {{ security_id text,}} > {{ counter bigint,}} > {{ avg_exec_price double,}} > {{ pending_quantity double,}} > {{ quantity double,}} > {{ transaction_id uuid,}} > {{ update_time timestamp,}} > {{ PRIMARY KEY (account_id, security_id, counter)}} > {{) WITH CLUSTERING ORDER BY (security_id ASC, counter DESC)}}{{ }} -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14209) group by select queries query results differ when using select * vs select fields
[ https://issues.apache.org/jira/browse/CASSANDRA-14209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16363717#comment-16363717 ] Benjamin Lerer commented on CASSANDRA-14209: The problem is that the {{Selection}} used for building the result set is not the good one for wildcard queries with {{GROUP BY}}. I pushed some patches for [3.11|https://github.com/apache/cassandra/compare/cassandra-3.11...blerer:14209-3.11] and [trunk|https://github.com/apache/cassandra/compare/trunk...blerer:14209-trunk] to fix that problem and add some testing for it. [~adelapena] Could you review? > group by select queries query results differ when using select * vs select > fields > - > > Key: CASSANDRA-14209 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14209 > Project: Cassandra > Issue Type: Bug >Reporter: Digant Modha >Assignee: Benjamin Lerer >Priority: Minor > Attachments: Re group by select queries.txt > > > {{I get two different out with these 2 queries. The only difference between > the 2 queries is that one does ‘select *’ and other does ‘select specific > fields’ without any aggregate functions.}} > {{I am using Apache Cassandra 3.10.}} > {{Consistency level set to LOCAL_QUORUM.}} > {{cassandra@cqlsh> select * from wp.position where account_id = 'user_1';}} > {{ account_id | security_id | counter | avg_exec_price | pending_quantity | > quantity | transaction_id | update_time}} > {{+-+-++--+--++-}} > {{ user_1 | AMZN | 2 | 1239.2 | 0 | 1011 | null | 2018-01-25 > 17:18:07.158000+}} > {{ user_1 | AMZN | 1 | 1239.2 | 0 | 1010 | null | 2018-01-25 > 17:18:07.158000+}} > {{(2 rows)}} > {{cassandra@cqlsh> select * from wp.position where account_id = 'user_1' > group by security_id;}} > {{ account_id | security_id | counter | avg_exec_price | pending_quantity | > quantity | transaction_id | update_time}} > {{+-+-++--+--++-}} > {{ user_1 | AMZN | 1 | 1239.2 | 0 | 1010 | null | 2018-01-25 > 17:18:07.158000+}} > {{(1 rows)}} > {{cassandra@cqlsh> select account_id,security_id, counter, > avg_exec_price,quantity, update_time from wp.position where account_id = > 'user_1' group by security_id ;}} > {{ account_id | security_id | counter | avg_exec_price | quantity | > update_time}} > {{+-+-++--+-}} > {{ user_1 | AMZN | 2 | 1239.2 | 1011 | 2018-01-25 17:18:07.158000+}} > {{(1 rows)}} > {{Table Description:}} > {{CREATE TABLE wp.position (}} > {{ account_id text,}} > {{ security_id text,}} > {{ counter bigint,}} > {{ avg_exec_price double,}} > {{ pending_quantity double,}} > {{ quantity double,}} > {{ transaction_id uuid,}} > {{ update_time timestamp,}} > {{ PRIMARY KEY (account_id, security_id, counter)}} > {{) WITH CLUSTERING ORDER BY (security_id ASC, counter DESC)}}{{ }} -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org