[GitHub] tinkerpop pull request #947: TINKERPOP-2055 Support NaN and Infinity in Grap...

2018-10-04 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] tinkerpop pull request #947: TINKERPOP-2055 Support NaN and Infinity in Grap...

2018-10-04 Thread spmallette
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


---


[GitHub] tinkerpop pull request #947: TINKERPOP-2055 Support NaN and Infinity in Grap...

2018-10-04 Thread FlorianHockmann
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?


---


[GitHub] tinkerpop pull request #947: TINKERPOP-2055 Support NaN and Infinity in Grap...

2018-10-03 Thread spmallette
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




---