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

Daniel Kuppitz commented on TINKERPOP-1753:
-------------------------------------------

This was your original traversal, right?

{noformat}
top_5_of_some_long_value_sorted =
  
g.V().hasLabel("people").group().by("some_long_id").by(outE("knows").values("some_long_value").sum())
    .order(local).by(values, decr) // Adding this clause causes 
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
    .limit(local, 5)
{noformat}

The problem is that {{sum()}} on an empty iterator is going to throw a 0 
Integer into the mix. You shouldn't get real {{null}} values anywhere (unless 
you have something like {{constant(null)}}).

> OrderStep not able to order by non-integer numbers
> --------------------------------------------------
>
>                 Key: TINKERPOP-1753
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1753
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.2.5
>            Reporter: Daniel Kuppitz
>            Assignee: Daniel Kuppitz
>
> {{order()}} and {{order(local)}} sometimes fail to sort by non-integer 
> numbers. In some cases it works, but the following pattern (non-integer map 
> values?) seems broken:
> {noformat}
> gremlin> 
> g.V().hasLabel("person").group().by("name").by(outE().values("weight").sum()).order(local).by(values)
> java.lang.Double cannot be cast to java.lang.Integer
> Type ':help' or ':h' for help.
> Display stack trace? [yN]
> {noformat}



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

Reply via email to