You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2022/02/23 17:12:45 UTC
[GitHub] [tinkerpop] bechbd commented on a change in pull request #1570: Fixed issue with property(Map) being passed a null
bechbd commented on a change in pull request #1570:
URL: https://github.com/apache/tinkerpop/pull/1570#discussion_r813124519
##########
File path: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
##########
@@ -2473,6 +2473,8 @@ else if (value instanceof Traversal)
property(key, entry.getKey(), entry.getValue());
}
return this;
+ } else if (value == null) { // Just return the input if you pass a null
+ return this;
Review comment:
Since it performs a no-op here, I am not sure, it really matters too much that it doesn't get translated. However, I think the bigger question is if we expect the Translators to provide an exact translation of the query or if it can translate to an "optimized" version of the query.
I suspect that even without the `null` case, a general Map would result in multiple `property()` steps being chained together instead of a single step.
Thoughts on the need to provide a verbatim translation or not?
--
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: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org