[jira] [Commented] (TINKERPOP-2055) Provide support for special number cases like Infinity in GraphSON

2018-10-04 Thread ASF GitHub Bot (JIRA)


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

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

Github user asfgit closed the pull request at:

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


> Provide support for special number cases like Infinity in GraphSON
> --
>
> Key: TINKERPOP-2055
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2055
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: io
>Affects Versions: 3.2.9
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
> Fix For: 3.4.0, 3.3.4, 3.2.10
>
>
> GraphSON currently doesn't handle: {{Double.Nan}}, 
> {{Double.NEGATIVE_INFINITY}} or {{Double.POSITIVE_INFINITY}} because it has a 
> custom {{Double}} serializer that ignores those cases in GraphSON 2.0 and 
> 3.0. Not going to try to solve this for 1.0.



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


[jira] [Commented] (TINKERPOP-2055) Provide support for special number cases like Infinity in GraphSON

2018-10-04 Thread ASF GitHub Bot (JIRA)


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

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

Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/947#discussion_r222757984
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
 ---
@@ -46,6 +46,30 @@ describe('GraphSONReader', function () {
   assert.strictEqual(result, item[1]);
 });
   });
+  it('should parse GraphSON Nan from GraphSON', function () {
+  const reader = new GraphSONReader();
+  var result = reader.read({
+"@type": "g:Double",
+"@value": "NaN"
+  });
+  assert.ok(isNaN(result));
+  });
+  it('should parse GraphSON -Infinity and Nan from GraphSON', function () {
--- End diff --

just missed the capitlization in that string. i can fix it


> Provide support for special number cases like Infinity in GraphSON
> --
>
> Key: TINKERPOP-2055
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2055
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: io
>Affects Versions: 3.2.9
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
>
> GraphSON currently doesn't handle: {{Double.Nan}}, 
> {{Double.NEGATIVE_INFINITY}} or {{Double.POSITIVE_INFINITY}} because it has a 
> custom {{Double}} serializer that ignores those cases in GraphSON 2.0 and 
> 3.0. Not going to try to solve this for 1.0.



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


[jira] [Commented] (TINKERPOP-2055) Provide support for special number cases like Infinity in GraphSON

2018-10-04 Thread ASF GitHub Bot (JIRA)


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

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

Github user FlorianHockmann commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/947#discussion_r222751451
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
 ---
@@ -46,6 +46,30 @@ describe('GraphSONReader', function () {
   assert.strictEqual(result, item[1]);
 });
   });
+  it('should parse GraphSON Nan from GraphSON', function () {
+  const reader = new GraphSONReader();
+  var result = reader.read({
+"@type": "g:Double",
+"@value": "NaN"
+  });
+  assert.ok(isNaN(result));
+  });
+  it('should parse GraphSON -Infinity and Nan from GraphSON', function () {
--- End diff --

Just a minor nit but why does it say _and Nan_ when only `-Infinity` is 
tested here?


> Provide support for special number cases like Infinity in GraphSON
> --
>
> Key: TINKERPOP-2055
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2055
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: io
>Affects Versions: 3.2.9
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
>
> GraphSON currently doesn't handle: {{Double.Nan}}, 
> {{Double.NEGATIVE_INFINITY}} or {{Double.POSITIVE_INFINITY}} because it has a 
> custom {{Double}} serializer that ignores those cases in GraphSON 2.0 and 
> 3.0. Not going to try to solve this for 1.0.



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


[jira] [Commented] (TINKERPOP-2055) Provide support for special number cases like Infinity in GraphSON

2018-10-04 Thread ASF GitHub Bot (JIRA)


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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/947
  
Stephen "The Polyglot"

VOTE +1


> Provide support for special number cases like Infinity in GraphSON
> --
>
> Key: TINKERPOP-2055
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2055
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: io
>Affects Versions: 3.2.9
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
>
> GraphSON currently doesn't handle: {{Double.Nan}}, 
> {{Double.NEGATIVE_INFINITY}} or {{Double.POSITIVE_INFINITY}} because it has a 
> custom {{Double}} serializer that ignores those cases in GraphSON 2.0 and 
> 3.0. Not going to try to solve this for 1.0.



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


[jira] [Commented] (TINKERPOP-2055) Provide support for special number cases like Infinity in GraphSON

2018-10-03 Thread ASF GitHub Bot (JIRA)


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

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

GitHub user spmallette opened a pull request:

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

TINKERPOP-2055 Support NaN and Infinity in GraphSON

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

GraphSON wasn't supporting NaN and Infinity but Gryo was. Merging to tp33 
and forward will require some additional commits for GraphSON 3.0.

All tests pass with `docker/build.sh -t -n -i`

VOTE +1

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

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

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

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


commit afc12bd27bc9c4c26b3ba2594c4c0810d5d76421
Author: Stephen Mallette 
Date:   2018-10-02T19:35:53Z

TINKERPOP-2055 Added support for special Double values

Includes Nan and the infinity values.

commit 854914e6e3adbf7f0854eb0fec0c3a38b61d4644
Author: Stephen Mallette 
Date:   2018-10-02T20:55:50Z

TINKERPOP-2055 Support for special numbers in python

commit 2d3041f226310379c966214461c79cf47432f4c9
Author: Stephen Mallette 
Date:   2018-10-03T08:33:40Z

TINKERPOP-2055 Added special number handling in javascript

commit b542027825fe905c0c46b81a00fe7dfd5275e8c6
Author: Stephen Mallette 
Date:   2018-10-03T09:11:56Z

TINKERPOP-2055 Added tests for .Net on special numbers

commit a083fbff62fcc38a3dae9b138f56b0d052e0c143
Author: Stephen Mallette 
Date:   2018-10-03T09:30:27Z

TINKERPOP-2055 Updated IO docs to include special numbers




> Provide support for special number cases like Infinity in GraphSON
> --
>
> Key: TINKERPOP-2055
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2055
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: io
>Affects Versions: 3.2.9
>Reporter: stephen mallette
>Assignee: stephen mallette
>Priority: Minor
>
> GraphSON currently doesn't handle: {{Double.Nan}}, 
> {{Double.NEGATIVE_INFINITY}} or {{Double.POSITIVE_INFINITY}} because it has a 
> custom {{Double}} serializer that ignores those cases in GraphSON 2.0 and 
> 3.0. Not going to try to solve this for 1.0.



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