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

ASF GitHub Bot commented on TINKERPOP-2649:
-------------------------------------------

tkolanko opened a new pull request #1501:
URL: https://github.com/apache/tinkerpop/pull/1501


   https://issues.apache.org/jira/browse/TINKERPOP-2649
   
   When running Gremlin queries through the translator Dates and Timestamps 
need to be long's, not int's
   
   The gremlin-console supports both so this fix is mainly for runnig the 
translated queries in Java
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 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 found that is problematic
>  



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

Reply via email to