You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Michael Bouschen (JIRA)" <ji...@apache.org> on 2011/01/19 20:32:44 UTC
[jira] Created: (JDO-672) Test case failure: SQLException in
ParenthesesMarkOperatorPrecedence
Test case failure: SQLException in ParenthesesMarkOperatorPrecedence
---------------------------------------------------------------------
Key: JDO-672
URL: https://issues.apache.org/jira/browse/JDO-672
Project: JDO
Issue Type: Bug
Components: tck
Affects Versions: JDO 3
Reporter: Michael Bouschen
Assignee: Andy Jefferson
Fix For: JDO 3 maintenance release 1
The failing test is in jdoql.conf: class org.apache.jdo.tck.query.jdoql.ParenthesesMarkOperatorPrecedence method runTestParenthesesMarkOperatorPrecedence08.
The test 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.
Here is the 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JDO-672) Test case failure: SQLException in
ParenthesesMarkOperatorPrecedence
Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Jefferson resolved JDO-672.
--------------------------------
Resolution: Fixed
DN 2.2 and 3.x work on this.
But then SVN trunk of the TCK use Derby 10.4.2.0 so not a real issue yet either
> Test case failure: SQLException in ParenthesesMarkOperatorPrecedence
> ---------------------------------------------------------------------
>
> Key: JDO-672
> URL: https://issues.apache.org/jira/browse/JDO-672
> Project: JDO
> Issue Type: Bug
> Components: tck
> Affects Versions: JDO 3
> Reporter: Michael Bouschen
> Assignee: Andy Jefferson
> Priority: Minor
> Fix For: JDO 3 maintenance release 1
>
>
> The failing test is in jdoql.conf: class org.apache.jdo.tck.query.jdoql.ParenthesesMarkOperatorPrecedence method runTestParenthesesMarkOperatorPrecedence08.
> The test 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.
> Here is the 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JDO-672) Test case failure: SQLException in
ParenthesesMarkOperatorPrecedence
Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Jefferson updated JDO-672:
-------------------------------
Priority: Minor (was: Major)
> Test case failure: SQLException in ParenthesesMarkOperatorPrecedence
> ---------------------------------------------------------------------
>
> Key: JDO-672
> URL: https://issues.apache.org/jira/browse/JDO-672
> Project: JDO
> Issue Type: Bug
> Components: tck
> Affects Versions: JDO 3
> Reporter: Michael Bouschen
> Assignee: Andy Jefferson
> Priority: Minor
> Fix For: JDO 3 maintenance release 1
>
>
> The failing test is in jdoql.conf: class org.apache.jdo.tck.query.jdoql.ParenthesesMarkOperatorPrecedence method runTestParenthesesMarkOperatorPrecedence08.
> The test 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.
> Here is the 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.