xiazcy commented on code in PR #3339:
URL: https://github.com/apache/tinkerpop/pull/3339#discussion_r2978439805
##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/P.java:
##########
@@ -127,10 +127,16 @@ public void setValue(final V value) {
isCollection = false;
} else if (value instanceof Collection) {
isCollection = true;
- if (((Collection<?>) value).stream().anyMatch(v -> v instanceof
GValue)) {
+ final Collection<V> vCollection = (Collection<V>) value;
+
+ // fast path: if no GValues in the collection, use collection
directly
+ if (!containsGValue(vCollection)) {
+ if (value instanceof BulkSet) {
+ this.literals = vCollection;
+ }
Review Comment:
```suggestion
this.literals = vCollection;
```
Shouldn't this just be the `else` case before, regardless of it's `BulkSet`
or not? I.e. it looks like the non-BulkSet cases are being left out.
--
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]