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-3310) ASSERT in MergeSort.checkColumnTypes() disallow legal type conversions
Date Wed, 13 Feb 2008 18:37:08 GMT

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

Mike Matrigali updated DERBY-3310:
----------------------------------


I think the assert code is correctly testing for what it assumes to be true - ie. that class
types of the sort template will exactly match subsequent rows fed to the sort.  It may work
without the assert in this case but I am not sure that will always be true.
Basically the sort interface requires a "template" of what rows will look like when fed into
the sort.  So column[N] of each row fed into the sort should be the exact same type as template[N].
 

One could build a sorter that compared different types in the same column but I didn't think
Derby currently required that.

> ASSERT in MergeSort.checkColumnTypes() disallow legal type conversions
> ----------------------------------------------------------------------
>
>                 Key: DERBY-3310
>                 URL: https://issues.apache.org/jira/browse/DERBY-3310
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.0.0
>            Reporter: Dyre Tjeldvoll
>            Priority: Minor
>         Attachments: cast-repro.sql
>
>
> The following code 
> CREATE TABLE U (SNAME VARCHAR(32000), TNAME VARCHAR(32000), C1 BIGINT);
> -- This triggers an ASSERT (because 2 is INTEGER and not BIGINT)
> INSERT INTO U(SNAME, TNAME, C1) SELECT DISTINCT SCHEMANAME, TABLENAME, 2
>  FROM SYS.SYSTABLES T JOIN SYS.SYSSCHEMAS S ON T.SCHEMAID = S.SCHEMAID;
> gives
> ERROR XJ001: Java exception: 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLInteger)
expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.SQLLongint):
org.apache.derby.shared.common.sanity.AssertFailure'.

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


Mime
View raw message