db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A B (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1620) SQL CASE statement returns ERROR 42X89 when including NULL as a return value
Date Thu, 15 Mar 2007 17:07:09 GMT

    [ https://issues.apache.org/jira/browse/DERBY-1620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481228

A B commented on DERBY-1620:

Thank you for your continued work on this, John.  I'm hoping to review and commit the latest
patch sometime in the next couple of days.

One thing I did notice: We have been trying to move as many of the regression tests as possible
into JUnit :


As part of that effort the jdbcapi/resultset.java test was recently converted (just a couple
of days ago, actually), and thus that particular test file no longer exists--see DERBY-2429.
 So the test patch that you have won't actually apply to the latest codeline :(

My apologies here: I should have mentioned the preference for JUnit tests when I asked earlier,
and I didn't realize that the test you were changing was going to be converted this week.

So that said, do you have any interest in porting your new test cases to JUnit based on the
new JUnit tests added as part of DERBY-2429?  I understand if you find that to be a bit too
annoying; if so, we at least have the resultset.java changes (thank you!) so anyone else in
the community who is so inclined can make the conversion.  But I thought I'd ask just to see...

Thank you very much for your continued patience with this effort.  As I said, I'll try to
review/convert the engine changes over the next couple of days (maybe early next week if I
can't get to it before then).

> SQL CASE statement returns ERROR 42X89 when including NULL as a return value
> ----------------------------------------------------------------------------
>                 Key: DERBY-1620
>                 URL: https://issues.apache.org/jira/browse/DERBY-1620
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions:
>         Environment: Windows XP
>            Reporter: John Peterson
>         Assigned To: John Peterson
>            Priority: Minor
>         Attachments: ConditionalNode.diff, ConditionalNode.diff, ConditionalNode.diff,
Derby_Community_Discussion.doc, derbyall_report.txt, resultset.tmp, resultset.tmp, sysinfo_and_example.txt
> This bug appears to be related to the DERBY-7 bug (NULLIF() function).   When NULL is
used during a CASE statement, Derby requires the NULL to be CAST to the appropriate type.
 This does not appear to meet the SQL 2003 Standard for the Case Expression (see attached
Word document).   See the attached Word document to view the Derby Community Discussion about
this issue.  See the attached .TXT to view the SYSINFO and to see an example of the steps
to reproduce using IJ.
> Steps to Reproduce:
> ij>values case when 1=2 then 3 else NULL end;
> ERROR 42X89:  Types 'INTEGER' and 'CHAR' are not type compatible.  Neither type is assignable
to the other type.
> Current Workaround:
> ij>values case when 1=2 then 3 else cast(NULL as INT) end;

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message