You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Stephen Mallette (Jira)" <ji...@apache.org> on 2021/02/02 11:41:00 UTC
[jira] [Commented] (TINKERPOP-2516) Property folding has trouble
with coalesce
[ https://issues.apache.org/jira/browse/TINKERPOP-2516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17277056#comment-17277056 ]
Stephen Mallette commented on TINKERPOP-2516:
---------------------------------------------
thanks for reporting this:
{code}
gremlin> g.V(v1).coalesce(has('xyz'),addE('self').to(v1).property('foo','bar')).property(id,102)
org.apache.tinkerpop.gremlin.structure.T$2 cannot be cast to java.lang.String
Type ':help' or ':h' for help.
Display stack trace? [yN]n
{code}
> Property folding has trouble with coalesce
> ------------------------------------------
>
> Key: TINKERPOP-2516
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2516
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.4.9
> Reporter: Christopher Smith
> Priority: Major
>
> This appears closely related to TINKERPOP-2112. I had some working code that was appending {{.property(T.id, str)}} to the results of an {{addE}} call. However, I have refactored that code so that the call to set the ID is appended to a {{coalesce}} call:
> {code:java}
> gts.V(Vo).coalesce(
> // guard condition
> __.addE("rel").to(Vi).property("foo", bar)
> );
> {code}
> This formulation triggers the same {{T$2 cannot be cast to String}} error.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)