db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6131) select from view with "upper" and "in" does not work
Date Mon, 01 Apr 2013 16:33:16 GMT

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

Mike Matrigali updated DERBY-6131:

    Attachment: derby-6131-patch.txt

I still need to write some tests for this issue.  I think the attached patch just avoids pushing
the upper predicate in this case.  It just checks if the operand is a column reference and
if not skips the pushdown like other tests in surrounding code.  The comments in the routine
seem to indicate that is the intent of the routine, ie. only push consants and thinks that
are direct column references.  

With the change the user example does not throw an exception and a nightly run passed.  

I want to write a few tests to also make sure the results are as expected.  

A review from soneone who knows this area would be appreciated.
> select from view with "upper" and "in" does not work
> ----------------------------------------------------
>                 Key: DERBY-6131
>                 URL: https://issues.apache.org/jira/browse/DERBY-6131
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions:,,,,,,,,
>         Environment: windows
>            Reporter: Rong Qu
>            Assignee: Mike Matrigali
>         Attachments: derby-6131-patch.txt
> the issue can be reproduced
> 1. create table myTbl1 (name varchar(1000));
> 2. create table myTbl2 (name varchar(1000));
> 3. create view myView (name) as select t1.name from myTbl1 t1 union all select t2.name
from myTbl2 t2;
> 4. select name from myView where upper(name) in ('AA', 'BB');
> #4 failed with "org.apache.derby.impl.sql.compile.SimpleStringOperatorNode incompatible
with org.apache.derby.impl.sql.compile.ColumnReference: java.lang.ClassCastException"
> If the view is created as "create myView (name) as select t1.name from myTbl1 t1", the
query worked fine.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message