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/11/19 12:17:00 UTC

[jira] [Closed] (TINKERPOP-2649) Unable to translate gremlin query to java

     [ https://issues.apache.org/jira/browse/TINKERPOP-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Mallette closed TINKERPOP-2649.
---------------------------------------
    Fix Version/s: 3.6.0
                   3.5.2
         Assignee: Stephen Mallette
       Resolution: Fixed

> 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
>            Assignee: Stephen Mallette
>            Priority: Minor
>             Fix For: 3.6.0, 3.5.2
>
>
> _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 found that is problematic
>  



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