[jira] [Commented] (TINKERPOP-1873) min() and max() work only in the range of Integer values

2018-01-30 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

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


> 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(99).min()}}
> returns 2147483647 instead of 99.
> {{g.V(0).values().inject(-99).max()}}
> returns -2147483648 instead of -99.
> 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)


[jira] [Commented] (TINKERPOP-1873) min() and max() work only in the range of Integer values

2018-01-30 Thread ASF GitHub Bot (JIRA)

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

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

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/786
  
Rebased, tests added and `CHANGELOG` updated. Functionally nothing really 
changed, hence I don't think we need to revote. Going to merge this in 1-2 
hours.


> 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(99).min()}}
> returns 2147483647 instead of 99.
> {{g.V(0).values().inject(-99).max()}}
> returns -2147483648 instead of -99.
> 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)


[jira] [Commented] (TINKERPOP-1873) min() and max() work only in the range of Integer values

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

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

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/786
  
Huh, weird, wonder why it worked for me, must have been a pretty old branch 
that was active when I tested it. But no big deal, I will retarget the PR once 
I added some tests.


> 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(99).min()}}
> returns 2147483647 instead of 99.
> {{g.V(0).values().inject(-99).max()}}
> returns -2147483648 instead of -99.
> 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)


[jira] [Commented] (TINKERPOP-1873) min() and max() work only in the range of Integer values

2018-01-29 Thread ASF GitHub Bot (JIRA)

[ 
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(99).min()
==>2147483647
gremlin> g.V(0).values().inject(-99).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(99).min()
==>2147483647
gremlin> g.V(0).values().inject(-99).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(99).min()}}
> returns 2147483647 instead of 99.
> {{g.V(0).values().inject(-99).max()}}
> returns -2147483648 instead of -99.
> 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)


[jira] [Commented] (TINKERPOP-1873) min() and max() work only in the range of Integer values

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/786
  
If you want to add the tests as part of this PR, that's fine - seems like 
we should just have some for this thing. also, you need a changelog entry.

VOTE +1


> 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(99).min()}}
> returns 2147483647 instead of 99.
> {{g.V(0).values().inject(-99).max()}}
> returns -2147483648 instead of -99.
> 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)


[jira] [Commented] (TINKERPOP-1873) min() and max() work only in the range of Integer values

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

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

Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/786
  
I tried to reproduce it on a `tp32` and this issue didn't show up.

> also, do we not have a set of unit tests for `NumberHelper`? that's 
weird, no?

Yeah, I can add those. Want me to do it as part of this PR?


> 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(99).min()}}
> returns 2147483647 instead of 99.
> {{g.V(0).values().inject(-99).max()}}
> returns -2147483648 instead of -99.
> 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)


[jira] [Commented] (TINKERPOP-1873) min() and max() work only in the range of Integer values

2018-01-29 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/786
  
@dkuppitz i noticed that you wrote that this was not an issue on tp32 - can 
you explain why? 

also, do we not have a set of unit tests for `NumberHelper`? that's weird, 
no?


> 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(99).min()}}
> returns 2147483647 instead of 99.
> {{g.V(0).values().inject(-99).max()}}
> returns -2147483648 instead of -99.
> 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)


[jira] [Commented] (TINKERPOP-1873) min() and max() work only in the range of Integer values

2018-01-24 Thread ASF GitHub Bot (JIRA)

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

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

Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/786
  
VOTE +1


> 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(99).min()}}
> returns 2147483647 instead of 99.
> {{g.V(0).values().inject(-99).max()}}
> returns -2147483648 instead of -99.
> 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)


[jira] [Commented] (TINKERPOP-1873) min() and max() work only in the range of Integer values

2018-01-20 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user dkuppitz opened a pull request:

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

https://issues.apache.org/jira/browse/TINKERPOP-1873



Made the reducer for `min()` and `max()` not depend on an Integer seed 
value. It now uses `Double.NaN` again, but `Double.NaN` also got some special 
handling in `NumberHelper`, so that results for the reducing steps are not 
forced to be of type `Double`.

