db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DERBY-4692) Unions between BOOLEAN and non-BOOLEAN datatypes should be rejected
Date Tue, 13 Jul 2010 19:03:54 GMT

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

Rick Hillegas closed DERBY-4692.

> Unions between BOOLEAN and non-BOOLEAN datatypes should be rejected
> -------------------------------------------------------------------
>                 Key: DERBY-4692
>                 URL: https://issues.apache.org/jira/browse/DERBY-4692
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions:,,,,,,,,,,,,,,,
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>             Fix For:
>         Attachments: derby-4692-01-aa-badUnions.diff
> DERBY-4684 fixed problems in implicit casts to BOOLEAN. However, the query which created
the implicit casts should raise an error for other reasons:
> select isindex from sys.sysconglomerates where conglomeratename = 'foo'
> union
> values ( 'true' )
> This should fail because if either of the datatypes being UNIONed is BOOLEAN, then both
should be BOOLEAN. Here is my reasoning, copied from the related discussion on DERBY:
> 1) The rules for determining whether two datatypes are union compatible are stated in
the SQL Standard in part 2, section 7.3 (<query expression>), syntax rule 20.b.ii.
> 2) That, in turn, refers the reader to section 9.3 (Result of data type combinations).
> 3) Section 9.3, syntax rule 3.g says that if either of two values to be merged is BOOLEAN,
then both must be BOOLEAN.

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

View raw message