You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Norio Akagi (Jira)" <ji...@apache.org> on 2022/06/21 17:20:00 UTC
[jira] [Updated] (TINKERPOP-2762) getScopeKeys should respect the order of keys passed in Step
[ https://issues.apache.org/jira/browse/TINKERPOP-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Norio Akagi updated TINKERPOP-2762:
-----------------------------------
Component/s: process
Affects Version/s: 3.5.3
3.4.13
3.6.0
Description:
Right now, {{Scoping#getScopeKeys}} return {{Set<String>}} to return all keys used in scoping.
Depending on each Step's implementation, this loses the information of the order of keys. For example, {{SelectStep}} stores keys as {{HashSet}}
[https://github.com/apache/tinkerpop/blob/cf95caaf139b5570d0c2d509b74f6f6cb561ffaf/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectStep.java#L61]
When GraphProvider implements their own optimization for SelectStep, naturally they want to access this keys, but let's say when a query has {{{}select('a', 'b'){}}}, the GraphProvider can only know there are keys {{'a'}} and {{'b'}} and cannot see which comes first because it returns as {{{}HashSet{}}}.
This blocks them from performing their own by-traversal for each key, because applying by-traversals is done in round-robin manner and the order is critical information to process.
For now, I am adding a getter of the list for a provider.
https://github.com/apache/tinkerpop/pull/1726
Summary: getScopeKeys should respect the order of keys passed in Step (was: getScope)
> getScopeKeys should respect the order of keys passed in Step
> ------------------------------------------------------------
>
> Key: TINKERPOP-2762
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2762
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.6.0, 3.4.13, 3.5.3
> Reporter: Norio Akagi
> Priority: Major
>
> Right now, {{Scoping#getScopeKeys}} return {{Set<String>}} to return all keys used in scoping.
> Depending on each Step's implementation, this loses the information of the order of keys. For example, {{SelectStep}} stores keys as {{HashSet}}
> [https://github.com/apache/tinkerpop/blob/cf95caaf139b5570d0c2d509b74f6f6cb561ffaf/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectStep.java#L61]
> When GraphProvider implements their own optimization for SelectStep, naturally they want to access this keys, but let's say when a query has {{{}select('a', 'b'){}}}, the GraphProvider can only know there are keys {{'a'}} and {{'b'}} and cannot see which comes first because it returns as {{{}HashSet{}}}.
> This blocks them from performing their own by-traversal for each key, because applying by-traversals is done in round-robin manner and the order is critical information to process.
> For now, I am adding a getter of the list for a provider.
> https://github.com/apache/tinkerpop/pull/1726
--
This message was sent by Atlassian Jira
(v8.20.7#820007)