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

Tom Kolanko commented on TINKERPOP-2648:
----------------------------------------

[~spmallette] would you be willing to accept a PR that modifies the python 
translation to change from list overloads to limit steps?

 

The translated queries do not work well when run through the gremlin linter 
because it does not support the list overloads

 

For example:

{{V().has('PERSON', 'NAME', 
'Marko').limit(1).outE('KNOWS').inV().path().by(elementMap()).limit(10)}}

 

Gets transated to 

{{g.V().has('PERSON', 'NAME', 
'Marko')[0:1].outE('KNOWS').inV().path().by(__.elementMap())[0:10]}}

 

which can't get run through gremlint

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

Reply via email to