[Mulgara-dev] Query Evaluation - binding variables

Alex Hall alexhall at revelytix.com
Wed Apr 23 12:29:20 UTC 2008


Andrae Muys wrote:
> On 23/04/2008, at 8:59 AM, Alex Hall wrote:
>> However, when I execute this query, I get an error message,
>> "org.mulgara.query.QueryException: The subject: $y and the object:  
>> $node
>> are invalid, one must be a variable and the other a fixed value  
>> around a
>> predicate."  I know that this can be worked around by using a  
>> subquery,
>> but I'm hoping to avoid a subquery.  It seems there should be some way
>> to force Mulgara to evaluate the first two constraints and bind the
>> variable $y to a value before evaluating the walk function.  Am I
>> mistaken here?  Any suggestions?
> 
> Both trans() and walk() both predate the annotations work that made  
> it possible to specify ordering constraints between elements of  
> joins. Without that ability they have to throw the exception you are  
> seeing.  It is now possible to modify both trans and walk to do  
> exactly what you suggest - and I am happy to help anyone interested  
> in doing so understand what needs to be done.  Unfortunately given my  
> current focus on XA2 I'm not in a position to do this myself.

Can you give an estimate for how long this modification would take?  It 
seems like it would be a pretty significant one, as the reordering is 
done in the join operation (as I understand it) while the exception is 
thrown during constraint resolution, which occurs prior to the join.  In 
the meantime I'll just use the workaround suggested by Ronald.

Thanks,
Alex



More information about the Mulgara-dev mailing list