```
$ docker/build.sh -t -i
...
[INFO] 

[INFO] Reactor Summary:
[INFO] 
[INFO] Apache TinkerPop ... SUCCESS [02:18 
min]
[INFO] Apache TinkerPop :: Gremlin Shaded . SUCCESS [ 
21.891 s]
[INFO] Apache TinkerPop :: Gremlin Core ... SUCCESS [01:26 
min]
[INFO] Apache TinkerPop :: Gremlin Test ... SUCCESS [ 
12.415 s]
[INFO] Apache TinkerPop :: TinkerGraph Gremlin  SUCCESS [04:54 
min]
[INFO] Apache TinkerPop :: Gremlin Groovy . SUCCESS [06:38 
min]
[INFO] Apache TinkerPop :: Gremlin Driver . SUCCESS [01:32 
min]
[INFO] Apache TinkerPop :: Neo4j Gremlin .. SUCCESS [  
2.254 s]
[INFO] Apache TinkerPop :: Gremlin Server . SUCCESS [20:40 
min]
[INFO] Apache TinkerPop :: Gremlin Python . SUCCESS [02:56 
min]
[INFO] Apache TinkerPop :: Gremlin.Net  SUCCESS [  
8.125 s]
[INFO] Apache TinkerPop :: Gremlin.Net - Source ... SUCCESS [01:25 
min]
[INFO] Apache TinkerPop :: Gremlin.Net - Tests  SUCCESS [01:39 
min]
[INFO] Apache TinkerPop :: Hadoop Gremlin . SUCCESS [43:51 
min]
[INFO] Apache TinkerPop :: Spark Gremlin .. SUCCESS [29:59 
min]
[INFO] Apache TinkerPop :: Giraph Gremlin . SUCCESS [  
01:32 h]
[INFO] Apache TinkerPop :: Gremlin Console  SUCCESS [05:07 
min]
[INFO] Apache TinkerPop :: Gremlin Archetype .. SUCCESS [  
0.276 s]
[INFO] Apache TinkerPop :: Archetype - TinkerGraph  SUCCESS [ 
37.653 s]
[INFO] Apache TinkerPop :: Archetype - Server . SUCCESS [ 
23.353 s]
[INFO] Apache TinkerPop :: Archetype - DSL  SUCCESS [ 
10.614 s]
[INFO] Apache TinkerPop :: Gremlin Tools .. SUCCESS [  
0.665 s]
[INFO] Apache TinkerPop :: Gremlin Benchmark .. SUCCESS [  
9.298 s]
[INFO] Apache TinkerPop :: Gremlin Coverage ... SUCCESS [  
1.239 s]
[INFO] Apache TinkerPop :: Gremlin IO Test  SUCCESS [  
7.817 s]
[INFO] 

[INFO] BUILD SUCCESS
[INFO] 

[INFO] Total time: 03:37 h
[INFO] Finished at: 2018-01-20T14:35:57+00:00
[INFO] Final Memory: 196M/1606M
[INFO] 

```

VOTE: +1

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

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

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

https://github.com/apache/tinkerpop/pull/786.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 #786


commit 404d115b7066c53d14a36776c8a374e1bad5dfbb
Author: Daniel Kuppitz 
Date:   2018-01-21T00:50:55Z

Made the reducer for `min()` and `max()` not depend on an Integer seed 
value. It now uses `Double.NaN` again, but `Double.NaN`
also got some special handling in `NumberHelper`, so that results for the 
reducing steps are not forced to be of type `Double`.




> 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(99).min()}}
> returns 2147483647 instead of 99.
> {{g.V(0).values().inject(-99).max()}}
> returns -2147483648 instead of -99.

[jira] [Commented] (TINKERPOP-1873) min() and max() work only in the range of Integer values

2018-01-19 Thread Daniel Kuppitz (JIRA)

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

Daniel Kuppitz commented on TINKERPOP-1873:
---

For the protocol: not an issue in {{tp32/}}.

> 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(99).min()}}
> returns 2147483647 instead of 99.
> {{g.V(0).values().inject(-99).max()}}
> returns -2147483648 instead of -99.
> 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)