[Mulgara-dev] No such variable

Andrae Muys andrae at netymon.com
Thu May 1 04:43:05 UTC 2008


On 01/05/2008, at 12:16 PM, Paul Gearon wrote:
> On Wed, Apr 30, 2008 at 7:52 PM, Andrae Muys <andrae at netymon.com>  
> wrote:
>>  This isn't an intentional decision.  An Answer's variable list is  
>> intended
>> to be the same as its originating query's select list.  The  
>> behaviour Paul
>> is referring to is restricted to Tuples, and yes that both empty and
>> unconstrained Tuples has no variables is deliberate.
>>
>>  That SubqueryAnswer is failing like this is a surprise.
>
> What's happening is that there is a union (disjunction) between two
> Tuples. Say the first Tuples has variables {a, b, c} and the second
> Tuples has variables {a, b, d}. Then the union will usually have
> variables of {a, b, c, d}, with <null> values for some of the c and d
> values (but never both null at the same time). However, if the second
> Tuples has no rows, then the result will have variables of {a, b, c}
> only.
>
> The projection that occurs during SubqueryAnswer (this is used for ANY
> Answer, not just SubQueries, so the name is a misnomer here) checks
> that each of the projected variables exists. However, in James's case
> the second Tuples has resolved to EMPTY, meaning that any variables
> unique to that side of the disjunction are not available. Hence the
> exception.
>
> If Tuples carried around their variables, even when they were empty,
> then this problem wouldn't have happened.
>
> Does that clarify it?

It does, and it's a cute corner-case in the projection code.

But an empty tuples should have no variables :).

Andrae

-- 
Andrae Muys
andrae at netymon.com
Senior RDF/Semantic-Web Consultant
Netymon Pty Ltd






More information about the Mulgara-dev mailing list