[
https://issues.apache.org/jira/browse/TINKERPOP-3223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephen Mallette closed TINKERPOP-3223.
---------------------------------------
Fix Version/s: 4.0.0
3.7.6
3.8.1
Assignee: Stephen Mallette
Resolution: Fixed
Fixed via CTR on
https://github.com/apache/tinkerpop/commit/0f90b39e03d8463fe5c56e94beff633a51bcbf5c
> Argument to SubgraphStrategy.Builder.edges changes semantics when used along
> vertices
> -------------------------------------------------------------------------------------
>
> Key: TINKERPOP-3223
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3223
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.8.0, 3.7.5
> Environment: Gremlin Console, Windows 11
> GremlinServer on Docker.
> Reporter: Daniel Weber
> Assignee: Stephen Mallette
> Priority: Minor
> Fix For: 4.0.0, 3.7.6, 3.8.1
>
>
> Setup: Any TinkerGraph with vertices and edges with long-Ids.
> The arguments to SubgraphStrategy.Builder.vertices and edges are supposed to
> be predicate-traversals, i.e. edges and vertices are only to be considered
> part of the subgraph if the predicate traversal yields a result. This works
> for
> {{g.withStrategies(SubgraphStrategy.build().vertices(id().is(lt(42L))).create()).V()
> / .E()}}
> {{and}}
> {{g.withStrategies(SubgraphStrategy.build().edges(id().is(lt(4L))).create()).V()
> / .E()}}
> however, if used together, the edges-traversal suddenly becomes somewhat of a
> failed cast on edges:
> {{g.withStrategies(SubgraphStrategy.build().edges(id().is(lt(8L))).vertices(id().is(lt(4L))).create()).E()}}
> yields
> class java.lang.Long cannot be cast to class
> org.apache.tinkerpop.gremlin.structure.Edge (java.lang.Long is in module
> java.base of loader 'bootstrap'; org.apache.tinkerpop.gremlin.structure.Edge
> is in unnamed module of loader 'app')
> It does work, however, if the filter is made explicit:
> {{g.withStrategies(SubgraphStrategy.build().edges(filter(id().is(lt(8L)))).vertices(id().is(lt(4L))).create()).E()}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)