Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 66693 invoked from network); 9 Jan 2011 17:11:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Jan 2011 17:11:05 -0000 Received: (qmail 23920 invoked by uid 500); 9 Jan 2011 17:11:05 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 23912 invoked by uid 99); 9 Jan 2011 17:11:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Jan 2011 17:11:05 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [212.224.30.66] (HELO webservices.spree.de) (212.224.30.66) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Jan 2011 17:10:58 +0000 Received: from [172.20.204.78] (helo=styx.spree.de) by webservices.spree.de with esmtp (Exim 4.69) (envelope-from ) id 1Pbymq-0000rf-LE for jdo-dev@db.apache.org; Sun, 09 Jan 2011 18:10:37 +0100 Message-ID: <4D29EC01.7070305@spree.de> Date: Sun, 09 Jan 2011 18:10:25 +0100 From: Michael Bouschen Organization: akquinet tech@spree GmbH User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: jdo-dev@db.apache.org Subject: Re: Query test failure with newer derby version (was Re: Minutes: JDO TCK Conference Call Friday, Jan 7, 9 am Pacific Time) References: <4966C3D9.9050408@sun.com> <4BDA63FA.2030902@sonic.net> <4BE38D45.5010308@sonic.net> <4BECD0DB.3080709@sonic.net> <4C11B5A3.40203@sonic!.net> <79f3420acc7d5b2c4cb90280a4ee555d.squirrel@webmail.sonic.net> <4CB7CAF0.2020904@sonic.net> <4CCA3F7F.9080501@sonic.net> <4CDCA65B.7040303@sonic!.net> <4CF86D72.1010509@sonic!.net> <4D26919C.7060100@sonic.net> <4D283D7F.8020000@spree.de> <4D28ADDB.4040204@spree.de> In-Reply-To: <4D28ADDB.4040204@spree.de> Content-Type: multipart/alternative; boundary="------------060805060207080007060900" X-Virus-Checked: Checked by ClamAV on apache.org --------------060805060207080007060900 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hi, this is the JDOQL query: SELECT FROM org.apache.jdo.tck.pc.mylib.PCPoint EXCLUDE SUBCLASSES WHERE (x == 2) == true and here is the generated SQL: SELECT 'org.apache.jdo.tck.pc.mylib.PCPoint' AS NUCLEUS_TYPE,A0.ID,A0.X,A0.Y FROM APPLICATIONIDENTITY0.PCPOINT A0 WHERE A0.X = 2 = 1 So the question is: what does SQL define when comparing an integer and a boolean? The expression "A0.X = 2" evaluates to a boolean which is then compared to the integer 1. Regards Michael > Hi Craig, > > [...] >>> >>> (2) query test: >>> >>> The failing test is in jdoql.conf: class >>> org.apache.jdo.tck.query.jdoql.ParenthesesMarkOperatorPrecedence >>> method runTestParenthesesMarkOperatorPrecedence08. >>> The test runs a JDOQL query with PCPoint as candidate class and "(x >>> == 2) == true" as filter. It results in an exception thrown by the >>> derby SQL compiler: >>> >>> java.sql.SQLException: Comparisons between 'BOOLEAN' and 'INTEGER' >>> are not supported. Types must be comparable. String types must also >>> have matching collation. If collation does not match, a possible >>> solution is to cast operands to force them to the default collation >>> (e.g. SELECT tablename FROM sys.systables WHERE CAST(tablename AS >>> VARCHAR(128)) = 'T1') >>> >>> The derby versions 10.6.1.0 and 10.7.1.1 run into this exception. >>> But it does NOT happen with derby version 10.4.2.0, which we are >>> using in the maven1 environment. >> >> Good catch. Would you have time to file a JIRA with Derby? > > First I want to take a look at the generated SQL before filing a JIRA. > I'll keep you posted. > > Regards Michael > > [...] > -- *Michael Bouschen* *Prokurist* akquinet tech@spree GmbH B�lowstr. 66, D-10783 Berlin Fon: +49 30 235 520-33 Fax: +49 30 217 520-12 Email: michael.bouschen@akquinet.de Url: www.akquinet.de akquinet tech@spree GmbH, Berlin Gesch�ftsf�hrung: Martin Weber, Prof. Dr. Christian Roth Amtsgericht Berlin-Charlottenburg HRB 86780 B USt.-Id. Nr.: DE 225 964 680 --------------060805060207080007060900--