Not all expression-pairs can be operand of comparison operators. Some type check needs to be done when compiling the cypher query to te relational algebra expressions.
These are legal:
nodeVar1 = nodeVar2
nodeVar1 != nodeVar2
nodeVar1.numericAttribute < 5
However, these are not, and a compile-time error should be omitted:
nodeVar1 < 5
nodeVar1 < nodeVar2
In general, these cases should emit a warning (list can be continued):
vertex and edge variables:
[ ] can't be tested for less than, greater than etc. with each other
[ ] can't be compared to arithmetic expressions and string expressions
Not all expression-pairs can be operand of comparison operators. Some type check needs to be done when compiling the cypher query to te relational algebra expressions.
These are legal:
nodeVar1 = nodeVar2
nodeVar1 != nodeVar2
nodeVar1.numericAttribute < 5
However, these are not, and a compile-time error should be omitted:
nodeVar1 < 5
nodeVar1 < nodeVar2
In general, these cases should emit a warning (list can be continued):
vertex and edge variables: