On 22/11/17 21:27, Claude Warren wrote:
I think equalTo for ElementData is not correct.  Given 2 ElementData
instances

ElementData 1:
{noformat}

VALUES ( ?x ?v ) {
   ( "three" <one> )
   ( "four" <two> )
}

{noformat}

ElementData 2:

{noformat}

VALUES ( ?v ?x ) {
   ( <one> "three" )
   ( <two> "four" )
}

{noformat}

shouldn't the equalTo() method return true.

Currently it is sensitive to the ordering of the vars.

I can put a fix in but I want to be sure that there is an error first.

It's not an error.

Element* are syntax. and ".equals" is a syntax test, not a semantic test. The variables are in a different order and in synatx that is significant.

This is true throughout the abstract syntax provided by Element*. There are lots of ways to write "the same" query. .equals means "same abstract syntax".

Try "qparse" - it always checks the query round-trips as well as printing it.

        Andy


Claude

Reply via email to