[
https://issues.apache.org/jira/browse/TINKERPOP-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephen Mallette closed TINKERPOP-2898.
---------------------------------------
Resolution: Not A Bug
With Groovy, {{in}} is a keyword so you have to do {{__.in()}} to ensure you
get the Gremlin step.
> Syntax error using logical operator OR
> --------------------------------------
>
> Key: TINKERPOP-2898
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2898
> Project: TinkerPop
> Issue Type: Bug
> Components: driver, server
> Affects Versions: 3.6.2
> Environment: - TinkerGraph Version: 3.6.2
> - Operating system: macOS 13.2.1
> - API/Driver: Java
> Reporter: Zeyang Zhuang
> Priority: Major
>
> We discovered a bug that Syntax error using logical operator OR.
> - TinkerGraph Version: 3.6.2
> - Operating system: macOS 13.2.1
> - API/Driver: Java
> We want to use logical operator OR to merge two individual queries, but it
> trigger a syntax exception which I think the query it's actually correct. And
> I keep triggering this kind of problem.
> Here is one of our examples that triggered the bug.
> 1) `g.V().has('vp0')` is a correct query.
> 2) `g.V().in('el0')` is a correct query.
> 3) `g.V().or(has('vp0'),in('el0'))` is supposed to be a correct query but
> trigger a crash.
> *Expected behavior:*
> No exception should be expected to throw.
> *Actual behavior:*
> A `exception` is thrown. And I'm not really sure whether this problem should
> happen so I report this. And I think if I replace the `in` into `inE` here,
> the bug may not be triggered, but I read the [Gremlin
> manual]([https://tinkerpop.apache.org/docs/current/reference/]) carefully,
> this query syntax is correct and should be supported.
> ```
> java.util.concurrent.ExecutionException:
> org.apache.tinkerpop.gremlin.driver.exception.ResponseException: startup
> failed:
> Script141.groovy: 1: unexpected token: in @ line 1, column 21.
> g.V().or(has('vp0'),in('el0'))
> ^
> 1 error
> ```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)