[jira] [Updated] (TINKERPOP-2650) Remove deprecated Gremlin step overloads of python keywords

2021-11-12 Thread Stephen Mallette (Jira)


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

Stephen Mallette updated TINKERPOP-2650:

Priority: Trivial  (was: Major)

> Remove deprecated Gremlin step overloads of python keywords
> ---
>
> Key: TINKERPOP-2650
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2650
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: python
>Affects Versions: 3.4.12
>Reporter: Stephen Mallette
>Priority: Trivial
>  Labels: breaking
>
> Remove steps that overloaded python keywords that were long ago replaced with 
> underscore suffixed alternatives. 



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


[jira] [Closed] (TINKERPOP-2648) Translating to python drops limit steps

2021-11-12 Thread Tom Kolanko (Jira)


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

Tom Kolanko closed TINKERPOP-2648.
--
Resolution: Invalid

The python syntax works as expected

> Translating to python drops limit steps
> ---
>
> Key: TINKERPOP-2648
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2648
> Project: TinkerPop
>  Issue Type: Bug
>  Components: tinkergraph, translator
>Affects Versions: 3.5.1
>Reporter: Tom Kolanko
>Priority: Major
>
> When using PythonTranslator limit steps get dropped in favour of list slice 
> functions
> For example:
> _g.V().outE().inV().path().by(elementMap()).limit(100)_
> gets translated to
> _g.V().outE().inV().path().by(__.elementMap())[0:100]_
>  
>  



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


[jira] [Commented] (TINKERPOP-2648) Translating to python drops limit steps

2021-11-12 Thread Tom Kolanko (Jira)


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

Tom Kolanko commented on TINKERPOP-2648:


Ah interesting, I validated this locally and can confirm it works as expected

 

Sorry for the issue!

> Translating to python drops limit steps
> ---
>
> Key: TINKERPOP-2648
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2648
> Project: TinkerPop
>  Issue Type: Bug
>  Components: tinkergraph, translator
>Affects Versions: 3.5.1
>Reporter: Tom Kolanko
>Priority: Major
>
> When using PythonTranslator limit steps get dropped in favour of list slice 
> functions
> For example:
> _g.V().outE().inV().path().by(elementMap()).limit(100)_
> gets translated to
> _g.V().outE().inV().path().by(__.elementMap())[0:100]_
>  
>  



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


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

2021-11-12 Thread Tom Kolanko (Jira)


[ 
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(142011390))).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)


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

2021-11-12 Thread Stephen Mallette (Jira)


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

Stephen Mallette commented on TINKERPOP-2649:
-

If you could alter the description here with specifics of where the 
{{GroovyTranslator}} is inadequate it would help us understand what needs to be 
changed. Perhaps some fixes could be applied to {{GroovyTranslator}} to solve 
your problems, but ultimately I think we might want to:

1. make {{GroovyTranslator}} produce idiomatic Groovy
2. create a {{{JavaTranslator}} that produces idiomatic Java
3. create {{GremlinLanguageTranslator}} that produces pure gremlin-language 
syntax

[~krlawrence] any thoughts on this?

> 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)


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

2021-11-12 Thread Tom Kolanko (Jira)


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

Tom Kolanko updated TINKERPOP-2649:
---
Description: 
_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. To achieve that 
we have a `translate query` button that shows them their query in the different 
language formats the translator supports.

 

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 new java.sql.Time

  was:It would be helpful to be able to take a script that runs in gremlin 
console and translate it to run in Java


> 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. To 
> achieve that we have a `translate query` button that shows them their query 
> in the different language formats the translator supports.
>  
> 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 new java.sql.Time



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


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

2021-11-12 Thread Tom Kolanko (Jira)


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

Tom Kolanko updated TINKERPOP-2649:
---
Description: 
_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(

 

  was:
_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. To achieve that 
we have a `translate query` button that shows them their query in the different 
language formats the translator supports.

 

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 new java.sql.Time


> 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(
>  



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


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

2021-11-12 Thread Tom Kolanko (Jira)


[ 
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(142011390) which is invalid Java. We need to use new 
> Timestamp(142011390L)
>  
> 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)


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

2021-11-12 Thread Tom Kolanko (Jira)


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

Tom Kolanko updated TINKERPOP-2649:
---
Description: 
_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(142011390) 
which is invalid Java. We need to use new Timestamp(142011390L)

 

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

 

  was:
_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(

 


> 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(142011390) which is invalid Java. We need to use new 
> Timestamp(142011390L)
>  
> 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)


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

2021-11-12 Thread Tom Kolanko (Jira)


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

Tom Kolanko updated TINKERPOP-2649:
---
Description: 
_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(142011390) 
which is invalid Java. We need to use new Timestamp(142011390L)

 

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

 

  was:
_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(142011390) 
which is invalid Java. We need to use new Timestamp(142011390L)

 

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

 


> 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(142011390) which is invalid Java. We need to use new 
> Timestamp(142011390L)
>  
> 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)


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

2021-11-12 Thread Stephen Mallette (Jira)


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

Stephen Mallette commented on TINKERPOP-2649:
-

If this is mostly about "Timestamp" - then i think the fix is pretty easy:

https://github.com/apache/tinkerpop/blob/e4df321b65d85ce3575f2e90130beebcaa7b3784/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/translator/GroovyTranslator.java#L152

maybe "Date" is a problem too. Would you care to submit a PR to fix this little 
bug?

> 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(142011390) which is invalid Java. We need to use new 
> Timestamp(142011390L)
>  
> 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)


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

2021-11-12 Thread Kelvin Lawrence (Jira)


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

Kelvin Lawrence commented on TINKERPOP-2649:


In response to your question, [~spmallette] , I like the idea of trending 
towards more fine grained, idiomatic translators. Especially as I think we are 
well along that road already now with the translator work we did for 3.5

> 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(142011390) which is invalid Java. We need to use new 
> Timestamp(142011390L)
>  
> 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)


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

2021-11-12 Thread Stephen Mallette (Jira)


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

Stephen Mallette commented on TINKERPOP-2649:
-

great - please target the 3.5-dev branch. If you need it in 3.4-dev, you'd need 
a separate PR i think as it won't merge cleanly from 3.4-dev to 3.5-dev.

> 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(142011390) which is invalid Java. We need to use new 
> Timestamp(142011390L)
>  
> 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)


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

2021-11-12 Thread Tom Kolanko (Jira)


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

Tom Kolanko commented on TINKERPOP-2649:


Yes, the same is true for Date. It's expecting a long in the constructor. I 
will submit a PR for both

> 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(142011390) which is invalid Java. We need to use new 
> Timestamp(142011390L)
>  
> 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)


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

2021-11-12 Thread ASF GitHub Bot (Jira)


[ 
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(142011390) which is invalid Java. We need to use new 
> Timestamp(142011390L)
>  
> 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)