db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nirmal Fernando <nirmal070...@gmail.com>
Subject Re: Test case in orderby.out file
Date Thu, 29 Apr 2010 23:53:55 GMT
Hi Knut,

Thanks for the reply.

On Thu, Apr 29, 2010 at 11:53 PM, Knut Anders Hatlen
<Knut.Hatlen@sun.com> wrote:
> On 04/29/10 05:16 PM, Nirmal Fernando wrote:
>> Hi All,
>> I think behaviour of following test is not valid, since
>> ColumnReference age is not there in the distinct list.
>> line:1810 of orderby.out
>>
>> ij> -- Ordering by an expression involving an unselected column is not. However,
>> -- Derby does not currently enforce this restriction. Note that the answer
>> -- that Derby returns is incorrect: Derby returns two rows with duplicate
>> -- 'name' values. This is because Derby currently implicitly includes the
>> -- 'age' column into the 'distinct' processing due to its presence in the
>> -- ORDER BY clause. DERBY-2351 and DERBY-3373 discuss this situation in
>> -- more detail.
>> select distinct name from person order by age*2;
>> NAME
>> ----------
>> John
>> Mary
>> John
>>
>> Can someone explain this behaviour?
>>
>
> Hi Nirmal,
>
> I think this test case only attempts to demonstrate a bug that later was
> logged as DERBY-4371. If you fix DERBY-4371, I find it quite reasonable
> to update orderby.out to reflect that the query is now rejected.
>
> --
> Knut Anders
>
>



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Mime
View raw message