[ 
https://issues.apache.org/jira/browse/DERBY-4071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678005#action_12678005
 ] 

Aaron Digulla commented on DERBY-4071:
--------------------------------------

In this case, I think it's unearthing something. If you look at my example, 
then I'm only comparing columns of the same type, so why is Derby comparing 
CHAR and VARCHAR internally? This looks like a column mixup.

Or maybe the MAX() casts CHAR to VARCHAR? But why would it do that? Does it 
also cast INT to LONG? etc.



> AssertFailure when selecting rows from a table with CHARACTER and VARCHAR 
> columns
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-4071
>                 URL: https://issues.apache.org/jira/browse/DERBY-4071
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.2.0
>            Reporter: Aaron Digulla
>         Attachments: DerbyTest.java
>
>
> When running a complex query on this table:
> [code]
> Create table DEMO.TEST (
>     CHR                            CHARACTER(26)                   ,
>     VCHR                           VARCHAR(25)                     )
> [code]
> then I get this exception:
> AssertFailure: ASSERT FAILED col1.getClass() (class ...SQLChar) expected to 
> be the same as col2.getClass() (class ....SQLVarchar)' was thrown while 
> evaluating an expression.

-- 
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