You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by okram <gi...@git.apache.org> on 2015/11/23 23:30:26 UTC

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-941: Improve error me...

GitHub user okram opened a pull request:

    https://github.com/apache/incubator-tinkerpop/pull/155

    TINKERPOP3-941: Improve error message for wrong order().by() arguments

    https://issues.apache.org/jira/browse/TINKERPOP3-941
    
    Instead of fixing the error message, I simply made it such that if you don't provide a comparator, it assumes you mean `Order.incr`. Added a test for both `OrderLocalStep` and `OrderGlobalStep` that demonstrate things working. Finally, I also realized we didn't have a proper `clone()` method for `OrderLobalStep`. Eek! Added it.
    
    Ran `mvn clean install` and `SparkGraphComputerIntegrationTest` (for `OrderTest` only) and all is golden.
    
    VOTE +1.


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

    $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP3-941

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

    https://github.com/apache/incubator-tinkerpop/pull/155.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 #155
    
----
commit 5231a7195fc8bdcecff89e7c4e965cf173883c65
Author: Marko A. Rodriguez <ok...@gmail.com>
Date:   2015-11-23T22:27:21Z

    added support for order().by('age'). If you don't provide a Comparator, Order.incr is assumed. Thus, no more error message about OrderGlobalStep.addComparator(). Also, the test case I added demonstrated that TINKERPOP3-979 passes with Spark... uh...thus, the ticket is invalid. I don't know what caused the Spark error I got. Will close that ticket.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-941: Improve error me...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-tinkerpop/pull/155


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-941: Improve error me...

Posted by dkuppitz <gi...@git.apache.org>.
Github user dkuppitz commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/155#issuecomment-159115077
  
    Manually tested in OLTP and OLAP. I couldn't find any issues.
    
    VOTE: +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-941: Improve error me...

Posted by twilmes <gi...@git.apache.org>.
Github user twilmes commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/155#issuecomment-159129937
  
    D'argh, party foul.  Got it, thanks.
    
    VOTE +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-941: Improve error me...

Posted by PommeVerte <gi...@git.apache.org>.
Github user PommeVerte commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/155#issuecomment-159306403
  
    Like that you made it incr by default. VOTE: +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-941: Improve error me...

Posted by twilmes <gi...@git.apache.org>.
Github user twilmes commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/155#issuecomment-159109545
  
    Tests all ran fine.  I did run into an issue trying the decr behavior.  Query with modern graph was:
    ```
    gremlin> g.V().hasLabel("person").order().by("age", valueDecr)
    java.lang.Integer cannot be cast to java.util.Map$Entry
    Display stack trace? [yN] y
    java.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.Map$Entry
    	at org.apache.tinkerpop.gremlin.process.traversal.Order$6.compare(Order.java:83)
    	at org.apache.tinkerpop.gremlin.process.traversal.step.util.ElementValueComparator.compare(ElementValueComparator.java:49)
    	at org.apache.tinkerpop.gremlin.process.traversal.step.util.ElementValueComparator.compare(ElementValueComparator.java:29)
    	at org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderGlobalStep$ComparatorTraverser.compare(OrderGlobalStep.java:123)
    	at org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderGlobalStep$ComparatorTraverser.compare(OrderGlobalStep.java:113)
    	at org.apache.tinkerpop.gremlin.util.function.ChainedComparator.compare(ChainedComparator.java:42)
    ```
    
    It works if I do `order(local)` but I expected it to behave the same way your test for the incrementing version worked `g.V().hasLabel("person").order().by("age")`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP3-941: Improve error me...

Posted by okram <gi...@git.apache.org>.
Github user okram commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/155#issuecomment-159116456
  
    @twilmes  --- its `by('age',decr)`. `valueDecr` is for Maps.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---