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

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

Github user robertdale commented on the issue:

    https://github.com/apache/tinkerpop/pull/786
  
    Hmm... Looks like it is reproducible on tp32.
    
    ## 3.2.7
    ```
    apache-tinkerpop-gremlin-console-3.2.7]$ ./bin/gremlin.sh 
    
             \,,,/
             (o o)
    -----oOOo-(3)-oOOo-----
    plugin activated: tinkerpop.server
    plugin activated: tinkerpop.utilities
    plugin activated: tinkerpop.tinkergraph
    gremlin> graph = TinkerFactory.createModern()
    ==>tinkergraph[vertices:6 edges:6]
    gremlin> g = graph.traversal()
    ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
    gremlin> g.V(0).values().inject(9999999999).min()
    ==>2147483647
    gremlin> g.V(0).values().inject(-9999999999).max()
    ==>-2147483648
    ```
    
    ## 3.2.8-SNAPSHOT
    ```
    apache-tinkerpop-gremlin-console-3.2.8-SNAPSHOT-standalone]$ 
./bin/gremlin.sh 
    
             \,,,/
             (o o)
    -----oOOo-(3)-oOOo-----
    plugin activated: tinkerpop.server
    plugin activated: tinkerpop.utilities
    plugin activated: tinkerpop.tinkergraph
    gremlin> graph = TinkerFactory.createModern()
    ==>tinkergraph[vertices:6 edges:6]
    gremlin> g = graph.traversal()
    ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
    gremlin> g.V(0).values().inject(9999999999).min()
    ==>2147483647
    gremlin> g.V(0).values().inject(-9999999999).max()
    ==>-2147483648
    ```


> min() and max() work only in the range of Integer values
> --------------------------------------------------------
>
>                 Key: TINKERPOP-1873
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1873
>             Project: TinkerPop
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>            Reporter: Rado Kozmer
>            Assignee: Daniel Kuppitz
>            Priority: Major
>
> Following examples show the problem. The Min and Max steps are seeded with 
> Integer.MIN_VALUE and Integer.MAX_VALUE. This is not high/low enough for long 
> and double values.
> {{g.V(0).values().inject(9999999999).min()}}
> returns 2147483647 instead of 9999999999.
> {{g.V(0).values().inject(-9999999999).max()}}
> returns -2147483648 instead of -9999999999.
> Extremes like -Double.MAX_VALUE and Double.MAX_VALUE should solve the 
> problem, but I see some casting issues in the MinGlobalStep, MaxGlobalStep, 
> MinLocalStep, MaxLocalStep.
> Can anybody help with this?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to