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 "Michelle Caisse (JIRA)" <ji...@apache.org> on 2007/02/02 22:12:05 UTC

[jira] Updated: (JDO-378) SQL query : executeWithMap test

     [ https://issues.apache.org/jira/browse/JDO-378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michelle Caisse updated JDO-378:
--------------------------------

    Attachment: jdo-378-2.patch

The attached patch is responsive to comments made during a code review at this morning's JDO TCK conference call.

1a. In place of the new QueryTest.executeSQLQueryWithMap(), modify the existing QueryTest.executeSQLQuery() to take an additional boolean positive argument and a generic Object argument for the parameter list (Object[] or Map)
1b. Modify other tests in the query.sql package to use the modified executeSQLQuery() method.
2. Allow additional elements in the parameter map beyond those needed for the query. The additional elements are to be ignored by the implementation.
3. Limit negative tests to those which do not have keys of 1..n. Cases include a missing key and non-integer keys.
4. Remove unnecessary casts.

The test fails on the RI when there are additional elements in the Map.  The RI checks specifically for an element with a value of zero for the key and throws a JDOUserException. If there is an additional element beyond the range of the query paramenters, an ArrayIndexOutOfBounds exception occurs.  Currently, the test fails on the first error or failure encountered, so only the first is seen.

> SQL query : executeWithMap test
> -------------------------------
>
>                 Key: JDO-378
>                 URL: https://issues.apache.org/jira/browse/JDO-378
>             Project: JDO
>          Issue Type: Test
>          Components: tck2
>    Affects Versions: JDO 2 final
>            Reporter: Andy Jefferson
>         Assigned To: Michelle Caisse
>            Priority: Minor
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-378-2.patch, jdo-378.patch
>
>
> SQL queries when executed using executeWithMap() should check that the Map contains keys of type Integer and with values starting at 1. There don't seem to be any tests for SQL Query.executeWithMap in the TCK (as I just found out performing such a query with JPOX and getting an incorrect result) and so would be a good addition for any maintenance release. JPOX CVS now supports this behaviour btw.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.