[
https://issues.apache.org/jira/browse/TINKERPOP-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442762#comment-17442762
]
Tom Kolanko commented on TINKERPOP-2649:
----------------------------------------
I ran a bunch of queries through the translator and everything seemed to work
as expected when running the outputted groovy syntax as java
The only thing that was problematic was some datatypes which you already
acknowledged in [https://www.youtube.com/watch?v=tPBOA08ZMLY]
For example:
g.V().hasLabel('CLAIM').has('CLAIM_DATE',
lte(java.sql.Timestamp.valueOf('2015-01-01 12:05:00'))).values('CLAIM_DATE')
gets translated to groovy as
g.V().hasLabel("CLAIM").has("CLAIM_DATE", P.lte(new
Timestamp(1420113900000))).values("CLAIM_DATE")
which works in gremlin-console but can't be used as java code unless I add L to
denote that it's a long
We can recommend to write queries in alternate ways to work around that though
The reason for java.sql.Timestamp is these are queries being written for db2
graph [https://www.ibm.com/docs/en/db2/11.5?topic=deployments-db2-graph]
> Unable to translate gremlin query to java
> -----------------------------------------
>
> Key: TINKERPOP-2649
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2649
> Project: TinkerPop
> Issue Type: Bug
> Components: translator
> Affects Versions: 3.5.1
> Reporter: Tom Kolanko
> Priority: Minor
>
> It would be helpful to be able to take a script that runs in gremlin console
> and translate it to run in Java
--
This message was sent by Atlassian Jira
(v8.20.1#820001)