Scenario:If we need to filter something(like label) by the traverser. like following, we must use WherePredicateStep to do filtering:
gremlin> g.V().as("f").out().as("e").where("e", eq("f")).by(label)
==>v[2]
==>v[4]
but this write style may be confused, if we could just write as:
g.V().as("f").out().has(label, eq(select("f").label()))
It's more understandable
this may need to change Compare function to judge if first is traverser and do special logic:
eq {
public boolean test(final Object first, final Object second) {
return null == first ? null == second : (Compare.bothAreNumber(first, second) ? NumberHelper.compare((Number)first, (Number)second) == 0 : first.equals(second));
}
public Compare negate() {
return neq;
}
},
do we have the need to do so?