cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "PAF (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-13399) java.lang.AssertionError: null
Date Mon, 03 Apr 2017 07:36:41 GMT

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

PAF updated CASSANDRA-13399:
----------------------------
    Description: 
When creating the following user defined AGGREGATION and FUNCTION:

{code:title=init.cql|borderStyle=solid}
CREATE FUNCTION state_group_and_total(state map<uuid, int>, type uuid)
    RETURNS NULL ON NULL INPUT
    RETURNS map<uuid, int>
    LANGUAGE java AS '
        Integer count = (Integer) state.get(type);

        count = (count == null ? 1 : count + 1);
        state.put(type, count);

        return state;
    ';

CREATE OR REPLACE AGGREGATE group_and_total(uuid)
    SFUNC state_group_and_total
    STYPE map<uuid, int>
    INITCOND {};
{code}

And creating a statement like:

{code}
SELECT group_and_total("id") FROM mytable;
{code}

When mytable is empty creates the following assertion

{code}
ERROR [Native-Transport-Requests-1] 2017-04-03 07:25:09,787 Message.java:623 - Unexpected
exception during request; channel = [id: 0xd7d9159b, L:/172.19.0.2:9042 - R:/172.19.0.3:43444]
java.lang.AssertionError: null
        at org.apache.cassandra.cql3.functions.UDAggregate$2.compute(UDAggregate.java:189)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.selection.AggregateFunctionSelector.getOutput(AggregateFunctionSelector.java:53)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.selection.Selection$SelectionWithProcessing$1.getOutputRow(Selection.java:592)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.getOutputRow(Selection.java:430)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.build(Selection.java:424)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:763)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:400)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:378)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:251)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:79)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:217)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:248) ~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:233) ~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517)
[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410)
[apache-cassandra-3.10.jar:3.10]
        at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
        at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
        at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:357)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]
        at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162)
[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [apache-cassandra-3.10.jar:3.10]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]

{code}

Even if my FUNCTION only returns state, it creates that assertion null.

Thank you in advance.

  was:
When creating the following user defined AGGREGATION and FUNCTION:

{code:title=init.cql|borderStyle=solid}
CREATE FUNCTION state_group_and_total(state map<uuid, int>, type uuid)
    RETURNS NULL ON NULL INPUT
    RETURNS map<uuid, int>
    LANGUAGE java AS '
        Integer count = (Integer) state.get(type);

        count = (count == null ? 1 : count + 1);
        state.put(type, count);

        return state;
    ';

CREATE OR REPLACE AGGREGATE group_and_total(uuid)
    SFUNC state_group_and_total
    STYPE map<uuid, int>
    INITCOND {};
{code}

And creating a statement like:

{code}
SELECT group_and_total("id") FROM mytable;
{code}

When mytable is empty creates the following assertion

{code}
ERROR [Native-Transport-Requests-1] 2017-04-03 07:25:09,787 Message.java:623 - Unexpected
exception during request; channel = [id: 0xd7d9159b, L:/172.19.0.2:9042 - R:/172.19.0.3:43444]
java.lang.AssertionError: null
        at org.apache.cassandra.cql3.functions.UDAggregate$2.compute(UDAggregate.java:189)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.selection.AggregateFunctionSelector.getOutput(AggregateFunctionSelector.java:53)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.selection.Selection$SelectionWithProcessing$1.getOutputRow(Selection.java:592)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.getOutputRow(Selection.java:430)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.build(Selection.java:424)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:763)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:400)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:378)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:251)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:79)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:217)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:248) ~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:233) ~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116)
~[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517)
[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410)
[apache-cassandra-3.10.jar:3.10]
        at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
        at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
        at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:357)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]
        at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162)
[apache-cassandra-3.10.jar:3.10]
        at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [apache-cassandra-3.10.jar:3.10]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]

{code}



> java.lang.AssertionError: null
> ------------------------------
>
>                 Key: CASSANDRA-13399
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13399
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>            Reporter: PAF
>
> When creating the following user defined AGGREGATION and FUNCTION:
> {code:title=init.cql|borderStyle=solid}
> CREATE FUNCTION state_group_and_total(state map<uuid, int>, type uuid)
>     RETURNS NULL ON NULL INPUT
>     RETURNS map<uuid, int>
>     LANGUAGE java AS '
>         Integer count = (Integer) state.get(type);
>         count = (count == null ? 1 : count + 1);
>         state.put(type, count);
>         return state;
>     ';
> CREATE OR REPLACE AGGREGATE group_and_total(uuid)
>     SFUNC state_group_and_total
>     STYPE map<uuid, int>
>     INITCOND {};
> {code}
> And creating a statement like:
> {code}
> SELECT group_and_total("id") FROM mytable;
> {code}
> When mytable is empty creates the following assertion
> {code}
> ERROR [Native-Transport-Requests-1] 2017-04-03 07:25:09,787 Message.java:623 - Unexpected
exception during request; channel = [id: 0xd7d9159b, L:/172.19.0.2:9042 - R:/172.19.0.3:43444]
> java.lang.AssertionError: null
>         at org.apache.cassandra.cql3.functions.UDAggregate$2.compute(UDAggregate.java:189)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.selection.AggregateFunctionSelector.getOutput(AggregateFunctionSelector.java:53)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.selection.Selection$SelectionWithProcessing$1.getOutputRow(Selection.java:592)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.getOutputRow(Selection.java:430)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.build(Selection.java:424)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:763)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:400)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:378)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:251)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:79)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:217)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:248)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:233)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116)
~[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517)
[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410)
[apache-cassandra-3.10.jar:3.10]
>         at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:357)
[netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]
>         at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162)
[apache-cassandra-3.10.jar:3.10]
>         at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [apache-cassandra-3.10.jar:3.10]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
> {code}
> Even if my FUNCTION only returns state, it creates that assertion null.
> Thank you in advance.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message