Cole-Greer opened a new pull request, #3157: URL: https://github.com/apache/tinkerpop/pull/3157
This PR is a redesign and rework of the [previous GValue work](https://github.com/apache/tinkerpop/pull/2919) aimed at TinkerPop 4. If this PR is accepted, it is intended to replace the current GValue implementation in the master branch. This change introduces GValue, which is essentially a wrapper around a query parameter name and value. The primary goal of GValues is to persist the parameterized state of a traversal through strategy execution. This enables post-strategy Traversals to cached, and for parameterized values to remain mutable after a Traversal is retrieved from the cache. This PR introduces new step interfaces and "GValue Placeholder" steps for parameterizable steps. A GValue placeholder is a non-executable placeholder step which may store its arguments as GValues. There is a new finalization strategy `GValueReductionStrategy` which is intended to be applied after a traversal has been stored in the cache which "reduces" all placeholder steps to their concrete non-parameterized form. The primary intention of this structure is to prevent GValues from unintentionally leaking into step semantics or traversal results. Some optimization strategies such as EarlyLimitStrategy may alter a Traversal based on a specific argument value in such a way that is not generalizable for all substitutions of that parameter. To guard against this, each traversal is given a `GValueManager` which tracks if a certain variable has been "pinned". A traversal with a pinned variable is only valid for the current values of that variable, and does not allow for substitution of the pinned variable. This PR utilizes the GValue improvements to build an optional new cache into GremlinLangScriptEngine which can be used to save on antlr parsing and strategy application time. -- 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]
