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 Andy Jefferson <an...@jpox.org> on 2005/11/03 18:39:07 UTC

TCK : OrderOfParameters

The TCK test OrderOfParameters has an error currently.

The second query has "firstname == :param2 & lastname == :param1" (the opposite
way around to the params in the first query), and thye parameter values for both
queries are the same. As a result the result will be the same (the parameters are
assigned to the values in the order they are encountered in the test). You should
swap the values around if you want to get the expected result AFAIK.

--
Andy

Re: TCK : OrderOfParameters

Posted by Michael Bouschen <mb...@spree.de>.
Hi Andy,

I thought about it and think that the changed query does not add much 
value. I removed the second query from the test and checked in the 
changed (see r330775).

However, I think the class misses to test the order of implicit 
parameters used in different query elements. E.g. a query might use an 
implicit parameter in the filter and another implicit parameter in the 
having clause. I discussed this with Michael W. and he will add some 
more test queries.

Regards Michael

> Hi Andy,
> 
> good catch! The second filter should be "lastname == :param1 && 
> firstname == :param2". Then it returns an empty result as expected. I'll 
> change this soon.
> 
> Regards Michael
> 
>> The TCK test OrderOfParameters has an error currently.
>>
>> The second query has "firstname == :param2 & lastname == :param1" (the 
>> opposite
>> way around to the params in the first query), and thye parameter 
>> values for both
>> queries are the same. As a result the result will be the same (the 
>> parameters are
>> assigned to the values in the order they are encountered in the test). 
>> You should
>> swap the values around if you want to get the expected result AFAIK.
>>
>> -- 
>> Andy
>>  
>>
> 
> 


-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin			

Re: TCK : OrderOfParameters

Posted by Michael Bouschen <mb...@spree.de>.
Hi Andy,

good catch! The second filter should be "lastname == :param1 && 
firstname == :param2". Then it returns an empty result as expected. I'll 
change this soon.

Regards Michael

>The TCK test OrderOfParameters has an error currently.
>
>The second query has "firstname == :param2 & lastname == :param1" (the opposite
>way around to the params in the first query), and thye parameter values for both
>queries are the same. As a result the result will be the same (the parameters are
>assigned to the values in the order they are encountered in the test). You should
>swap the values around if you want to get the expected result AFAIK.
>
>--
>Andy
>  
>


-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin