[4/4] tinkerpop git commit: TINKERPOP-1888: Extended `min()` and `max()` to support all comparable data types.
TINKERPOP-1888: Extended `min()` and `max()` to support all comparable data types. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/722d57d1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/722d57d1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/722d57d1 Branch: refs/heads/TINKERPOP-1888 Commit: 722d57d118eddff78281cd1301c6c18e36c2f1ec Parents: 55c5265 Author: Daniel Kuppitz Authored: Mon Apr 2 14:55:27 2018 -0700 Committer: Daniel Kuppitz Committed: Tue Apr 10 08:18:21 2018 -0700 -- CHANGELOG.asciidoc | 1 + docs/src/reference/the-traversal.asciidoc | 16 --- docs/src/upgrade/release-3.4.x.asciidoc | 33 + .../gremlin/process/traversal/Operator.java | 4 +- .../traversal/dsl/graph/GraphTraversal.java | 8 ++-- .../gremlin/process/traversal/dsl/graph/__.java | 8 ++-- .../traversal/step/map/MaxGlobalStep.java | 2 +- .../traversal/step/map/MaxLocalStep.java| 4 +- .../traversal/step/map/MinGlobalStep.java | 2 +- .../traversal/step/map/MinLocalStep.java| 4 +- .../tinkerpop/gremlin/util/NumberHelper.java| 26 ++ .../traversal/OperatorExceptionTest.java| 10 .../gremlin/process/traversal/OperatorTest.java | 7 ++- gremlin-test/features/map/Max.feature | 22 + gremlin-test/features/map/Min.feature | 22 + .../process/traversal/step/map/MaxTest.java | 42 +--- .../process/traversal/step/map/MinTest.java | 50 .../SparkStarBarrierInterceptor.java| 4 +- 18 files changed, 213 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/722d57d1/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index fcc96b2..7e029ad 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -25,6 +25,7 @@ NEED AND IMAGE This release also includes changes from <>. +* `min()` and `max()` now support all types implementing `Comparable`. * Change the `toString()` of `Path` to be standardized as other graph elements are. * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no elements being available. * Changed the order of `select()` scopes. The order is now: maps, side-effects, paths. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/722d57d1/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index dcda556..6f1b22b 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -1471,16 +1471,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem [[max-step]] === Max Step -The `max()`-step (*map*) operates on a stream of numbers and determines which is the largest number in the stream. +The `max()`-step (*map*) operates on a stream of comparable objects and determines which is the last object according to its natural order in the stream. [gremlin-groovy,modern] g.V().values('age').max() g.V().repeat(both()).times(3).values('age').max() +g.V().values('name').max() IMPORTANT: `max(local)` determines the max of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-type objects. For any other object, a max of `Double.NaN` is returned. +This works for `Collection` and `Comparable`-type objects. *Additional References* @@ -1504,7 +1505,7 @@ g.V().repeat(both()).times(3).values('age').dedup().mean() thus altering the average. IMPORTANT: `mean(local)` determines the mean of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-type objects. For any other object, a mean of `Double.NaN` is returned. +This works for `Collection` and `Number`-type objects. *Additional References* @@ -1515,16 +1516,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem [[min-step]] === Min Step -The `min()`-step (*map*) operates on a stream of numbers and determines which is the smallest number in the stream. +The `min()`-step (*map*) operates on a stream of comparable objects and determines which is the first object according to its natural order in the stream. [gremlin-groovy,modern] g.V().values('age').min() g.V().repeat(both()).times(3).values('age').min() +g.V().values('name').min() IMPORTANT: `min(local)` determines the min of the current, local object (not the objects in the trave
tinkerpop git commit: TINKERPOP-1888: Extended `min()` and `max()` to support all comparable data types.
Repository: tinkerpop Updated Branches: refs/heads/master 55c526511 -> 722d57d11 TINKERPOP-1888: Extended `min()` and `max()` to support all comparable data types. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/722d57d1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/722d57d1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/722d57d1 Branch: refs/heads/master Commit: 722d57d118eddff78281cd1301c6c18e36c2f1ec Parents: 55c5265 Author: Daniel Kuppitz Authored: Mon Apr 2 14:55:27 2018 -0700 Committer: Daniel Kuppitz Committed: Tue Apr 10 08:18:21 2018 -0700 -- CHANGELOG.asciidoc | 1 + docs/src/reference/the-traversal.asciidoc | 16 --- docs/src/upgrade/release-3.4.x.asciidoc | 33 + .../gremlin/process/traversal/Operator.java | 4 +- .../traversal/dsl/graph/GraphTraversal.java | 8 ++-- .../gremlin/process/traversal/dsl/graph/__.java | 8 ++-- .../traversal/step/map/MaxGlobalStep.java | 2 +- .../traversal/step/map/MaxLocalStep.java| 4 +- .../traversal/step/map/MinGlobalStep.java | 2 +- .../traversal/step/map/MinLocalStep.java| 4 +- .../tinkerpop/gremlin/util/NumberHelper.java| 26 ++ .../traversal/OperatorExceptionTest.java| 10 .../gremlin/process/traversal/OperatorTest.java | 7 ++- gremlin-test/features/map/Max.feature | 22 + gremlin-test/features/map/Min.feature | 22 + .../process/traversal/step/map/MaxTest.java | 42 +--- .../process/traversal/step/map/MinTest.java | 50 .../SparkStarBarrierInterceptor.java| 4 +- 18 files changed, 213 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/722d57d1/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index fcc96b2..7e029ad 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -25,6 +25,7 @@ NEED AND IMAGE This release also includes changes from <>. +* `min()` and `max()` now support all types implementing `Comparable`. * Change the `toString()` of `Path` to be standardized as other graph elements are. * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no elements being available. * Changed the order of `select()` scopes. The order is now: maps, side-effects, paths. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/722d57d1/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index dcda556..6f1b22b 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -1471,16 +1471,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem [[max-step]] === Max Step -The `max()`-step (*map*) operates on a stream of numbers and determines which is the largest number in the stream. +The `max()`-step (*map*) operates on a stream of comparable objects and determines which is the last object according to its natural order in the stream. [gremlin-groovy,modern] g.V().values('age').max() g.V().repeat(both()).times(3).values('age').max() +g.V().values('name').max() IMPORTANT: `max(local)` determines the max of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-type objects. For any other object, a max of `Double.NaN` is returned. +This works for `Collection` and `Comparable`-type objects. *Additional References* @@ -1504,7 +1505,7 @@ g.V().repeat(both()).times(3).values('age').dedup().mean() thus altering the average. IMPORTANT: `mean(local)` determines the mean of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-type objects. For any other object, a mean of `Double.NaN` is returned. +This works for `Collection` and `Number`-type objects. *Additional References* @@ -1515,16 +1516,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem [[min-step]] === Min Step -The `min()`-step (*map*) operates on a stream of numbers and determines which is the smallest number in the stream. +The `min()`-step (*map*) operates on a stream of comparable objects and determines which is the first object according to its natural order in the stream. [gremlin-groovy,modern] g.V().values('age').min() g.V().repeat(both()).times(3).values('age').min() +g.V().values('name').min() IMPORTANT: `min(local)` d
[23/24] tinkerpop git commit: TINKERPOP-1888: Extended `min()` and `max()` to support all comparable data types.
TINKERPOP-1888: Extended `min()` and `max()` to support all comparable data types. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/a1b0ed6e Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a1b0ed6e Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a1b0ed6e Branch: refs/heads/TINKERPOP-1888 Commit: a1b0ed6e8f3a1904a9ff98eabea5f0cbd78d3de3 Parents: 46b743d Author: Daniel Kuppitz Authored: Mon Apr 2 14:55:27 2018 -0700 Committer: Daniel Kuppitz Committed: Mon Apr 9 08:55:56 2018 -0700 -- CHANGELOG.asciidoc | 1 + docs/src/reference/the-traversal.asciidoc | 16 --- docs/src/upgrade/release-3.4.x.asciidoc | 33 + .../gremlin/process/traversal/Operator.java | 4 +- .../traversal/dsl/graph/GraphTraversal.java | 8 ++-- .../gremlin/process/traversal/dsl/graph/__.java | 8 ++-- .../traversal/step/map/MaxGlobalStep.java | 2 +- .../traversal/step/map/MaxLocalStep.java| 4 +- .../traversal/step/map/MinGlobalStep.java | 2 +- .../traversal/step/map/MinLocalStep.java| 4 +- .../tinkerpop/gremlin/util/NumberHelper.java| 26 ++ .../traversal/OperatorExceptionTest.java| 10 .../gremlin/process/traversal/OperatorTest.java | 7 ++- gremlin-test/features/map/Max.feature | 22 + gremlin-test/features/map/Min.feature | 22 + .../process/traversal/step/map/MaxTest.java | 42 +--- .../process/traversal/step/map/MinTest.java | 50 .../SparkStarBarrierInterceptor.java| 4 +- 18 files changed, 213 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1b0ed6e/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index fcc96b2..7e029ad 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -25,6 +25,7 @@ NEED AND IMAGE This release also includes changes from <>. +* `min()` and `max()` now support all types implementing `Comparable`. * Change the `toString()` of `Path` to be standardized as other graph elements are. * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no elements being available. * Changed the order of `select()` scopes. The order is now: maps, side-effects, paths. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1b0ed6e/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index 1bba5ac..ea2d09a 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -1471,16 +1471,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem [[max-step]] === Max Step -The `max()`-step (*map*) operates on a stream of numbers and determines which is the largest number in the stream. +The `max()`-step (*map*) operates on a stream of comparable objects and determines which is the largest object in the stream. [gremlin-groovy,modern] g.V().values('age').max() g.V().repeat(both()).times(3).values('age').max() +g.V().values('name').max() IMPORTANT: `max(local)` determines the max of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-type objects. For any other object, a max of `Double.NaN` is returned. +This works for `Collection` and `Comparable`-type objects. *Additional References* @@ -1504,7 +1505,7 @@ g.V().repeat(both()).times(3).values('age').dedup().mean() thus altering the average. IMPORTANT: `mean(local)` determines the mean of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-type objects. For any other object, a mean of `Double.NaN` is returned. +This works for `Collection` and `Number`-type objects. *Additional References* @@ -1515,16 +1516,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem [[min-step]] === Min Step -The `min()`-step (*map*) operates on a stream of numbers and determines which is the smallest number in the stream. +The `min()`-step (*map*) operates on a stream of comparable objects and determines which is the smallest object in the stream. [gremlin-groovy,modern] g.V().values('age').min() g.V().repeat(both()).times(3).values('age').min() +g.V().values('name').min() IMPORTANT: `min(local)` determines the min of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-typ
[16/16] tinkerpop git commit: TINKERPOP-1888: Extended `min()` and `max()` to support all comparable data types.
TINKERPOP-1888: Extended `min()` and `max()` to support all comparable data types. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/20d76775 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/20d76775 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/20d76775 Branch: refs/heads/TINKERPOP-1888 Commit: 20d7677579b84e8a39b6eec8f19bd8150d4c860c Parents: c14aa30 Author: Daniel Kuppitz Authored: Mon Apr 2 14:55:27 2018 -0700 Committer: Daniel Kuppitz Committed: Wed Apr 4 07:33:40 2018 -0700 -- CHANGELOG.asciidoc | 1 + docs/src/reference/the-traversal.asciidoc | 16 --- docs/src/upgrade/release-3.4.x.asciidoc | 33 + .../gremlin/process/traversal/Operator.java | 4 +- .../traversal/dsl/graph/GraphTraversal.java | 8 ++-- .../gremlin/process/traversal/dsl/graph/__.java | 8 ++-- .../traversal/step/map/MaxGlobalStep.java | 2 +- .../traversal/step/map/MaxLocalStep.java| 4 +- .../traversal/step/map/MinGlobalStep.java | 2 +- .../traversal/step/map/MinLocalStep.java| 4 +- .../tinkerpop/gremlin/util/NumberHelper.java| 26 ++ .../traversal/OperatorExceptionTest.java| 10 .../gremlin/process/traversal/OperatorTest.java | 7 ++- gremlin-test/features/map/Max.feature | 22 + gremlin-test/features/map/Min.feature | 22 + .../process/traversal/step/map/MaxTest.java | 42 +--- .../process/traversal/step/map/MinTest.java | 50 .../SparkStarBarrierInterceptor.java| 4 +- 18 files changed, 213 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/20d76775/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index fcc96b2..7e029ad 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -25,6 +25,7 @@ NEED AND IMAGE This release also includes changes from <>. +* `min()` and `max()` now support all types implementing `Comparable`. * Change the `toString()` of `Path` to be standardized as other graph elements are. * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no elements being available. * Changed the order of `select()` scopes. The order is now: maps, side-effects, paths. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/20d76775/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index 1bba5ac..ea2d09a 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -1471,16 +1471,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem [[max-step]] === Max Step -The `max()`-step (*map*) operates on a stream of numbers and determines which is the largest number in the stream. +The `max()`-step (*map*) operates on a stream of comparable objects and determines which is the largest object in the stream. [gremlin-groovy,modern] g.V().values('age').max() g.V().repeat(both()).times(3).values('age').max() +g.V().values('name').max() IMPORTANT: `max(local)` determines the max of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-type objects. For any other object, a max of `Double.NaN` is returned. +This works for `Collection` and `Comparable`-type objects. *Additional References* @@ -1504,7 +1505,7 @@ g.V().repeat(both()).times(3).values('age').dedup().mean() thus altering the average. IMPORTANT: `mean(local)` determines the mean of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-type objects. For any other object, a mean of `Double.NaN` is returned. +This works for `Collection` and `Number`-type objects. *Additional References* @@ -1515,16 +1516,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem [[min-step]] === Min Step -The `min()`-step (*map*) operates on a stream of numbers and determines which is the smallest number in the stream. +The `min()`-step (*map*) operates on a stream of comparable objects and determines which is the smallest object in the stream. [gremlin-groovy,modern] g.V().values('age').min() g.V().repeat(both()).times(3).values('age').min() +g.V().values('name').min() IMPORTANT: `min(local)` determines the min of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-typ
tinkerpop git commit: TINKERPOP-1888: Extended `min()` and `max()` to support all comparable data types.
Repository: tinkerpop Updated Branches: refs/heads/TINKERPOP-1888 [created] 5265e3a5c TINKERPOP-1888: Extended `min()` and `max()` to support all comparable data types. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5265e3a5 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5265e3a5 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5265e3a5 Branch: refs/heads/TINKERPOP-1888 Commit: 5265e3a5c756b3649c91b15d74a5213858d2929f Parents: 986588b Author: Daniel Kuppitz Authored: Mon Apr 2 14:55:27 2018 -0700 Committer: Daniel Kuppitz Committed: Mon Apr 2 14:55:27 2018 -0700 -- CHANGELOG.asciidoc | 1 + docs/src/reference/the-traversal.asciidoc | 16 --- .../gremlin/process/traversal/Operator.java | 4 +- .../traversal/dsl/graph/GraphTraversal.java | 8 ++-- .../gremlin/process/traversal/dsl/graph/__.java | 8 ++-- .../traversal/step/map/MaxGlobalStep.java | 2 +- .../traversal/step/map/MaxLocalStep.java| 4 +- .../traversal/step/map/MinGlobalStep.java | 2 +- .../traversal/step/map/MinLocalStep.java| 4 +- .../tinkerpop/gremlin/util/NumberHelper.java| 26 ++ .../traversal/OperatorExceptionTest.java| 10 .../gremlin/process/traversal/OperatorTest.java | 7 ++- gremlin-test/features/map/Max.feature | 22 + gremlin-test/features/map/Min.feature | 22 + .../process/traversal/step/map/MaxTest.java | 42 +--- .../process/traversal/step/map/MinTest.java | 50 .../SparkStarBarrierInterceptor.java| 4 +- 17 files changed, 180 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5265e3a5/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 000eaa6..8e1a2bc 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -25,6 +25,7 @@ NEED AND IMAGE This release also includes changes from <>. +* `min()` and `max()` now support all types implementing `Comparable`. * Change the `toString()` of `Path` to be standardized as other graph elements are. * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no elements being available. * Changed the order of `select()` scopes. The order is now: maps, side-effects, paths. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5265e3a5/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index 1bba5ac..ea2d09a 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -1471,16 +1471,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem [[max-step]] === Max Step -The `max()`-step (*map*) operates on a stream of numbers and determines which is the largest number in the stream. +The `max()`-step (*map*) operates on a stream of comparable objects and determines which is the largest object in the stream. [gremlin-groovy,modern] g.V().values('age').max() g.V().repeat(both()).times(3).values('age').max() +g.V().values('name').max() IMPORTANT: `max(local)` determines the max of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-type objects. For any other object, a max of `Double.NaN` is returned. +This works for `Collection` and `Comparable`-type objects. *Additional References* @@ -1504,7 +1505,7 @@ g.V().repeat(both()).times(3).values('age').dedup().mean() thus altering the average. IMPORTANT: `mean(local)` determines the mean of the current, local object (not the objects in the traversal stream). -This works for `Collection` and `Number`-type objects. For any other object, a mean of `Double.NaN` is returned. +This works for `Collection` and `Number`-type objects. *Additional References* @@ -1515,16 +1516,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem [[min-step]] === Min Step -The `min()`-step (*map*) operates on a stream of numbers and determines which is the smallest number in the stream. +The `min()`-step (*map*) operates on a stream of comparable objects and determines which is the smallest object in the stream. [gremlin-groovy,modern] g.V().values('age').min() g.V().repeat(both()).times(3).values('age').min() +g.V().values('name').min() IMPORTANT: `min(local)` determines the min of the current, local object (not the objects in the traversal stream). -This works for `Collec