Issue Details (XML | Word | Printable)

Key: JDO-162
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Michael Watzek
Reporter: Michael Watzek
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Implement new JDO 2 query tests cases concerning other language changes.

Created: 04/Oct/05 09:31 PM   Updated: 29/Oct/05 12:53 AM
Return to search
Component/s: tck2
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works JDO-162.patch 2005-10-15 12:55 AM Michael Watzek 25 kB
File Licensed for inclusion in ASF works JDO-162.patch2 2005-10-28 12:48 AM Michael Watzek 29 kB

Resolution Date: 29/Oct/05 12:53 AM


 Description  « Hide
We need 5 new test classes, one for each of the following assertions:

- A14.6.2-42: There is no distinction made between character literals and String literals. Single character String literals can be used wherever character literals are permitted. String literals are allowed to be delimited by single quote marks or double quote marks. This allows String literal filters to use single quote marks instead of escaped double quote marks.
- A14.6.2-43: Identifiers that are persistent field names or public final static field names are required to be supported by JDO implementations.
- A14.6.8-1: setRange(long fromIncl, long toExcl).
- A14.6.8-2: If ((toExcl - fromIncl) <= 0) evaluates to true, if the result of the query execution is a List, the returned List contains no instances, and an Iterator obtained from the List returns false to hasNext(). If the result of the query execution is a single instance (setUnique(true)), it will have a value of null.
- A14.6.8-3: setRange(String range).

Details can be found on Wiki page http://wiki.apache.org/jdo/QueryTests#OtherLanguageChanges.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michael Watzek added a comment - 15/Oct/05 12:55 AM
The patch implements the assertions above.

Michael Watzek made changes - 15/Oct/05 12:55 AM
Field Original Value New Value
Attachment JDO-162.patch [ 12314887 ]
Michael Bouschen added a comment - 26/Oct/05 07:28 PM
Some comments about the patch

CharacterAndStringLiterals.java:
- I propose to change the filter of the invalid query to "charNotNull == 'O.'".
- I propose to add a new invalid query using double quotes: "charNotNull == \"O.\""
- OR is not a valid operaor in JDOQL.
- I propose to add another valid query using double quotes: stringNull.startsWith(\"Even\") OR charNotNull == \"O\"

PositiveRange, RangeAsString:
- I propose to add another test query with a non zero from range.

IdentifiersEqualFieldNames:
- I think we need two test queries here: one accesing a persistent field such as "this.firstname = 'emp1First'" and another one uinsg a constatnt such as "this.personid < Byte.MAX_VALUE.

Michael Watzek added a comment - 28/Oct/05 12:48 AM
The second patch implements the comments above. Additionally, it adds ORDER BY clauses to all valid range queries.

Michael Watzek made changes - 28/Oct/05 12:48 AM
Attachment JDO-162.patch2 [ 12320356 ]
Repository Revision Date User Message
ASF #329175 Fri Oct 28 09:39:17 UTC 2005 brazil JDO-162: Implement new JDO 2 query tests cases concerning other language changes.
Files Changed
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/RangeAsString.java
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/IdentifiersEqualFieldNames.java
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/NegativeRange.java
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/CharacterAndStringLiterals.java
MODIFY /incubator/jdo/trunk/tck20/test/conf/alltests.conf
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/PositiveRange.java
MODIFY /incubator/jdo/trunk/tck20/test/testdata/org/apache/jdo/tck/pc/mylib/mylibForQueryTests.xml

Repository Revision Date User Message
ASF #329205 Fri Oct 28 14:04:10 UTC 2005 brazil Two bug fixes concerning JDO-162: 1) method call Query.setString(String) incorporated, 2) logger for class MyLibReader added in all logging properties files.
Files Changed
MODIFY /incubator/jdo/trunk/tck20/test/conf/simplelog.properties
MODIFY /incubator/jdo/trunk/tck20/test/conf/logging.properties
MODIFY /incubator/jdo/trunk/tck20/test/conf/log4j.properties
MODIFY /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/QueryElementHolder.java

Michael Bouschen added a comment - 28/Oct/05 05:55 PM
Looks good, ship it.

Michael Watzek added a comment - 29/Oct/05 12:53 AM
The second patch implements the comments above and has been checked in.

That patch contained two bugs which has been fixed and checked in also:

1) The call of method Query.setRange had been enabled.
2) A logger for class MyLibReader was introduced in all logging properties files.

Michael Watzek made changes - 29/Oct/05 12:53 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]