{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-tinkerpop/issues/155","labels_url":"https://api.github.com/repos/apache/incubator-tinkerpop/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-tinkerpop/issues/155/comments","events_url":"https://api.github.com/repos/apache/incubator-tinkerpop/issues/155/events","html_url":"https://github.com/apache/incubator-tinkerpop/pull/155","id":118488193,"number":155,"title":"TINKERPOP3-941: Improve error message for wrong order().by() arguments","user":{"login":"okram","id":148925,"avatar_url":"https://avatars.githubusercontent.com/u/148925?v=3","gravatar_id":"","url":"https://api.github.com/users/okram","html_url":"https://github.com/okram","followers_url":"https://api.github.com/users/okram/followers","following_url":"https://api.github.com/users/okram/following{/other_user}","gists_url":"https://api.github.com/users/okram/gists{/gist_id}","starred_url":"https://api.github.com/users/okram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okram/subscriptions","organizations_url":"https://api.github.com/users/okram/orgs","repos_url":"https://api.github.com/users/okram/repos","events_url":"https://api.github.com/users/okram/events{/privacy}","received_events_url":"https://api.github.com/users/okram/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-23T22:30:24Z","updated_at":"2015-11-24T00:06:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/incubator-tinkerpop/pulls/155","html_url":"https://github.com/apache/incubator-tinkerpop/pull/155","diff_url":"https://github.com/apache/incubator-tinkerpop/pull/155.diff","patch_url":"https://github.com/apache/incubator-tinkerpop/pull/155.patch"},"body":"https://issues.apache.org/jira/browse/TINKERPOP3-941\r\n\r\nInstead 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.\r\n\r\nRan `mvn clean install` and `SparkGraphComputerIntegrationTest` (for `OrderTest` only) and all is golden.\r\n\r\nVOTE +1.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/incubator-tinkerpop/issues/comments/159109545","html_url":"https://github.com/apache/incubator-tinkerpop/pull/155#issuecomment-159109545","issue_url":"https://api.github.com/repos/apache/incubator-tinkerpop/issues/155","id":159109545,"user":{"login":"twilmes","id":4722637,"avatar_url":"https://avatars.githubusercontent.com/u/4722637?v=3","gravatar_id":"","url":"https://api.github.com/users/twilmes","html_url":"https://github.com/twilmes","followers_url":"https://api.github.com/users/twilmes/followers","following_url":"https://api.github.com/users/twilmes/following{/other_user}","gists_url":"https://api.github.com/users/twilmes/gists{/gist_id}","starred_url":"https://api.github.com/users/twilmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twilmes/subscriptions","organizations_url":"https://api.github.com/users/twilmes/orgs","repos_url":"https://api.github.com/users/twilmes/repos","events_url":"https://api.github.com/users/twilmes/events{/privacy}","received_events_url":"https://api.github.com/users/twilmes/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T00:06:04Z","updated_at":"2015-11-24T00:06:04Z","body":"Tests all ran fine.  I did run into an issue trying the decr behavior.  Query with modern graph was:\r\n```\r\ngremlin> g.V().hasLabel(\"person\").order().by(\"age\", valueDecr)\r\njava.lang.Integer cannot be cast to java.util.Map$Entry\r\nDisplay stack trace? [yN] y\r\njava.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.Map$Entry\r\n\tat org.apache.tinkerpop.gremlin.process.traversal.Order$6.compare(Order.java:83)\r\n\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ElementValueComparator.compare(ElementValueComparator.java:49)\r\n\tat org.apache.tinkerpop.gremlin.process.traversal.step.util.ElementValueComparator.compare(ElementValueComparator.java:29)\r\n\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderGlobalStep$ComparatorTraverser.compare(OrderGlobalStep.java:123)\r\n\tat org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderGlobalStep$ComparatorTraverser.compare(OrderGlobalStep.java:113)\r\n\tat org.apache.tinkerpop.gremlin.util.function.ChainedComparator.compare(ChainedComparator.java:42)\r\n```\r\n\r\nIt 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\")`"}}