cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Thompson (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-9636) Duplicate columns in selection causes AssertionError
Date Tue, 23 Jun 2015 15:16:13 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-9636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Philip Thompson updated CASSANDRA-9636:
---------------------------------------
    Assignee: Sam Tunnicliffe

> Duplicate columns in selection causes AssertionError
> ----------------------------------------------------
>
>                 Key: CASSANDRA-9636
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9636
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sam Tunnicliffe
>            Assignee: Sam Tunnicliffe
>             Fix For: 2.1.x, 2.0.x, 2.2.0 rc2
>
>
> Prior to CASSANDRA-9532, unaliased duplicate fields in a selection would be silently
ignored. Now, they trigger a server side exception and an unfriendly error response, which
we should clean up. Duplicate columns *with* aliases are not affected.
> {code}
> CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
1};
> CREATE TABLE ks.t1 (k int PRIMARY KEY, v int);
> INSERT INTO ks.t2 (k, v) VALUES (0, 0);
> SELECT k, v FROM ks.t2;
> SELECT k, v, v AS other_v FROM ks.t2;
> SELECT k, v, v FROM ks.t2;
> {code}
> The final statement results in this error response & server side stacktrace:
> {code}
> ServerError: <ErrorMessage code=0000 [Server error] message="java.lang.AssertionError">
> ERROR 13:01:30 Unexpected exception during request; channel = [id: 0x44d22e61, /127.0.0.1:39463
=> /127.0.0.1:9042]
> java.lang.AssertionError: null
>         at org.apache.cassandra.cql3.ResultSet.addRow(ResultSet.java:63) ~[main/:na]
>         at org.apache.cassandra.cql3.statements.Selection$ResultSetBuilder.build(Selection.java:355)
~[main/:na]
>         at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:1226)
~[main/:na]
>         at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:299)
~[main/:na]
>         at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:238)
~[main/:na]
>         at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:67)
~[main/:na]
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:238)
~[main/:na]
>         at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:260)
~[main/:na]
>         at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:119)
~[main/:na]
>         at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:439)
[main/:na]
>         at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:335)
[main/:na]
>         at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
[netty-all-4.0.23.Final.jar:4.0.23.Final]
>         at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
[netty-all-4.0.23.Final.jar:4.0.23.Final]
>         at io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)
[netty-all-4.0.23.Final.jar:4.0.23.Final]
>         at io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324)
[netty-all-4.0.23.Final.jar:4.0.23.Final]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_45]
>         at org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164)
[main/:na]
>         at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [main/:na]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> {code}
> This issue also presents on the head of the 2.2 branch and on 2.0.16. However, the prior
behaviour is different on both of those branches.
> In the 2.0 line prior to CASSANDRA-9532, duplicate columns would actually be included
in the results, as opposed to being silently dropped as per 2.1.x
> In 2.2, the assertion error seen above precedes CASSANDRA-9532 and is also triggered
for both aliased and unaliased duplicate columns.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message