db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (DERBY-5313) Assert failure with CASE expression in GROUP BY clause
Date Thu, 06 Mar 2014 12:32:49 GMT

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

Knut Anders Hatlen reassigned DERBY-5313:

    Assignee: Knut Anders Hatlen

I missed that Mamta had already commented that it also failed without CASE. I agree with the
analysis in the 03/Oct/12 comment.

The failing assert predates DERBY-883. When it was added, it was perfectly reasonable to assume
that the GROUP BY list contained only simple column references and no expressions. This changed
with DERBY-883. I don't see anything relying on its being a column reference, except the assertion.
It looks like the code would work with expressions too. I'll try to remove the assert and
write some tests to verify that it works.

> Assert failure with CASE expression in GROUP BY clause
> ------------------------------------------------------
>                 Key: DERBY-5313
>                 URL: https://issues.apache.org/jira/browse/DERBY-5313
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions:,,,,,
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>              Labels: derby_triage10_11, derby_triage10_9
> I see the following assert failure with debug jars on and later (doesn't fail
on and earlier):
> ij> create table t(x int);
> 0 rows inserted/updated/deleted
> ij> insert into t values 1;
> 1 row inserted/updated/deleted
> ij> select case when a=1 then 1 else 2 end
>   from t t1(a) join t t2(b) on a=b
>   group by case when a=1 then 1 else 2 end;
> ERROR XJ001: Java exception: 'ASSERT FAILED retVN expected to be instanceof ColumnReference,
not org.apache.derby.impl.sql.compile.ConditionalNode: org.apache.derby.shared.common.sanity.AssertFailure'.

This message was sent by Atlassian JIRA

View raw message