spmallette commented on code in PR #3157:
URL: https://github.com/apache/tinkerpop/pull/3157#discussion_r2251233141
##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/P.java:
##########
@@ -37,10 +43,27 @@ public class P<V> implements Predicate<V>, Serializable,
Cloneable {
protected PBiPredicate<V, V> biPredicate;
protected V value;
protected V originalValue;
+ protected GValue<V> gValue;
+ protected GValue<V>[] gValues;
+
+ public P(final PBiPredicate<V, V> biPredicate, V value) {
+ if (value instanceof GValue) {
+ this.gValue = (GValue<V>) value;
+ this.value = ((GValue<V>) value).get();
+ } else if (value instanceof List && ((List) value).stream().anyMatch(v
-> v instanceof GValue)) {
Review Comment:
Is `List` too restrictive here - perhaps `Collection` is more appropriate?:
```
gremlin> g.V().has('name', within(['josh','vadas'] as Set))
==>v[2]
==>v[4]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]