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

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

GitHub user okram opened a pull request:

    https://github.com/apache/tinkerpop/pull/726

    TINKERPOP-1795: Getting Lambda comparator message for .profile() step

    https://issues.apache.org/jira/browse/TINKERPOP-1795
    
    Some objects are hard to check for "lambdaness" and require a `toString()` 
analysis. We checked for `@` but that doesn't work for named steps within 
`order()` (when using `profile()`). That is, its error prone. I came up with a 
new way to check for lambdas that works for Java, Groovy, and Python/Jython. 
    
    @spmallette -- can you please verify that a "toString()" of a lambda in C# 
will hold as well for the pattern.
    
    VOTE +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1795

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/726.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #726
    
----
commit beae74c43505d1f7732f92a500dc58fc4b142af1
Author: Marko A. Rodriguez <okramma...@gmail.com>
Date:   2017-10-02T21:23:33Z

    fixed a bug in LambdaRestrictionStrategy where named @ steps were 
considered lambda. Came up with a different way to check lambdas in 
.toString(). Works for Groovy, Java, and Python.

----


> Getting Lambda  comparator message for .profile() step
> ------------------------------------------------------
>
>                 Key: TINKERPOP-1795
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1795
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.2.6
>            Reporter: Shaunak Das
>            Assignee: Marko A. Rodriguez
>            Priority: Minor
>
> Ran into this message when adding a .profile() step, even though Gremlin 
> query does not have any lambda steps:
> {code}
> gremlin> 
> g.V().has("Question","questionType","yes/no").in("has_question").order().by(inE("reviewed").values("rating").mean()).profile()
> The provided step contains a lambda comparator: 
> OrderGlobalStep([[[VertexStep(IN,[reviewed],edge), 
> PropertiesStep([rating],value), MeanGlobalStep@[~gremlin.profile]], incr]])
> Type ':help' or ':h' for help.
> Display stack trace? [yN]
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to