db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3310) ASSERT in MergeSort.checkColumnTypes() disallow legal type conversions
Date Tue, 04 Mar 2008 17:47:42 GMT

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

Kathey Marsden commented on DERBY-3310:
---------------------------------------

genNormalizeResultSetNode() has this code:
		/* We get a shallow copy of the ResultColumnList and its 
		 * ResultColumns.  (Copy maintains ResultColumn.expression for now.)
		 */
                ResultColumnList prRCList = resultColumns;
		resultColumns = resultColumns.copyListAndObjects();

               ... 
	      Change prRCList to remove generatedGroupingColumns and add 
	      VirtualColumnNodes, get NormalizeResultSetNode 


I wanted to understand the difference between doing this and just leaving 
resultColumns alone and working on the copy for prRCList  so I changed it to just
                ResultColumnList prRCList = resultColumns.copyListAndObjects();
       ... 
	      Change prRCList to remove generatedGroupingColumns and add 
	      VirtualColumnNodes, get NormalizeResultSetNode 

This led to a NullPointerException in the generated code for views.sql doing a select 
from a view.
Caused by: java.lang.NullPointerException
        at org.apache.derby.exe.acaa7ac093x0118x781cx2bb1xffffc28339b210.e3(Unkn
own Source)
        at org.apache.derby.impl.services.reflect.DirectCall.invoke(ReflectGener
atedClass.java:145)
        ... 17 more

I am not sure I understand the difference in my new code and the old and why the 
new doesn't work.  If anyone has an immediate ideas that would be most helpful. 
 I'll try to debug the NPE to see if that sheds any light.  





> 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
>            Assignee: Kathey Marsden
>            Priority: Minor
>         Attachments: cast-repro.sql, derby-3310_remove_genNormalizeResultSetNode_diff.txt,
derby-3310_try1_diff.txt, derby3310_rsn_cleanup_1.txt
>
>
> 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