[ 
https://issues.apache.org/jira/browse/TINKERPOP-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442823#comment-17442823
 ] 

Tom Kolanko commented on TINKERPOP-2649:
----------------------------------------

Thanks - added additional details

> 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
>
> _updated description_
>  
> In the user interface for Db2 Graph users enter Gremlin queries which get 
> submitted as scripts. One feature that we are working on is helping users 
> take their queries and use them in their own applications directly, instead 
> of using our user interface to run queries. To achieve that we have a 
> `translate query` button that shows them their query in the different 
> language formats the translator supports. For the most part the Groovy 
> translation just works in Java code, however, some data types are problematic.
>  
> One unique aspect about Db2 Graph is that all your data is stored in Db2. Our 
> implementation takes your Gremlin query and figures out the most optimized 
> SQL statements to get the result set. We then execute the SQL statements and 
> return the results. On occasion we may need to help Db2 understand how to 
> translate a query, for example using java.sql.Timestamp.valueOf('2015-01-01 
> 12:05:00') as a filter
>  
> When this filter gets translated to Groovy it uses new 
> Timestamp(1420113900000) which is invalid Java. We need to use new 
> Timestamp(1420113900000L)
>  
> I'm not sure if there would be other areas where the translated Groovy syntax 
> does not work in Java, this is the only example I've foond
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to