Haisheng> variable always left, constant always right for applicable binary operators;
Oh, I did not think of making different behavior for literals, variables. What do you think re "$n.field = 42" where $n.field is a dot operator I'm not fond of adding complicated checks there, however, I think I can move the literal to the right if the other side is a non-literal. Haisheng>- for join conditions, left operand always comes from left relation, right operand always comes from right relation for reversible binary operators. I'm afraid it would be hard to implement :( I don't like to implement operator-specific logic. On the other hand "sort by length, then sort by string representation" is more or less the same as "sort by numeric value" for cases like $1=$8, so that semantics would be more or less automatic. Vladimir
