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

Rick Hillegas updated DERBY-4716:
---------------------------------

    Attachment: derby-4716-01-ab-enableBooleanColumns.diff

Attaching derby-4716-01-ab-enableBooleanColumns.diff. This is the first 
increment of enabling BOOLEAN-typed columns in tables. This patch supports the 
ability to declare BOOLEAN columns in CREATE TABLE statements and verifies that 
casting semantics are correct for INSERTs. Follow-on patches should address 
ALTER TABLE and index creation. Regression tests passed cleanly for me.

One oddity which will have to be addressed in a follow-on patch is this:

1) If you select from an unindexed BOOLEAN column, NULLs sort at the end, as 
they do for other Derby datatypes.

2) But if you put an index on the BOOLEAN column, this causes NULLs to sort 
before other values.

BOOLEAN-valued indexes should follow the sorting conventions of other 
datatypes. There should be no backward compatibility issues here because none 
of the system indexes carry BOOLEAN columns today.

Touches the following files:

-----------

M      java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj

Allows BOOLEAN as a column data type. Removes scaffolding put in at the 
beginning of 10.7 development. That scaffolding added a parameter to the 
dataTypeDDL() production so that we could incrementally enable BOOLEAN in 
different parts of the syntax without enabling BOOLEAN wholesale everywhere. 
That parameter is now removed. As of this patch, BOOLEAN is allowed everywhere 
that the other system datatypes are allowed--provided that the database level 
is 10.7 or higher.

-----------

M      
java/testing/org/apache/derbyTesting/functionTests/tests/lang/BooleanValuesTest.java

Tests for INSERTing various datatypes into BOOLEAN columns.

-----------

M      
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java

ParameterMetaData test for INSERTs into BOOLEAN-valued columns.

-----------

M      
java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out

Canon change because BOOLEAN columns are supported now.


> Enable BOOLEAN typed columns
> ----------------------------
>
>                 Key: DERBY-4716
>                 URL: https://issues.apache.org/jira/browse/DERBY-4716
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.6.1.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-4716-01-ab-enableBooleanColumns.diff
>
>
> Allow tables to have boolean columns.

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

Reply via email to