On 11 Mar 2011, at 12:20, Paolo Castagna wrote:

> Once the queries are parsed into two Query objects (say, q1 and q2),
> I can use q1.equals(q2) to check if two queries are equal (i.e. exactly
> the same, modulo extra spaces/formatting).

Quick tip here: use the algebra for comparisons 
(Algebra.compile(q1).equals(Algebra.... ).
The algebra handles the annoying formatting variance for you.

However...

> The only difference between Q3 and Q1|Q2 is that we have a different
> variable name (i.e. ?y instead of ?v). The queries are different, but
> they are "equivalent": they are structurally the same, only variable
> names are different.

I don't think it handles this (but I may be wrong).

Damian 


Reply via email to