Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 71209 invoked from network); 20 Feb 2008 17:00:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2008 17:00:25 -0000 Received: (qmail 38912 invoked by uid 500); 20 Feb 2008 17:00:19 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 38882 invoked by uid 500); 20 Feb 2008 17:00:19 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 38873 invoked by uid 99); 20 Feb 2008 17:00:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2008 09:00:19 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2008 16:59:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C2EB0234C049 for ; Wed, 20 Feb 2008 08:59:47 -0800 (PST) Message-ID: <487169562.1203526787796.JavaMail.jira@brutus> Date: Wed, 20 Feb 2008 08:59:47 -0800 (PST) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3310) ASSERT in MergeSort.checkColumnTypes() disallow legal type conversions In-Reply-To: <4068391.1199894734052.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570748#action_12570748 ] Kathey Marsden commented on DERBY-3310: --------------------------------------- VirtualColumnNode has this comment /* A VirtualColumnNode contains a pointer to the immediate child result * that is materializing the virtual column and the ResultColumn * that represents that materialization. */ private ResultSetNode sourceResultSet; private ResultColumn sourceColumn; The DERBY-2775 change overrode the setType from ValueNode: public void setType(DataTypeDescriptor dataTypeServices) throws StandardException { this.dataTypeServices = dataTypeServices; } with public void setType(DataTypeDescriptor dtd) throws StandardException { sourceColumn.setType(dtd); } Doesn't this end up incorrectly end up affecting the child result, changing it from SQLInteger to SQLLongInt? > 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.