Cole-Greer commented on code in PR #3185:
URL: https://github.com/apache/tinkerpop/pull/3185#discussion_r2279763294
##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/GValueManager.java:
##########
@@ -32,21 +34,25 @@
* The {@code GValueManager} class is responsible for managing the state of
{@link GValue} instances and their
* associations with `Step` objects in a traversal. This class ensures that
`GValue` instances are properly extracted
* and stored in a registry, allowing for dynamic query optimizations and
state management during traversal execution.
- * Note that the manager can be locked, at which point it becomes immutable,
and any attempt to modify it will result
- * in an exception.
*/
-public final class GValueManager implements Serializable, Cloneable {
+public class GValueManager implements Serializable, Cloneable {
private final Map<String, GValue<?>> gValueRegistry = new HashMap<>();
- private final Map<String, GValue<?>> pinnedGValues = new HashMap<>();
+ /**
+ * Tracks pinned values for faster lookup.
+ */
+ private final Set<String> pinnedGValues = new HashSet<>();
Review Comment:
Nit: I think something like `pinnedVariables` might be a better name if
we're just storing variable names now.
--
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]