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/11 15:43:00 UTC
[jira] [Commented] (TINKERPOP-2648) Translating to python drops
limit steps
[ https://issues.apache.org/jira/browse/TINKERPOP-2648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442317#comment-17442317 ]
Stephen Mallette commented on TINKERPOP-2648:
---------------------------------------------
That translation is correct. There is syntatic sugar in gremlin-python which lets you prefer the python range/slice syntax - internally that syntax should still build the traversal properly as `limit()`:
https://tinkerpop.apache.org/docs/3.5.1/reference/#gremlin-python-sugar
> 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)