Re: [Firebird-devel] Coalesce of the damned

2015-10-29 Thread Adriano dos Santos Fernandes
On 29/10/2015 04:02, Claudio Valderrama C. wrote: >> -Original Message- >> From: Arno Brinkman [mailto:fbsupp...@abvisie.nl] >> Sent: MiƩrcoles, 28 de Octubre de 2015 21:27 >> >> I've to dig deep in my memory (ooh boy), but i think the >> stream flag NULL is >> not treated proper in this

Re: [Firebird-devel] Coalesce of the damned

2015-10-29 Thread Arno Brinkman
Hi Claudio, > After reading Adriano's mail, I stopped looking at v2.5. > :-) > I think the case can be summarized and optimized: > given > T = table > V = the result of a selectable proc, view or derived table, > if T left join V produces a null record in V caused by a non-matching > outer > jo

Re: [Firebird-devel] Coalesce of the damned

2015-10-28 Thread Claudio Valderrama C.
> -Original Message- > From: Arno Brinkman [mailto:fbsupp...@abvisie.nl] > Sent: MiƩrcoles, 28 de Octubre de 2015 21:27 > > I've to dig deep in my memory (ooh boy), but i think the > stream flag NULL is > not treated proper in this case. > > Thinking i've fixed something simular or eve

Re: [Firebird-devel] Coalesce of the damned

2015-10-28 Thread Arno Brinkman
Hi Claudio, Simplified test case: SELECT dt.* FROM RDB$DATABASE LEFT JOIN (SELECT COALESCE(RDB$SECURITY_CLASS, 'NO WAY') AS COALESCE_RET, 'YES THIS TO' AS CONST_RET FROM RDB$DATABASE WHERE 1=1) dt ON (1 = 0); Result: COALESCE_RET CONST_RET --

Re: [Firebird-devel] Coalesce of the damned

2015-10-28 Thread Adriano dos Santos Fernandes
Em 28/10/2015 20:31, Claudio Valderrama C. escreveu: >> -Original Message- >> From: Adriano dos Santos Fernandes [mailto:adrian...@gmail.com] >> Sent: Martes, 27 de Octubre de 2015 6:40 >> >> The problem is that we can't go to evaluate blr_coalesce for a "null >> stream". > > Yes, I thoug

Re: [Firebird-devel] Coalesce of the damned

2015-10-28 Thread Claudio Valderrama C.
> -Original Message- > From: Adriano dos Santos Fernandes [mailto:adrian...@gmail.com] > Sent: Martes, 27 de Octubre de 2015 6:40 > > The problem is that we can't go to evaluate blr_coalesce for a "null > stream". Yes, I thought so but there are two cases with a null stream: - coalesce

Re: [Firebird-devel] Coalesce of the damned

2015-10-27 Thread Adriano dos Santos Fernandes
On 27/10/2015 05:21, Claudio Valderrama C. wrote: > > My wish for FB v4 is that we stop using nod_value_if for coalesce (and for > the CASE statement) and instead we implement a new verb. Among other things, > it will avoid reevaluating expressions and will give us more freedom to fix > things. > >