[tinkerpop] 01/01: Merge branch '3.6-dev'
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 6c0254f205f15f3a65c6ba1ddc7db6f1c6c5299d Merge: 50b43d8ba9 5bf274b03e Author: Stephen Mallette AuthorDate: Mon Oct 23 08:34:18 2023 -0400 Merge branch '3.6-dev'
[tinkerpop] branch master updated (50b43d8ba9 -> 6c0254f205)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 50b43d8ba9 Merge branch '3.6-dev' add 5bf274b03e Loosen assertion for error message on mergeE a bit CTR new 6c0254f205 Merge branch '3.6-dev' The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes:
[tinkerpop] branch 3.6-dev updated (10d498f338 -> 5bf274b03e)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 10d498f338 [TINKERPOP-3006] Enable remote connection over HTTP for gremlin python (#2283) add 5bf274b03e Loosen assertion for error message on mergeE a bit CTR No new revisions were added by this update. Summary of changes: .../apache/tinkerpop/gremlin/test/features/map/MergeEdge.feature| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
[tinkerpop] branch master updated: Loosen assertion for error message on mergeE a bit CTR
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/master by this push: new 357e307ec5 Loosen assertion for error message on mergeE a bit CTR new 50b43d8ba9 Merge branch '3.6-dev' 357e307ec5 is described below commit 357e307ec569fd2971ca17af63c7595bf68e69fa Author: Stephen Mallette AuthorDate: Mon Oct 23 08:33:21 2023 -0400 Loosen assertion for error message on mergeE a bit CTR --- .../apache/tinkerpop/gremlin/test/features/map/MergeEdge.feature| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/MergeEdge.feature b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/MergeEdge.feature index 791f427aa2..ae30e00f9f 100644 --- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/MergeEdge.feature +++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/MergeEdge.feature @@ -206,7 +206,7 @@ Feature: Step - mergeE() g.mergeE([:]) """ When iterated to list -Then the traversal will raise an error with message containing text of "Out Vertex not specified in onCreate - edge cannot be created" +Then the traversal will raise an error with message containing text of "Out Vertex not specified" Scenario: g_V_mergeEXemptyX_two_exist Given the empty graph @@ -237,7 +237,7 @@ Feature: Step - mergeE() g.mergeE(null) """ When iterated to list -Then the traversal will raise an error with message containing text of "Out Vertex not specified in onCreate - edge cannot be created" +Then the traversal will raise an error with message containing text of "Out Vertex not specified" # Directions not specified Scenario: g_V_mergeEXnullX @@ -251,7 +251,7 @@ Feature: Step - mergeE() g.V().mergeE(null) """ When iterated to list -Then the traversal will raise an error with message containing text of "Out Vertex not specified in onCreate - edge cannot be created" +Then the traversal will raise an error with message containing text of "Out Vertex not specified" Scenario: g_mergeEXlabel_knows_out_marko_in_vadasX Given the empty graph
[tinkerpop] branch dependabot/npm_and_yarn/gremlin-javascript/src/main/javascript/gremlin-javascript/3.5-dev/eslint-8.52.0 created (now b1e1611a26)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/npm_and_yarn/gremlin-javascript/src/main/javascript/gremlin-javascript/3.5-dev/eslint-8.52.0 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git at b1e1611a26 Bump eslint No new revisions were added by this update.
[PR] Bump eslint from 8.51.0 to 8.52.0 in /gremlin-javascript/src/main/javascript/gremlin-javascript [tinkerpop]
dependabot[bot] opened a new pull request, #2305: URL: https://github.com/apache/tinkerpop/pull/2305 Bumps [eslint](https://github.com/eslint/eslint) from 8.51.0 to 8.52.0. Release notes Sourced from https://github.com/eslint/eslint/releases";>eslint's releases. v8.52.0 Features https://github.com/eslint/eslint/commit/70648ee49c07f7b533d09f6bf8a5291e5a5a8601";>70648ee feat: report-unused-disable-directive to report unused eslint-enable (https://redirect.github.com/eslint/eslint/issues/17611";>#17611) (Yosuke Ota) Bug Fixes https://github.com/eslint/eslint/commit/5de9637fc925729a83d5a5e9e868a41792a184e3";>5de9637 fix: Ensure shared references in rule configs are separated (https://redirect.github.com/eslint/eslint/issues/17666";>#17666) (Nicholas C. Zakas) https://github.com/eslint/eslint/commit/dcfe5739c374c9d7ed21f14027870ec0fd453661";>dcfe573 fix: add preceding semicolon in suggestions of no-object-constructor (https://redirect.github.com/eslint/eslint/issues/17649";>#17649) (Francesco Trotta) Documentation https://github.com/eslint/eslint/commit/476d58a584d5d2db003c4c22ffee90e63566164d";>476d58a docs: Add note about invalid CLI flags when using flat config. (https://redirect.github.com/eslint/eslint/issues/17664";>#17664) (Nicholas C. Zakas) https://github.com/eslint/eslint/commit/660ed3afd128ad529234a855345629982caf1bc7";>660ed3a docs: Plugin flat config migration guide (https://redirect.github.com/eslint/eslint/issues/17640";>#17640) (Nicholas C. Zakas) https://github.com/eslint/eslint/commit/a58aa200fccedae7e2e9b6129246f2cedab14f8d";>a58aa20 docs: fix examples for several rules (https://redirect.github.com/eslint/eslint/issues/17645";>#17645) (Milos Djermanovic) https://github.com/eslint/eslint/commit/179929bd46892f18f2aef0c159d5cc361cb69987";>179929b docs: Remove trailing newline from the code of Playground links (https://redirect.github.com/eslint/eslint/issues/17641";>#17641) (Francesco Trotta) https://github.com/eslint/eslint/commit/f8e5c30636450d4a8baf51f0e227685e6d77ac64";>f8e5c30 docs: Update README (GitHub Actions Bot) https://github.com/eslint/eslint/commit/b7ef2f34fe12b68a366e1b4bf5f64d7332c6e72e";>b7ef2f3 docs: Enable pretty code formatter output (https://redirect.github.com/eslint/eslint/issues/17635";>#17635) (Nicholas C. Zakas) https://github.com/eslint/eslint/commit/0bcb9a8db608a3d0bd2645f99e0707b9a9bbaaf0";>0bcb9a8 docs: Fix syntax errors in rule examples (https://redirect.github.com/eslint/eslint/issues/17633";>#17633) (Francesco Trotta) https://github.com/eslint/eslint/commit/61b90839633ef300ac7707a651f65f532e65f42d";>61b9083 docs: Make no-continue example code work (https://redirect.github.com/eslint/eslint/issues/17643";>#17643) (Zhongyuan Zhou) https://github.com/eslint/eslint/commit/9fafe450c31ed9b6bdd9dcd6c115255943b8c1c2";>9fafe45 docs: upgrade to 11ty 2.0 (https://redirect.github.com/eslint/eslint/issues/17632";>#17632) (Percy Ma) https://github.com/eslint/eslint/commit/ff8e4bf327b5c92b0623b0fc5f8f101954f785db";>ff8e4bf docs: Update README (GitHub Actions Bot) https://github.com/eslint/eslint/commit/fab249ae6addac2ee18cd81cee80916010bb469e";>fab249a docs: Update README (GitHub Actions Bot) https://github.com/eslint/eslint/commit/392305bf4797e3ebc696dfca48bd874741fca845";>392305b docs: Update no-irregular-whitespace and fix examples (https://redirect.github.com/eslint/eslint/issues/17626";>#17626) (Francesco Trotta) https://github.com/eslint/eslint/commit/6b8acfb770589f3941df41c3910d3b8ffc3e1e45";>6b8acfb docs: Add real whitespace to no-trailing-spaces examples (https://redirect.github.com/eslint/eslint/issues/17630";>#17630) (Francesco Trotta) https://github.com/eslint/eslint/commit/1000187e00949332babcee4d37d46c96a6a554a8";>1000187 docs: Fix examples in unicode-bom (https://redirect.github.com/eslint/eslint/issues/17631";>#17631) (Francesco Trotta) https://github.com/eslint/eslint/commit/000290c4c923cc1473e21b4bdbdc0c42765ef7dd";>000290c docs: Update README (GitHub Actions Bot) Chores https://github.com/eslint/eslint/commit/6d1f0c2da0309c06c21149b8d71a8f439a70d7e8";>6d1f0c2 chore: upgrade @eslint/jshttps://github.com/8";>@8.52.0 (https://redirect.github.com/eslint/eslint/issues/17671";>#17671) (Milos Djermanovic) https://github.com/eslint/eslint/commit/d63d4fe0942e6747ab60e758aa36076f43041a30";>d63d4fe chore: package.json update for @eslint/js release (ESLint Jenkins) https://github.com/eslint/eslint/commit/f30cefee6bda2789ede18e1664b84c2638ea1bb5";>f30cefe test: fix FlatESLint tests for caching (https://redirect.github.com/eslint/eslint/issues/17658";>#17658) (Milos Djermanovic) https://github.com/eslint/eslint/commit/ef650cb612510bcfa1379c1f0af56dd563b3a705";>ef650cb test: update tests for no-promise-executor-return (https://redirect.github.com/eslint/eslint/issues/17661";>#17661) (Milos Djermanovic)
Re: [PR] Bump eslint from 8.51.0 to 8.52.0 in /gremlin-javascript/src/main/javascript/gremlin-javascript [tinkerpop]
codecov-commenter commented on PR #2305: URL: https://github.com/apache/tinkerpop/pull/2305#issuecomment-1775426455 ## [Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/2305?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report > Merging [#2305](https://app.codecov.io/gh/apache/tinkerpop/pull/2305?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (b1e1611) into [3.5-dev](https://app.codecov.io/gh/apache/tinkerpop/commit/9fe95f8d29556ca916786929b45eddab9f9d2cfe?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (9fe95f8) will **decrease** coverage by `0.07%`. > The diff coverage is `n/a`. ```diff @@ Coverage Diff @@ ## 3.5-dev#2305 +/- ## = - Coverage 69.95% 69.89% -0.07% + Complexity 9032 9022 -10 = Files866 866 Lines 4106841068 Branches5476 5476 = - Hits 2872928704 -25 - Misses 1043810460 +22 - Partials1901 1904 +3 ``` [see 6 files with indirect coverage changes](https://app.codecov.io/gh/apache/tinkerpop/pull/2305/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
vkagamlyk commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1368944918 ## docs/src/reference/the-traversal.asciidoc: ## @@ -3759,12 +3885,14 @@ link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gre [[reverse-step]] === Reverse Step -The `reverse()`-step (*map*) returns a reversed string of the incoming string traverser. Null values are not processed and remain -as null when returned. If the incoming traverser is a non-String value then an `IllegalArgumentException` will be thrown. +The `reverse()`-step (*map*) returns a reversed of the incoming list traverser. Single values (including null) are not +processed and are added back to the Traversal Stream unchanged. If the incoming traverser is a String value then the +reversed String will be returned. [gremlin-groovy,modern] g.V().values("name").reverse() +g.V().values("name").fold().reverse() Review Comment: good to add <1>/<2> and explain difference -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[tinkerpop] 01/02: Merge branch 'TINKERPOP-2811' into 3.6-dev
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 0a28c8fedc3d3656d808032096d9755ddc981e45 Merge: 5bf274b03e 8663ca7e6b Author: Stephen Mallette AuthorDate: Mon Oct 23 12:04:22 2023 -0400 Merge branch 'TINKERPOP-2811' into 3.6-dev CHANGELOG.asciidoc | 1 + .../process/traversal/strategy/decoration/ElementIdStrategy.java | 7 --- .../strategy/decoration/ElementIdStrategyProcessTest.java| 9 - 3 files changed, 13 insertions(+), 4 deletions(-)
[tinkerpop] 02/02: Merge branch '3.6-dev'
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit f6c15b3d096c55fb98982812fa8ff41fe01b1324 Merge: 6c0254f205 0a28c8fedc Author: Stephen Mallette AuthorDate: Mon Oct 23 12:25:35 2023 -0400 Merge branch '3.6-dev' CHANGELOG.asciidoc | 1 + .../process/traversal/strategy/decoration/ElementIdStrategy.java | 7 --- .../strategy/decoration/ElementIdStrategyProcessTest.java| 9 - 3 files changed, 13 insertions(+), 4 deletions(-)
[tinkerpop] branch master updated (6c0254f205 -> f6c15b3d09)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 6c0254f205 Merge branch '3.6-dev' add 8663ca7e6b TINKERPOP-2811 Fixed bug with hasId() order for ElementIdStrategy new 0a28c8fedc Merge branch 'TINKERPOP-2811' into 3.6-dev new f6c15b3d09 Merge branch '3.6-dev' The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 1 + .../process/traversal/strategy/decoration/ElementIdStrategy.java | 7 --- .../strategy/decoration/ElementIdStrategyProcessTest.java| 9 - 3 files changed, 13 insertions(+), 4 deletions(-)
Re: [PR] TINKERPOP-2811 Fixed bug with hasId() order for ElementIdStrategy [tinkerpop]
spmallette merged PR #2293: URL: https://github.com/apache/tinkerpop/pull/2293 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[tinkerpop] branch 3.6-dev updated (5bf274b03e -> 0a28c8fedc)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 5bf274b03e Loosen assertion for error message on mergeE a bit CTR add 8663ca7e6b TINKERPOP-2811 Fixed bug with hasId() order for ElementIdStrategy add 0a28c8fedc Merge branch 'TINKERPOP-2811' into 3.6-dev No new revisions were added by this update. Summary of changes: CHANGELOG.asciidoc | 1 + .../process/traversal/strategy/decoration/ElementIdStrategy.java | 7 --- .../strategy/decoration/ElementIdStrategyProcessTest.java| 9 - 3 files changed, 13 insertions(+), 4 deletions(-)
[tinkerpop] branch TINKERPOP-2811 deleted (was 8663ca7e6b)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch TINKERPOP-2811 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git was 8663ca7e6b TINKERPOP-2811 Fixed bug with hasId() order for ElementIdStrategy The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
vkagamlyk commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1368947896 ## docs/src/upgrade/release-3.7.x.asciidoc: ## @@ -225,11 +226,34 @@ gremlin> g.V().values("age").fold().all(P.gt(10)) ==>[29,27,32,35] gremlin> g.V().values("age").fold().any(P.eq(32)) ==>[29,27,32,35] +gremlin> g.V().values("age").fold().product(__.V().values("age").limit(2).fold()) +==>[[29,29],[29,27],[27,29],[27,27],[32,29],[32,27],[35,29],[35,27]] +gremlin> g.V().values("age").fold().merge([32,30,50]) +==>[32,50,35,27,29,30] +gremlin> g.V().values("age").fold().combine([32,30,50]) +==>[29,27,32,35,32,30,50] +gremlin> g.V().values("age").fold().intersect([32,30,50]) +==>[32] +gremlin> g.V().values("age").fold().disjunct([32,30,50]) +==>[50,35,27,29,30] +gremlin> g.V().values("age").fold().difference([32,30,50]) +==>[35,27,29] +gremlin> g.V().values("age").order().by(desc).fold().reverse() +==>[27,29,32,35] +gremlin> g.V().values("age").fold().join("-") Review Comment: `join` or `conjoin`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
vkagamlyk commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1368952470 ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java: ## @@ -1672,6 +1678,90 @@ public default GraphTraversal dateDiff(final Traversal dateTra return this.asAdmin().addStep(new DateDiffStep<>(this.asAdmin(), dateTraversal)); } +/** + * Calculates the difference between the list traverser and list argument. + * + * @return the traversal with an appended {@link DifferenceStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#difference-step"; target="_blank">Reference Documentation - Difference Step + * @since 3.7.1 + */ +public default GraphTraversal> difference(final Object values) { +this.asAdmin().getBytecode().addStep(Symbols.difference, values); +return this.asAdmin().addStep(new DifferenceStep<>(this.asAdmin(), values)); +} + +/** + * Calculates the disjunction between the list traverser and list argument. + * + * @return the traversal with an appended {@link DisjunctStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#disjunct-step"; target="_blank">Reference Documentation - Disjunct Step + * @since 3.7.1 + */ +public default GraphTraversal> disjunct(final Object values) { +this.asAdmin().getBytecode().addStep(Symbols.disjunct, values); +return this.asAdmin().addStep(new DisjunctStep<>(this.asAdmin(), values)); +} + +/** + * Calculates the intersection between the list traverser and list argument. + * + * @return the traversal with an appended {@link IntersectStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#intersect-step"; target="_blank">Reference Documentation - Intersect Step + * @since 3.7.1 + */ +public default GraphTraversal> intersect(final Object values) { +this.asAdmin().getBytecode().addStep(Symbols.intersect, values); +return this.asAdmin().addStep(new IntersectStep<>(this.asAdmin(), values)); +} + +/** + * Joins together the elements of the incoming list traverser together with the provided delimiter. + * + * @return the traversal with an appended {@link ConjoinStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#join-step"; target="_blank">Reference Documentation - Join Step Review Comment: `join` not replaced with `conjoin` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
vkagamlyk commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1368952470 ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java: ## @@ -1672,6 +1678,90 @@ public default GraphTraversal dateDiff(final Traversal dateTra return this.asAdmin().addStep(new DateDiffStep<>(this.asAdmin(), dateTraversal)); } +/** + * Calculates the difference between the list traverser and list argument. + * + * @return the traversal with an appended {@link DifferenceStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#difference-step"; target="_blank">Reference Documentation - Difference Step + * @since 3.7.1 + */ +public default GraphTraversal> difference(final Object values) { +this.asAdmin().getBytecode().addStep(Symbols.difference, values); +return this.asAdmin().addStep(new DifferenceStep<>(this.asAdmin(), values)); +} + +/** + * Calculates the disjunction between the list traverser and list argument. + * + * @return the traversal with an appended {@link DisjunctStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#disjunct-step"; target="_blank">Reference Documentation - Disjunct Step + * @since 3.7.1 + */ +public default GraphTraversal> disjunct(final Object values) { +this.asAdmin().getBytecode().addStep(Symbols.disjunct, values); +return this.asAdmin().addStep(new DisjunctStep<>(this.asAdmin(), values)); +} + +/** + * Calculates the intersection between the list traverser and list argument. + * + * @return the traversal with an appended {@link IntersectStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#intersect-step"; target="_blank">Reference Documentation - Intersect Step + * @since 3.7.1 + */ +public default GraphTraversal> intersect(final Object values) { +this.asAdmin().getBytecode().addStep(Symbols.intersect, values); +return this.asAdmin().addStep(new IntersectStep<>(this.asAdmin(), values)); +} + +/** + * Joins together the elements of the incoming list traverser together with the provided delimiter. + * + * @return the traversal with an appended {@link ConjoinStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#join-step"; target="_blank">Reference Documentation - Join Step Review Comment: `join` is not replaced with `conjoin` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
vkagamlyk commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1368965002 ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConjoinStep.java: ## @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.process.traversal.step.map; + +import org.apache.tinkerpop.gremlin.process.traversal.Traversal; +import org.apache.tinkerpop.gremlin.process.traversal.Traverser; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; +import org.apache.tinkerpop.gremlin.process.traversal.util.ListFunction; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +/** + * A map step that returns the result of joining every element in the traverser using the delimiter argument. + */ +public final class ConjoinStep extends ScalarMapStep implements ListFunction { Review Comment: do we need to override `toString()` for some steps? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
vkagamlyk commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1368980624 ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/TraversalMergeStep.java: ## @@ -0,0 +1,132 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.process.traversal.step.map; + +import org.apache.tinkerpop.gremlin.process.traversal.Traversal; +import org.apache.tinkerpop.gremlin.process.traversal.Traverser; +import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; +import org.apache.tinkerpop.gremlin.process.traversal.util.ListFunction; +import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil; +import org.apache.tinkerpop.gremlin.structure.util.StringFactory; +import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * A map step that returns the merger of the traverser and the provided arguments without duplicates. This is commonly + * known as a union. + */ +public final class TraversalMergeStep extends ScalarMapStep implements TraversalParent, ListFunction { +private Traversal.Admin valueTraversal; +private Object parameterItems; +public TraversalMergeStep(final Traversal.Admin traversal, final Object values) { +super(traversal); + +if (values instanceof Traversal) { +valueTraversal = integrateChild(((Traversal) values).asAdmin()); +} else { +parameterItems = values; +} +} + +@Override +public String getStepName() { return "merge"; } + +@Override +protected E map(final Traverser.Admin traverser) { +S incoming = traverser.get(); Review Comment: nit: `final` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
vkagamlyk commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1368982131 ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/TraversalMergeStep.java: ## @@ -0,0 +1,132 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.process.traversal.step.map; + +import org.apache.tinkerpop.gremlin.process.traversal.Traversal; +import org.apache.tinkerpop.gremlin.process.traversal.Traverser; +import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; +import org.apache.tinkerpop.gremlin.process.traversal.util.ListFunction; +import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil; +import org.apache.tinkerpop.gremlin.structure.util.StringFactory; +import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * A map step that returns the merger of the traverser and the provided arguments without duplicates. This is commonly + * known as a union. + */ +public final class TraversalMergeStep extends ScalarMapStep implements TraversalParent, ListFunction { +private Traversal.Admin valueTraversal; +private Object parameterItems; +public TraversalMergeStep(final Traversal.Admin traversal, final Object values) { +super(traversal); + +if (values instanceof Traversal) { +valueTraversal = integrateChild(((Traversal) values).asAdmin()); +} else { +parameterItems = values; +} +} + +@Override +public String getStepName() { return "merge"; } + +@Override +protected E map(final Traverser.Admin traverser) { +S incoming = traverser.get(); + +Map mapA = (incoming instanceof Map) ? (Map) incoming : null; +if (mapA != null) { +final Object mapB = (valueTraversal != null) ? TraversalUtil.apply(traverser, valueTraversal) : parameterItems; +if (!(mapB instanceof Map)) { +throw new IllegalArgumentException( +String.format( +"%s step expected provided argument to evaluate to a Map, encountered %s", +getStepName(), +mapB.getClass())); +} + +final Map mergedMap = new HashMap(mapA); +mergedMap.putAll((Map) mapB); +return (E) mergedMap; +} else { +final Collection listA = convertTraverserToCollection(traverser); + +if (parameterItems instanceof Map) { +throw new IllegalArgumentException(getStepName() + " step type mismatch: expected argument to be Iterable but got Map"); +} +final Collection listB = +(null != valueTraversal) +? convertTraversalToCollection(traverser, valueTraversal) +: convertArgumentToCollection(parameterItems); + +final Set elements = new HashSet(); + +elements.addAll(listA); +elements.addAll(listB); + +return (E) elements; +} +} + +@Override +public List> getLocalChildren() { +return (null == valueTraversal) ? Collections.emptyList() : Collections.singletonList(valueTraversal); +} + +@Override +public Set getRequirements() { return this.getSelfAndChildRequirements(); } + +@Override +public void setTraversal(final Traversal.Admin parentTraversal) { +super.setTraversal(parentTraversal); +if (valueTraversal != null) { this.integrateChild(this.valueTraversal); } +} + +@Override +public TraversalMergeStep clone() { +final TraversalMergeStep clone = (TraversalMergeStep) super.clone(); +if (null != this.valueTrave
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
vkagamlyk commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1368990078 ## gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConjoinStepTest.java: ## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.process.traversal.step.map; + +import org.apache.tinkerpop.gremlin.process.traversal.Traversal; +import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__; +import org.apache.tinkerpop.gremlin.process.traversal.step.StepTest; +import org.junit.Test; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +public class ConjoinStepTest extends StepTest { +@Override +protected List getTraversals() { return Collections.singletonList(__.conjoin("a")); } + +@Test +public void testReturnTypes() { +try { +__.__(Collections.emptyList()).conjoin(null).next(); Review Comment: nit ```suggestion __.__(Collections.emptyList()).conjoin(null).next(); fail(); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
Cole-Greer commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1367395931 ## docs/src/dev/provider/gremlin-semantics.asciidoc: ## @@ -725,6 +725,42 @@ link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/o link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/service/ServiceRegistry.java[ServiceRegistry], link:https://tinkerpop.apache.org/docs/x.y.z/reference/#call-step[reference] +[[combine-step]] +=== combine() + +*Description:* Appends one list to the other and returns the result to the Traversal Stream. + +*Syntax:* `combine(Object)` + +[width="100%",options="header"] +|= +|Start Step |Mid Step |Modulated |Domain |Range +|N |Y |N |`array`/`Iterable` |`List` +|= + +*Arguments:* + +* `Object` - A list of items (as an Iterable or an array) a traversal that will produce a list of items. Review Comment: ```suggestion * `Object` - A list of items (as an Iterable or an array), or a traversal that will produce a list of items. ``` ## docs/src/dev/provider/gremlin-semantics.asciidoc: ## @@ -725,6 +725,42 @@ link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/o link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/service/ServiceRegistry.java[ServiceRegistry], link:https://tinkerpop.apache.org/docs/x.y.z/reference/#call-step[reference] +[[combine-step]] +=== combine() + +*Description:* Appends one list to the other and returns the result to the Traversal Stream. + +*Syntax:* `combine(Object)` + +[width="100%",options="header"] +|= +|Start Step |Mid Step |Modulated |Domain |Range +|N |Y |N |`array`/`Iterable` |`List` +|= + +*Arguments:* + +* `Object` - A list of items (as an Iterable or an array) a traversal that will produce a list of items. + +*Modulation:* + +None + +*Considerations:* + +A list is returned after the combine operation is applied so duplicates are allowed. `Merge` can be used instead if +duplicates aren't wanted. This step only applies to list types which means that non-iterable types (including null) +will cause exceptions to be thrown. + +*Exceptions* + +* If the incoming traverser isn't a list (array or Iterable) then an `IllegalArgumentException` will be thrown. +* If the argument doesn't resolve to a list (array or Iterable) then an `IllegalArgumentException` will be thrown. + +See: link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/CombineStep.java[source], +link:https://tinkerpop.apache.org/docs/x.y.z/reference/#combine-step[reference], +link:https://tinkerpop.apache.org/docs/x.y.z/reference/#merge-step[reference], Review Comment: Is the link to the merge reference docs intended here? If so can we change the hyperlink name to something else such as: ```suggestion link:https://tinkerpop.apache.org/docs/x.y.z/reference/#merge-step[merge() reference] ``` ## docs/src/reference/the-traversal.asciidoc: ## @@ -1140,6 +1140,24 @@ g.V().coin(1.0) link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#coin-double-++[`coin(double)`] +[[combine-step]] +=== Combine Step + +The `combine()`-step (*map*) combines the elements of the incoming list traverser and the provided list argument into +one list. This is also known as appending or concatenating. This step only expects list data (array or Iterable) and +will throw an `IllegalArgumentException` if any other type is encountered (including null). This differs from the +`merge` step in that it allows duplicates to exist. + +[gremlin-groovy,modern] + +g.V().values("name").fold().combine(["james","jen","marko","vadas"]) Review Comment: Could you add one example for each step which uses a child traversal as the argument? It would be good to showcase that capability as well. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump eslint from 8.51.0 to 8.52.0 in /gremlin-javascript/src/main/javascript/gremlin-javascript [tinkerpop]
Cole-Greer merged PR #2305: URL: https://github.com/apache/tinkerpop/pull/2305 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[tinkerpop] branch dependabot/npm_and_yarn/gremlin-javascript/src/main/javascript/gremlin-javascript/3.5-dev/eslint-8.52.0 deleted (was b1e1611a26)
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a change to branch dependabot/npm_and_yarn/gremlin-javascript/src/main/javascript/gremlin-javascript/3.5-dev/eslint-8.52.0 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git was b1e1611a26 Bump eslint The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[tinkerpop] branch 3.5-dev updated: Bump eslint (#2305)
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch 3.5-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/3.5-dev by this push: new 861455d0ca Bump eslint (#2305) 861455d0ca is described below commit 861455d0ca9a0cda57c60f3dc6947fb42d551bf8 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Mon Oct 23 10:11:41 2023 -0700 Bump eslint (#2305) Bumps [eslint](https://github.com/eslint/eslint) from 8.51.0 to 8.52.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.51.0...v8.52.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../gremlin-javascript/package-lock.json | 74 +- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json b/gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json index 99f587ec3b..91ac55e968 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json @@ -130,21 +130,21 @@ } }, "node_modules/@eslint/js": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.51.0.tgz";, - "integrity": "sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz";, + "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz";, - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz";, + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "dependencies": { -"@humanwhocodes/object-schema": "^1.2.1", +"@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", "minimatch": "^3.0.5" }, @@ -166,9 +166,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz";, - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz";, + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "node_modules/@nodelib/fs.scandir": { @@ -254,6 +254,12 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, +"node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz";, + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true +}, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz";, @@ -1134,18 +1140,19 @@ } }, "node_modules/eslint": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.51.0.tgz";, - "integrity": "sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz";, + "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/e
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
vkagamlyk commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1369004507 ## gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Combine.feature: ## @@ -0,0 +1,240 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +@StepClassMap @StepCombine +Feature: Step - combine() + + @GraphComputerVerificationInjectionNotSupported + Scenario: g_injectXnullX_combineXinjectX1XX +Given the empty graph +And the traversal of + """ + g.inject(null).combine(__.inject(1)) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "Incoming traverser for combine step can't be null" + + @GraphComputerVerificationInjectionNotSupported + Scenario: g_V_valuesXnameX_combineXV_foldX +Given the modern graph +And the traversal of + """ + g.V().values("name").combine(__.V().fold()) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "combine step can only take an array or an Iterable type for incoming traversers" + + Scenario: g_V_fold_combineXconstantXnullXX +Given the modern graph +And the traversal of + """ + g.V().fold().combine(__.constant(null)) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "traversal argument for combine step must yield an iterable type, not null" + + @GraphComputerVerificationMidVNotSupported + Scenario: g_V_fold_combineXVX +Given the modern graph +And the traversal of + """ + g.V().fold().combine(__.V()) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "traversal argument for combine step must yield an iterable type, encountered" + + Scenario: g_V_valuesXnameX_fold_combineX2X +Given the modern graph +And the traversal of + """ + g.V().values("name").fold().combine(2) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "combine step can only take an array or an Iterable as an argument, encountered" + + Scenario: g_V_valuesXnameX_fold_combineXnullX +Given the modern graph +And the traversal of + """ + g.V().values("name").fold().combine(null) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "Argument provided for combine step can't be null" + + @GraphComputerVerificationInjectionNotSupported + Scenario: g_V_valuesXnonexistantX_fold_combineXV_valuesXnameX_foldX +Given the modern graph +And the traversal of + """ + g.V().values("nonexistant").fold().combine(__.V().values("name").fold()) + """ +When iterated to list +Then the result should be unordered + | result | + | l[marko,vadas,lop,josh,ripple,peter] | + + @GraphComputerVerificationInjectionNotSupported + Scenario: g_V_valuesXnameX_fold_combineXV_valuesXnonexistantX_foldX +Given the modern graph +And the traversal of + """ + g.V().values("name").fold().combine(__.V().values("nonexistant").fold()) + """ +When iterated to list +Then the result should be unordered + | result | + | l[marko,vadas,lop,josh,ripple,peter] | + + @GraphComputerVerificationInjectionNotSupported Review Comment: For some tests this tag is redundant -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[tinkerpop] 01/01: Merge branch '3.5-dev' into 3.6-dev
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit ba9d023b752a13dc5eb157fd35af25dabd3e934a Merge: 0a28c8fedc 861455d0ca Author: Cole-Greer AuthorDate: Mon Oct 23 10:15:05 2023 -0700 Merge branch '3.5-dev' into 3.6-dev .../gremlin-javascript/package-lock.json | 74 +- 1 file changed, 44 insertions(+), 30 deletions(-) diff --cc gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json index d4d56aa079,91ac55e968..edbb1ee1f9 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json @@@ -248,6 -248,18 +248,12 @@@ "integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==", "dev": true }, -"node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz";, - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true -}, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz";, + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz";, @@@ -4535,6 -4598,18 +4542,12 @@@ "integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==", "dev": true }, -"@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz";, - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true -}, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz";, + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz";,
[tinkerpop] branch 3.6-dev updated (0a28c8fedc -> ba9d023b75)
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a change to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 0a28c8fedc Merge branch 'TINKERPOP-2811' into 3.6-dev add 861455d0ca Bump eslint (#2305) new ba9d023b75 Merge branch '3.5-dev' into 3.6-dev The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../gremlin-javascript/package-lock.json | 74 +- 1 file changed, 44 insertions(+), 30 deletions(-)
[tinkerpop] 01/01: Merge branch '3.6-dev'
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 9ddeb7e5cbc46ccf180d3a9fa7c92ef611866b34 Merge: f6c15b3d09 ba9d023b75 Author: Cole-Greer AuthorDate: Mon Oct 23 10:16:00 2023 -0700 Merge branch '3.6-dev' .../gremlin-javascript/package-lock.json | 74 +- 1 file changed, 44 insertions(+), 30 deletions(-)
[tinkerpop] branch master updated (f6c15b3d09 -> 9ddeb7e5cb)
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from f6c15b3d09 Merge branch '3.6-dev' add 861455d0ca Bump eslint (#2305) add ba9d023b75 Merge branch '3.5-dev' into 3.6-dev new 9ddeb7e5cb Merge branch '3.6-dev' The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../gremlin-javascript/package-lock.json | 74 +- 1 file changed, 44 insertions(+), 30 deletions(-)
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
xiazcy commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1369007819 ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/CombineStep.java: ## @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.process.traversal.step.map; + +import org.apache.tinkerpop.gremlin.process.traversal.Traversal; +import org.apache.tinkerpop.gremlin.process.traversal.Traverser; +import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; +import org.apache.tinkerpop.gremlin.process.traversal.util.ListFunction; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +/** + * A map step that returns the combination of the traverser and the provided arguments. This is also commonly known as + * concatenation or append. + */ +public final class CombineStep extends ScalarMapStep> implements TraversalParent, ListFunction { +private Traversal.Admin valueTraversal; +private Object parameterItems; + +public CombineStep(final Traversal.Admin traversal, final Object values) { +super(traversal); + +if (values instanceof Traversal) { +valueTraversal = integrateChild(((Traversal) values).asAdmin()); +} else { +parameterItems = values; +} +} + +@Override +public String getStepName() { return "combine"; } + +@Override +protected List map(Traverser.Admin traverser) { +final Collection listA = convertTraverserToCollection(traverser); +final Collection listB = (null != valueTraversal) ? convertTraversalToCollection(traverser, valueTraversal) : convertArgumentToCollection(parameterItems); + +final List combined = new ArrayList(listA); +combined.addAll(listB); + +return combined; +} + +@Override +public List> getLocalChildren() { +return (null == valueTraversal) ? Collections.emptyList() : Collections.singletonList(valueTraversal); +} + +@Override +public Set getRequirements() { return this.getSelfAndChildRequirements(); } Review Comment: I think you'd want to pass in the requirement for the self too? ```suggestion public Set getRequirements() { return this.getSelfAndChildRequirements(TraverserRequirement.OBJECT); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Fixed deserialization of element properties for GraphBinary [tinkerpop]
xiazcy commented on PR #2304: URL: https://github.com/apache/tinkerpop/pull/2304#issuecomment-1775692576 VOTE +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Remove meaningless test [tinkerpop]
xiazcy commented on PR #2303: URL: https://github.com/apache/tinkerpop/pull/2303#issuecomment-1775693291 VOTE +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Update concat() to accept traversal varargs [tinkerpop]
xiazcy opened a new pull request, #2306: URL: https://github.com/apache/tinkerpop/pull/2306 This updates concat to accept traversal varags and also corrected how it handles inject() child traversals. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[tinkerpop] branch master updated: remove meaningless test (#2303)
This is an automated email from the ASF dual-hosted git repository. valentyn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/master by this push: new 7716f565aa remove meaningless test (#2303) 7716f565aa is described below commit 7716f565aa233e86b590190e2cceffdd3277654c Author: Valentyn Kahamlyk AuthorDate: Mon Oct 23 12:22:19 2023 -0700 remove meaningless test (#2303) --- .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs| 1 - gremlin-go/driver/cucumber/gremlin.go | 1 - .../javascript/gremlin-javascript/test/cucumber/gremlin.js | 1 - gremlin-python/src/main/python/radish/gremlin.py | 1 - .../tinkerpop/gremlin/test/features/map/DateDiff.feature | 10 -- 5 files changed, 14 deletions(-) diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs index 657fc9f5f6..718d60d0f9 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs @@ -604,7 +604,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin {"g_injectXdatetimeXstrXX_dateAddXminute_10X", new List, ITraversal>> {(g,p) =>g.Inject(DateTimeOffset.FromUnixTimeMilliseconds(169093440)).DateAdd(DT.Minute,10)}}, {"g_injectXdatetimeXstrXX_dateAddXsecond_20X", new List, ITraversal>> {(g,p) =>g.Inject(DateTimeOffset.FromUnixTimeMilliseconds(169093440)).DateAdd(DT.Second,20)}}, {"g_injectXdatetimeXstrXX_dateAddXday_11X", new List, ITraversal>> {(g,p) =>g.Inject(DateTimeOffset.FromUnixTimeMilliseconds(169395840)).DateAdd(DT.Day,11)}}, - {"g_injectXdatetimeXXX_dateDiffXdatetimeXstrXX", new List, ITraversal>> {(g,p) =>g.Inject(DateTimeOffset.FromUnixTimeMilliseconds(1697808371721)).DateDiff(DateTimeOffset.FromUnixTimeMilliseconds(167348160)).Is(P.Gt(0))}}, {"g_injectXdatetimeXstr1XX_dateDiffXdatetimeXstr2XX", new List, ITraversal>> {(g,p) =>g.Inject(DateTimeOffset.FromUnixTimeMilliseconds(169093440)).DateDiff(DateTimeOffset.FromUnixTimeMilliseconds(169153920))}}, {"g_injectXdatetimeXstr1XX_dateDiffXinjectXdatetimeXstr2XXX", new List, ITraversal>> {(g,p) =>g.Inject(DateTimeOffset.FromUnixTimeMilliseconds(169145280)).DateDiff(__.Inject(DateTimeOffset.FromUnixTimeMilliseconds(169084800)))}}, {"g_V_EX11X", new List, ITraversal>> {(g,p) =>g.V().E(p["eid11"])}}, diff --git a/gremlin-go/driver/cucumber/gremlin.go b/gremlin-go/driver/cucumber/gremlin.go index 1d42e51d2e..b78f9629c0 100644 --- a/gremlin-go/driver/cucumber/gremlin.go +++ b/gremlin-go/driver/cucumber/gremlin.go @@ -575,7 +575,6 @@ var translationMap = map[string][]func(g *gremlingo.GraphTraversalSource, p map[ "g_injectXdatetimeXstrXX_dateAddXminute_10X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(time.UnixMilli(169093440)).DateAdd(gremlingo.DT.Minute, 10)}}, "g_injectXdatetimeXstrXX_dateAddXsecond_20X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(time.UnixMilli(169093440)).DateAdd(gremlingo.DT.Second, 20)}}, "g_injectXdatetimeXstrXX_dateAddXday_11X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(time.UnixMilli(169395840)).DateAdd(gremlingo.DT.Day, 11)}}, -"g_injectXdatetimeXXX_dateDiffXdatetimeXstrXX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(time.UnixMilli(1697808379990)).DateDiff(time.UnixMilli(167348160)).Is(gremlingo.P.Gt(0))}}, "g_injectXdatetimeXstr1XX_dateDiffXdatetimeXstr2XX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(time.UnixMilli(169093440)).DateDiff(time.UnixMilli(169153920))}}, "g_injectXdatetimeXstr1XX_dateDiffXinjectXdatetimeXstr2XXX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(time.UnixMilli(169145280)).DateDiff(gremlingo.T__.Inject(time.UnixMilli(169084800)))}}, "g_V_EX11X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().E(p["eid11"])}}, diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js index 9deec36034..2fff0455c8 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/t
Re: [PR] Remove meaningless test [tinkerpop]
vkagamlyk commented on PR #2303: URL: https://github.com/apache/tinkerpop/pull/2303#issuecomment-1775876612 VOTE +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Remove meaningless test [tinkerpop]
vkagamlyk merged PR #2303: URL: https://github.com/apache/tinkerpop/pull/2303 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [TINKERPOP-3008] Update concat() to accept traversal varargs [tinkerpop]
Cole-Greer commented on code in PR #2306: URL: https://github.com/apache/tinkerpop/pull/2306#discussion_r1369195143 ## docs/src/upgrade/release-3.7.x.asciidoc: ## @@ -30,7 +30,32 @@ complete list of all the modifications that are part of this release. === Upgrading for Users String Manipulation Steps -Additional String manipulation steps have been added to this version. +Modifications to the concat() step as well as additional String manipulation steps have been added to this version. + += Updates to concat(): +Concat has been modified to take traversal varargs instead of a single traversal. Users no longer have to chain +concat() steps together to concatenate multiple traversals: +[source,text] + +gremlin> g.V(1).outE().as("a").V(1).values("name").concat(select("a").label(), select("a").inV().values("name")) +==>markocreatedlop +==>markoknowsvadas +==>markoknowsjosh + + +A notable breaking change from 3.7.0 is that we have corrected the behavior of concat() to not special treat inject() +in arguments. The inject() step injects the incoming traverser as the first item in the stream by default. We mistakenly +skipped it and used its child traversal value in 3.7.0 based on false expectation of how inject behaves. The +behavior below is the expected outcome of inject in arguments. +[source,text] + +gremlin> g.inject("a").concat(inject()) +==>aa +gremlin> g.inject("a").concat(inject("b")) +==>aa + Review Comment: I don't think this needs to focus too much on implementation details or motivation. I would suggest shortening it and focusing on describing the differences. ```suggestion A notable breaking change from 3.7.0 is that we have output order of `inject()` as a child of `concat()` to be consistent with other parent steps. Any 3.7.0 uses of `concat(inject(X))` should change to `concat(constant(X))` to retain the old semantics. [source,text] // 3.7.0 gremlin> g.inject("a").concat(inject("b")) ==>ab // 3.7.1 gremlin> g.inject("a").concat(inject()) ==>aa gremlin> g.inject("a").concat(inject("b")) ==>aa gremlin> g.inject("a").concat(constant("b")) ==>ab ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [TINKERPOP-3008] Update concat() to accept traversal varargs [tinkerpop]
kenhuuu commented on PR #2306: URL: https://github.com/apache/tinkerpop/pull/2306#issuecomment-1775944519 VOTE +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Fixed deserialization of element properties for GraphBinary [tinkerpop]
vkagamlyk commented on PR #2304: URL: https://github.com/apache/tinkerpop/pull/2304#issuecomment-1776142106 VOTE +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Fixed deserialization of element properties for GraphBinary [tinkerpop]
vkagamlyk merged PR #2304: URL: https://github.com/apache/tinkerpop/pull/2304 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[tinkerpop] branch master updated: Fixed deserialization of element properties for GraphBinary (#2304)
This is an automated email from the ASF dual-hosted git repository. valentyn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/master by this push: new e5a337bde6 Fixed deserialization of element properties for GraphBinary (#2304) e5a337bde6 is described below commit e5a337bde6777202a533c5585cb1046ce78fd017 Author: Valentyn Kahamlyk AuthorDate: Mon Oct 23 15:48:02 2023 -0700 Fixed deserialization of element properties for GraphBinary (#2304) --- CHANGELOG.asciidoc | 1 + .../structure/io/binary/types/EdgeSerializer.java| 18 +++--- .../structure/io/binary/types/VertexSerializer.java | 20 +--- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f15482f169..be19dd4cde 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -37,6 +37,7 @@ This release also includes changes from <> and < { final List properties = context.read(buffer); -return new DetachedEdge(id, label, properties, outVId, outVLabel, inVId, inVLabel); +final DetachedVertex inV = DetachedVertex.build().setId(inVId).setLabel(inVLabel).create(); +final DetachedVertex outV = DetachedVertex.build().setId(outVId).setLabel(outVLabel).create(); + +final DetachedEdge.Builder builder = DetachedEdge.build().setId(id).setLabel(label).setInV(inV).setOutV(outV); + +if (properties != null) { +for (final Property p : properties) { +builder.addProperty(p); +} +} + +return builder.create(); } @Override diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexSerializer.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexSerializer.java index 01e3d87324..5dbdfd1b0c 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexSerializer.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/VertexSerializer.java @@ -19,19 +19,17 @@ package org.apache.tinkerpop.gremlin.structure.io.binary.types; import org.apache.commons.collections.IteratorUtils; +import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.VertexProperty; +import org.apache.tinkerpop.gremlin.structure.io.Buffer; import org.apache.tinkerpop.gremlin.structure.io.binary.DataType; import org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryReader; import org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryWriter; -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.tinkerpop.gremlin.structure.io.Buffer; import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex; +import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertexProperty; import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; /** * @author Stephen Mallette (http://stephen.genoprime.com) @@ -45,9 +43,17 @@ public class VertexSerializer extends SimpleTypeSerializer { protected Vertex readValue(final Buffer buffer, final GraphBinaryReader context) throws IOException { final Object id = context.read(buffer); final String label = context.readValue(buffer, String.class, false); -final List properties = context.read(buffer); +final List properties = context.read(buffer); + +final DetachedVertex.Builder builder = DetachedVertex.build().setId(id).setLabel(label); + +if (properties != null) { +for (final DetachedVertexProperty vp : properties) { +builder.addProperty(vp); +} +} -return new DetachedVertex(id, label, properties); +return builder.create(); } @Override
Re: [PR] [TINKERPOP-3008] Update concat() to accept traversal varargs [tinkerpop]
xiazcy merged PR #2306: URL: https://github.com/apache/tinkerpop/pull/2306 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[tinkerpop] branch master updated: update concat() to accept traversal varargs and not treat inject as special case in argument (#2306)
This is an automated email from the ASF dual-hosted git repository. xiazcy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/master by this push: new cd66436470 update concat() to accept traversal varargs and not treat inject as special case in argument (#2306) cd66436470 is described below commit cd664364706e0c18f561a62b133cc04c03a7ea9c Author: Yang Xia <55853655+xia...@users.noreply.github.com> AuthorDate: Mon Oct 23 16:09:48 2023 -0700 update concat() to accept traversal varargs and not treat inject as special case in argument (#2306) --- CHANGELOG.asciidoc | 3 + docs/src/dev/provider/gremlin-semantics.asciidoc | 12 ++-- docs/src/reference/the-traversal.asciidoc | 37 ++- docs/src/upgrade/release-3.7.x.asciidoc| 31 - .../grammar/DefaultGremlinBaseVisitor.java | 2 +- .../language/grammar/TraversalMethodVisitor.java | 8 ++- .../traversal/dsl/graph/GraphTraversal.java| 15 +++-- .../gremlin/process/traversal/dsl/graph/__.java| 6 +- .../process/traversal/step/map/ConcatStep.java | 73 ++ .../traversal/translator/DotNetTranslator.java | 1 - .../grammar/TraversalMethodVisitorTest.java| 28 + .../process/traversal/step/map/ConcatStepTest.java | 10 ++- .../Process/Traversal/GraphTraversal.cs| 20 -- .../src/Gremlin.Net/Process/Traversal/__.cs| 10 +-- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 31 - gremlin-go/driver/cucumber/gremlin.go | 7 ++- .../gremlin-javascript/test/cucumber/gremlin.js| 7 ++- gremlin-language/src/main/antlr4/Gremlin.g4| 2 +- gremlin-python/src/main/python/radish/gremlin.py | 7 ++- .../gremlin/test/features/map/Concat.feature | 41 20 files changed, 242 insertions(+), 109 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index be19dd4cde..e3d6bc9e18 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -29,6 +29,9 @@ This release also includes changes from <> and <()`. *(breaking)* +* Update `concat()` to not special treat `inject` in arguments and use `TraversalUtil.apply` on it as with any other child traversals. *(breaking)* * Checked graph features for meta-property support before trying to serialize them in `VertexPropertySerializer` for GraphBinary. * Added date manipulation steps `asDate`, `dateAdd` and `dateDiff`. * Added new data type `DT` to represent periods of time. diff --git a/docs/src/dev/provider/gremlin-semantics.asciidoc b/docs/src/dev/provider/gremlin-semantics.asciidoc index c1825c261d..6cf71fda1e 100644 --- a/docs/src/dev/provider/gremlin-semantics.asciidoc +++ b/docs/src/dev/provider/gremlin-semantics.asciidoc @@ -730,7 +730,7 @@ link:https://tinkerpop.apache.org/docs/x.y.z/reference/#call-step[reference] *Description:* Concatenates the incoming String traverser with the input String arguments, and return the joined String. -*Syntax:* `concat()` | `concat(String...)` | `concat(Traversal)` +*Syntax:* `concat()` | `concat(String...)` | `concat(Traversal, Traversal...)` [width="100%",options="header"] |= @@ -740,10 +740,12 @@ link:https://tinkerpop.apache.org/docs/x.y.z/reference/#call-step[reference] *Arguments:* -* `String...` - If one or more String values are provided, they will be concatenated together with the -incoming traverser. If no argument is provided, the String value from the incoming traverser is returned. -* `Traversal` - The `Traversal` value must resolve to a `String`. The first result returned from the traversal will be -concatenated with the incoming traverser. +* `concatStrings` - Varargs of `String`. If one or more String values are provided, they will be concatenated together +with the incoming traverser. If no argument is provided, the String value from the incoming traverser is returned. +* `concatTraveral` - A `Traversal` whose must value resolve to a `String`. The first result returned from the traversal will +be concatenated with the incoming traverser. +* `otherConcatTraverals` - Varargs of `Traversal`. Each `Traversal` value must resolve to a `String`. The first result +returned from each traversal will be concatenated with the incoming traverser and the previous traversal arguments. Any `null` String values will be skipped when concatenated with non-`null` String values. If two `null` value are concatenated, the `null` value will be propagated and returned. diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index ee9f256d09..9278fef9be 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -1143,39 +1143,48 @@ link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/
[tinkerpop] branch TINKERPOP-2978-3 updated: PR updates
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a commit to branch TINKERPOP-2978-3 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/TINKERPOP-2978-3 by this push: new c139720ce0 PR updates c139720ce0 is described below commit c139720ce0d21c0605088a7a06297f6b6d1886ec Author: Ken Hu <106191785+kenh...@users.noreply.github.com> AuthorDate: Mon Oct 23 16:27:34 2023 -0700 PR updates --- .../dev/future/proposal-3-remove-closures.asciidoc | 12 ++-- docs/src/dev/provider/gremlin-semantics.asciidoc | 4 +- docs/src/reference/the-traversal.asciidoc | 48 +--- docs/src/upgrade/release-3.7.x.asciidoc| 6 +- .../traversal/dsl/graph/GraphTraversal.java| 2 +- .../process/traversal/step/map/DifferenceStep.java | 1 - .../process/traversal/step/map/IntersectStep.java | 1 - .../process/traversal/step/map/ProductStep.java| 1 - .../traversal/step/map/TraversalMergeStep.java | 12 +--- .../traversal/step/map/CombineStepTest.java| 6 -- .../traversal/step/map/ConjoinStepTest.java| 5 +- .../traversal/step/map/DifferenceStepTest.java | 2 - .../traversal/step/map/DisjunctStepTest.java | 2 - .../traversal/step/map/IntersectStepTest.java | 2 - .../traversal/step/map/ProductStepTest.java| 2 - .../traversal/step/map/TraversalMergeStepTest.java | 3 - .../src/Gremlin.Net/Process/Traversal/__.cs| 64 +++--- .../gremlin/test/features/map/Combine.feature | 8 +-- 18 files changed, 105 insertions(+), 76 deletions(-) diff --git a/docs/src/dev/future/proposal-3-remove-closures.asciidoc b/docs/src/dev/future/proposal-3-remove-closures.asciidoc index a86a0a65af..87cace007c 100644 --- a/docs/src/dev/future/proposal-3-remove-closures.asciidoc +++ b/docs/src/dev/future/proposal-3-remove-closures.asciidoc @@ -905,7 +905,7 @@ below: * <> * <> * <> -* <> +* <> === Gremlin Language Variant Function Names @@ -941,7 +941,7 @@ below: |disjunct() |disjunct() |disjunct() |disjunct() |Disjunct() |Disjunct() -|join() |join() |join() |join() |Join() |Join() +|conjoin() |conjoin() |conjoin() |conjoin() |Conjoin() |Conjoin() |=== ' @@ -1340,7 +1340,7 @@ g.inject([1,2,4]).disjunct([1, 2, 3]) ==>[3, 4] -=== `join()` [[join_list]] +=== `conjoin()` [[conjoin_list]] Returns the join of the incoming array and delimiter passed as a parameter. This will return a String of the values joined together with @@ -1348,7 +1348,7 @@ the delimiter. Signature(s) -`join(delimiter)` +`conjoin(delimiter)` Parameters @@ -1364,9 +1364,9 @@ String data types. If non-array data types are passed in then an A string of the values joined together with the delimiter -g.inject([1,2]).join("5") +g.inject([1,2]).conjoin("5") ==>152 -g.inject([1,2,3]).join(";") +g.inject([1,2,3]).conjoin(";") ==>1;2;3 diff --git a/docs/src/dev/provider/gremlin-semantics.asciidoc b/docs/src/dev/provider/gremlin-semantics.asciidoc index a71145f106..da414c45ae 100644 --- a/docs/src/dev/provider/gremlin-semantics.asciidoc +++ b/docs/src/dev/provider/gremlin-semantics.asciidoc @@ -740,7 +740,7 @@ link:https://tinkerpop.apache.org/docs/x.y.z/reference/#call-step[reference] *Arguments:* -* `Object` - A list of items (as an Iterable or an array) a traversal that will produce a list of items. +* `Object` - A list of items (as an Iterable or an array) or a traversal that will produce a list of items. *Modulation:* @@ -759,7 +759,7 @@ will cause exceptions to be thrown. See: link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/CombineStep.java[source], link:https://tinkerpop.apache.org/docs/x.y.z/reference/#combine-step[reference], -link:https://tinkerpop.apache.org/docs/x.y.z/reference/#merge-step[reference], +link:https://tinkerpop.apache.org/docs/x.y.z/reference/#merge-step[merge() reference], [[concat-step]] === concat() diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index 05f77750ff..7703754e66 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -1151,6 +1151,7 @@ will throw an `IllegalArgumentException` if any other type is encountered (inclu [gremlin-groovy,modern] g.V().values("name").fold().combine(["james","jen","marko","vadas"]) +g.V().values("name").fold().combine(__.constant("stephen").fold()) *Additional References* @@ -1196,6 +1197,24 @@ link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gre link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#concat-Traversal++[`concat(Traversal)`] link:++https://tinkerpop.apache.org/docs/x.y.z/dev/provid
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
kenhuuu commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1369372021 ## docs/src/reference/the-traversal.asciidoc: ## @@ -3759,12 +3885,14 @@ link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gre [[reverse-step]] === Reverse Step -The `reverse()`-step (*map*) returns a reversed string of the incoming string traverser. Null values are not processed and remain -as null when returned. If the incoming traverser is a non-String value then an `IllegalArgumentException` will be thrown. +The `reverse()`-step (*map*) returns a reversed of the incoming list traverser. Single values (including null) are not +processed and are added back to the Traversal Stream unchanged. If the incoming traverser is a String value then the +reversed String will be returned. [gremlin-groovy,modern] g.V().values("name").reverse() +g.V().values("name").fold().reverse() Review Comment: Done. ## docs/src/upgrade/release-3.7.x.asciidoc: ## @@ -225,11 +226,34 @@ gremlin> g.V().values("age").fold().all(P.gt(10)) ==>[29,27,32,35] gremlin> g.V().values("age").fold().any(P.eq(32)) ==>[29,27,32,35] +gremlin> g.V().values("age").fold().product(__.V().values("age").limit(2).fold()) +==>[[29,29],[29,27],[27,29],[27,27],[32,29],[32,27],[35,29],[35,27]] +gremlin> g.V().values("age").fold().merge([32,30,50]) +==>[32,50,35,27,29,30] +gremlin> g.V().values("age").fold().combine([32,30,50]) +==>[29,27,32,35,32,30,50] +gremlin> g.V().values("age").fold().intersect([32,30,50]) +==>[32] +gremlin> g.V().values("age").fold().disjunct([32,30,50]) +==>[50,35,27,29,30] +gremlin> g.V().values("age").fold().difference([32,30,50]) +==>[35,27,29] +gremlin> g.V().values("age").order().by(desc).fold().reverse() +==>[27,29,32,35] +gremlin> g.V().values("age").fold().join("-") Review Comment: conjoin. updated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
kenhuuu commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1369372294 ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java: ## @@ -1672,6 +1678,90 @@ public default GraphTraversal dateDiff(final Traversal dateTra return this.asAdmin().addStep(new DateDiffStep<>(this.asAdmin(), dateTraversal)); } +/** + * Calculates the difference between the list traverser and list argument. + * + * @return the traversal with an appended {@link DifferenceStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#difference-step"; target="_blank">Reference Documentation - Difference Step + * @since 3.7.1 + */ +public default GraphTraversal> difference(final Object values) { +this.asAdmin().getBytecode().addStep(Symbols.difference, values); +return this.asAdmin().addStep(new DifferenceStep<>(this.asAdmin(), values)); +} + +/** + * Calculates the disjunction between the list traverser and list argument. + * + * @return the traversal with an appended {@link DisjunctStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#disjunct-step"; target="_blank">Reference Documentation - Disjunct Step + * @since 3.7.1 + */ +public default GraphTraversal> disjunct(final Object values) { +this.asAdmin().getBytecode().addStep(Symbols.disjunct, values); +return this.asAdmin().addStep(new DisjunctStep<>(this.asAdmin(), values)); +} + +/** + * Calculates the intersection between the list traverser and list argument. + * + * @return the traversal with an appended {@link IntersectStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#intersect-step"; target="_blank">Reference Documentation - Intersect Step + * @since 3.7.1 + */ +public default GraphTraversal> intersect(final Object values) { +this.asAdmin().getBytecode().addStep(Symbols.intersect, values); +return this.asAdmin().addStep(new IntersectStep<>(this.asAdmin(), values)); +} + +/** + * Joins together the elements of the incoming list traverser together with the provided delimiter. + * + * @return the traversal with an appended {@link ConjoinStep}. + * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#join-step"; target="_blank">Reference Documentation - Join Step Review Comment: updated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
kenhuuu commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1369372615 ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConjoinStep.java: ## @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.process.traversal.step.map; + +import org.apache.tinkerpop.gremlin.process.traversal.Traversal; +import org.apache.tinkerpop.gremlin.process.traversal.Traverser; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; +import org.apache.tinkerpop.gremlin.process.traversal.util.ListFunction; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +/** + * A map step that returns the result of joining every element in the traverser using the delimiter argument. + */ +public final class ConjoinStep extends ScalarMapStep implements ListFunction { Review Comment: Maybe, I decided it wouldn't be that useful given that half of these fields are meant to be null. By default the step's name is already included in the toString which is probably the most important part. ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/TraversalMergeStep.java: ## @@ -0,0 +1,132 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.process.traversal.step.map; + +import org.apache.tinkerpop.gremlin.process.traversal.Traversal; +import org.apache.tinkerpop.gremlin.process.traversal.Traverser; +import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; +import org.apache.tinkerpop.gremlin.process.traversal.util.ListFunction; +import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil; +import org.apache.tinkerpop.gremlin.structure.util.StringFactory; +import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * A map step that returns the merger of the traverser and the provided arguments without duplicates. This is commonly + * known as a union. + */ +public final class TraversalMergeStep extends ScalarMapStep implements TraversalParent, ListFunction { +private Traversal.Admin valueTraversal; +private Object parameterItems; +public TraversalMergeStep(final Traversal.Admin traversal, final Object values) { +super(traversal); + +if (values instanceof Traversal) { +valueTraversal = integrateChild(((Traversal) values).asAdmin()); +} else { +parameterItems = values; +} +} + +@Override +public String getStepName() { return "merge"; } + +@Override +protected E map(final Traverser.Admin traverser) { +S incoming = traverser.get(); Review Comment: updated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To u
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
kenhuuu commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1369372788 ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/TraversalMergeStep.java: ## @@ -0,0 +1,132 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.process.traversal.step.map; + +import org.apache.tinkerpop.gremlin.process.traversal.Traversal; +import org.apache.tinkerpop.gremlin.process.traversal.Traverser; +import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; +import org.apache.tinkerpop.gremlin.process.traversal.util.ListFunction; +import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil; +import org.apache.tinkerpop.gremlin.structure.util.StringFactory; +import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * A map step that returns the merger of the traverser and the provided arguments without duplicates. This is commonly + * known as a union. + */ +public final class TraversalMergeStep extends ScalarMapStep implements TraversalParent, ListFunction { +private Traversal.Admin valueTraversal; +private Object parameterItems; +public TraversalMergeStep(final Traversal.Admin traversal, final Object values) { +super(traversal); + +if (values instanceof Traversal) { +valueTraversal = integrateChild(((Traversal) values).asAdmin()); +} else { +parameterItems = values; +} +} + +@Override +public String getStepName() { return "merge"; } + +@Override +protected E map(final Traverser.Admin traverser) { +S incoming = traverser.get(); + +Map mapA = (incoming instanceof Map) ? (Map) incoming : null; +if (mapA != null) { +final Object mapB = (valueTraversal != null) ? TraversalUtil.apply(traverser, valueTraversal) : parameterItems; +if (!(mapB instanceof Map)) { +throw new IllegalArgumentException( +String.format( +"%s step expected provided argument to evaluate to a Map, encountered %s", +getStepName(), +mapB.getClass())); +} + +final Map mergedMap = new HashMap(mapA); +mergedMap.putAll((Map) mapB); +return (E) mergedMap; +} else { +final Collection listA = convertTraverserToCollection(traverser); + +if (parameterItems instanceof Map) { +throw new IllegalArgumentException(getStepName() + " step type mismatch: expected argument to be Iterable but got Map"); +} +final Collection listB = +(null != valueTraversal) +? convertTraversalToCollection(traverser, valueTraversal) +: convertArgumentToCollection(parameterItems); + +final Set elements = new HashSet(); + +elements.addAll(listA); +elements.addAll(listB); + +return (E) elements; +} +} + +@Override +public List> getLocalChildren() { +return (null == valueTraversal) ? Collections.emptyList() : Collections.singletonList(valueTraversal); +} + +@Override +public Set getRequirements() { return this.getSelfAndChildRequirements(); } + +@Override +public void setTraversal(final Traversal.Admin parentTraversal) { +super.setTraversal(parentTraversal); +if (valueTraversal != null) { this.integrateChild(this.valueTraversal); } +} + +@Override +public TraversalMergeStep clone() { +final TraversalMergeStep clone = (TraversalMergeStep) super.clone(); +if (null != this.valueTravers
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
kenhuuu commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1369372908 ## docs/src/dev/provider/gremlin-semantics.asciidoc: ## @@ -725,6 +725,42 @@ link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/o link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/service/ServiceRegistry.java[ServiceRegistry], link:https://tinkerpop.apache.org/docs/x.y.z/reference/#call-step[reference] +[[combine-step]] +=== combine() + +*Description:* Appends one list to the other and returns the result to the Traversal Stream. + +*Syntax:* `combine(Object)` + +[width="100%",options="header"] +|= +|Start Step |Mid Step |Modulated |Domain |Range +|N |Y |N |`array`/`Iterable` |`List` +|= + +*Arguments:* + +* `Object` - A list of items (as an Iterable or an array) a traversal that will produce a list of items. Review Comment: updated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
kenhuuu commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1369373028 ## docs/src/dev/provider/gremlin-semantics.asciidoc: ## @@ -725,6 +725,42 @@ link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/o link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/service/ServiceRegistry.java[ServiceRegistry], link:https://tinkerpop.apache.org/docs/x.y.z/reference/#call-step[reference] +[[combine-step]] +=== combine() + +*Description:* Appends one list to the other and returns the result to the Traversal Stream. + +*Syntax:* `combine(Object)` + +[width="100%",options="header"] +|= +|Start Step |Mid Step |Modulated |Domain |Range +|N |Y |N |`array`/`Iterable` |`List` +|= + +*Arguments:* + +* `Object` - A list of items (as an Iterable or an array) a traversal that will produce a list of items. + +*Modulation:* + +None + +*Considerations:* + +A list is returned after the combine operation is applied so duplicates are allowed. `Merge` can be used instead if +duplicates aren't wanted. This step only applies to list types which means that non-iterable types (including null) +will cause exceptions to be thrown. + +*Exceptions* + +* If the incoming traverser isn't a list (array or Iterable) then an `IllegalArgumentException` will be thrown. +* If the argument doesn't resolve to a list (array or Iterable) then an `IllegalArgumentException` will be thrown. + +See: link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/CombineStep.java[source], +link:https://tinkerpop.apache.org/docs/x.y.z/reference/#combine-step[reference], +link:https://tinkerpop.apache.org/docs/x.y.z/reference/#merge-step[reference], Review Comment: yes it was intended. updated to your suugestion. ## gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Combine.feature: ## @@ -0,0 +1,240 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +@StepClassMap @StepCombine +Feature: Step - combine() + + @GraphComputerVerificationInjectionNotSupported + Scenario: g_injectXnullX_combineXinjectX1XX +Given the empty graph +And the traversal of + """ + g.inject(null).combine(__.inject(1)) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "Incoming traverser for combine step can't be null" + + @GraphComputerVerificationInjectionNotSupported + Scenario: g_V_valuesXnameX_combineXV_foldX +Given the modern graph +And the traversal of + """ + g.V().values("name").combine(__.V().fold()) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "combine step can only take an array or an Iterable type for incoming traversers" + + Scenario: g_V_fold_combineXconstantXnullXX +Given the modern graph +And the traversal of + """ + g.V().fold().combine(__.constant(null)) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "traversal argument for combine step must yield an iterable type, not null" + + @GraphComputerVerificationMidVNotSupported + Scenario: g_V_fold_combineXVX +Given the modern graph +And the traversal of + """ + g.V().fold().combine(__.V()) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "traversal argument for combine step must yield an iterable type, encountered" + + Scenario: g_V_valuesXnameX_fold_combineX2X +Given the modern graph +And the traversal of + """ + g.V().values("name").fold().combine(2) + """ +When iterated to list +Then the traversal will raise an error with message containing text of "combine step can only take an array or an Iterable as an argument, encountered" + + Scenario: g_V_valuesXnameX_fold_combineXnullX +Given the modern graph +And the t
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
kenhuuu commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1369373320 ## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/CombineStep.java: ## @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tinkerpop.gremlin.process.traversal.step.map; + +import org.apache.tinkerpop.gremlin.process.traversal.Traversal; +import org.apache.tinkerpop.gremlin.process.traversal.Traverser; +import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent; +import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement; +import org.apache.tinkerpop.gremlin.process.traversal.util.ListFunction; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +/** + * A map step that returns the combination of the traverser and the provided arguments. This is also commonly known as + * concatenation or append. + */ +public final class CombineStep extends ScalarMapStep> implements TraversalParent, ListFunction { +private Traversal.Admin valueTraversal; +private Object parameterItems; + +public CombineStep(final Traversal.Admin traversal, final Object values) { +super(traversal); + +if (values instanceof Traversal) { +valueTraversal = integrateChild(((Traversal) values).asAdmin()); +} else { +parameterItems = values; +} +} + +@Override +public String getStepName() { return "combine"; } + +@Override +protected List map(Traverser.Admin traverser) { +final Collection listA = convertTraverserToCollection(traverser); +final Collection listB = (null != valueTraversal) ? convertTraversalToCollection(traverser, valueTraversal) : convertArgumentToCollection(parameterItems); + +final List combined = new ArrayList(listA); +combined.addAll(listB); + +return combined; +} + +@Override +public List> getLocalChildren() { +return (null == valueTraversal) ? Collections.emptyList() : Collections.singletonList(valueTraversal); +} + +@Override +public Set getRequirements() { return this.getSelfAndChildRequirements(); } Review Comment: OBJECT is pretty much always required and so it doesn't need to be explicitly added here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
vkagamlyk commented on PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#issuecomment-1776213891 VOTE +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
kenhuuu commented on code in PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#discussion_r1369382783 ## docs/src/reference/the-traversal.asciidoc: ## @@ -1140,6 +1140,24 @@ g.V().coin(1.0) link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#coin-double-++[`coin(double)`] +[[combine-step]] +=== Combine Step + +The `combine()`-step (*map*) combines the elements of the incoming list traverser and the provided list argument into +one list. This is also known as appending or concatenating. This step only expects list data (array or Iterable) and +will throw an `IllegalArgumentException` if any other type is encountered (including null). This differs from the +`merge` step in that it allows duplicates to exist. + +[gremlin-groovy,modern] + +g.V().values("name").fold().combine(["james","jen","marko","vadas"]) Review Comment: added to all steps. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
Cole-Greer commented on PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#issuecomment-1776220869 Thanks Ken, these added steps will be a huge addition to gremlin's list manipulation capabilities. VOTE +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
kenhuuu commented on PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302#issuecomment-1776223289 VOTE +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2999 3.7.0 Remote Console Sends Incomplete Queries [tinkerpop]
ryn5 commented on code in PR #2297: URL: https://github.com/apache/tinkerpop/pull/2297#discussion_r1369404179 ## gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/GremlinGroovysh.groovy: ## @@ -140,4 +171,48 @@ class GremlinGroovysh extends Groovysh { maybeRecordResult(result) } + +private Object evaluateWithStoredBoundVars(String importsSpec, List current) { +Object result +String variableBlocks = null +// To make groovysh behave more like an interpreter, we need to retrieve all bound +// vars at the end of script execution, and then update them into the groovysh Binding context. +Set boundVars = ScriptVariableAnalyzer.getBoundVars(importsSpec + Parser.NEWLINE + current.join(Parser.NEWLINE), interp.classLoader) +if (boundVars) { +variableBlocks = "$COLLECTED_BOUND_VARS_MAP_VARNAME = new HashMap();" +boundVars.each({ String varname -> +// bound vars can be in global or some local scope. +// We discard locally scoped vars by ignoring MissingPropertyException +variableBlocks += """ +try {$COLLECTED_BOUND_VARS_MAP_VARNAME[\"$varname\"] = $varname; +} catch (MissingPropertyException e){}""" +}) +} +// Evaluate the current buffer w/imports and dummy statement +List buff +if (variableBlocks) { +buff = [importsSpec] + ['try {', 'true'] + current + ['} finally {' + variableBlocks + '}'] +} else { +buff = [importsSpec] + ['true'] + current +} +setLastResult(result = interp.evaluate(buff)) Review Comment: Confirmed that multiline queries are fixed for both interpreter modes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2999 3.7.0 Remote Console Sends Incomplete Queries [tinkerpop]
Cole-Greer commented on PR #2297: URL: https://github.com/apache/tinkerpop/pull/2297#issuecomment-1776237588 Thanks Ryan, LGTM. VOTE +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] [TINKERPOP-2334] Add format() step [tinkerpop]
codecov-commenter commented on PR #2307: URL: https://github.com/apache/tinkerpop/pull/2307#issuecomment-1776237912 ## [Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/2307?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report > Merging [#2307](https://app.codecov.io/gh/apache/tinkerpop/pull/2307?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (09aab9d) into [master](https://app.codecov.io/gh/apache/tinkerpop/commit/8ba85676aa37e90c877f50b971451dbd376b5b9f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (8ba8567) will **increase** coverage by `0.23%`. > Report is 17 commits behind head on master. > The diff coverage is `96.05%`. ```diff @@ Coverage Diff @@ ## master#2307 +/- ## + Coverage 75.93% 76.17% +0.23% - Complexity1276512785 +20 Files 1062 1038 -24 Lines 6441260633-3779 Branches 7118 7139 +21 - Hits 4890946185-2724 + Misses1285211980 -872 + Partials 2651 2468 -183 ``` | [Files](https://app.codecov.io/gh/apache/tinkerpop/pull/2307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...emlin/language/grammar/TraversalMethodVisitor.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9sYW5ndWFnZS9ncmFtbWFyL1RyYXZlcnNhbE1ldGhvZFZpc2l0b3IuamF2YQ==) | `92.14% <100.00%> (+0.09%)` | :arrow_up: | | [...in/process/traversal/dsl/graph/GraphTraversal.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC9kc2wvZ3JhcGgvR3JhcGhUcmF2ZXJzYWwuamF2YQ==) | `93.05% <100.00%> (+0.16%)` | :arrow_up: | | [...kerpop/gremlin/process/traversal/dsl/graph/\_\_.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC9kc2wvZ3JhcGgvX18uamF2YQ==) | `79.79% <100.00%> (+0.10%)` | :arrow_up: | | [...process/traversal/translator/PythonTranslator.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC90cmFuc2xhdG9yL1B5dGhvblRyYW5zbGF0b3IuamF2YQ==) | `71.28% <100.00%> (+0.14%)` | :arrow_up: | | [...gremlin/process/traversal/util/BytecodeHelper.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC91dGlsL0J5dGVjb2RlSGVscGVyLmphdmE=) | `86.45% <100.00%> (+0.07%)` | :arrow_up: | | [...in/language/grammar/DefaultGremlinBaseVisitor.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9sYW5ndWFnZS9ncmFtbWFyL0RlZmF1bHRHcmVtbGluQmFzZVZpc2l0b3IuamF2YQ==) | `0.24% <0.00%> (-0.01%)` | :arrow_down: | | [...gremlin/process/traversal/step/map/FormatStep.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC9zdGVwL21hcC9Gb3JtYXRTdGVwLmphdmE=) | `97.10% <97.10%> (ø)` | | ... and [44 files with indirect coverage changes](https://app.codecov.io/gh/apache/tinkerpop/pull/2307/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https:
[tinkerpop] branch TINKERPOP-2978-3 updated (c139720ce0 -> 0d8bcb1453)
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a change to branch TINKERPOP-2978-3 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git omit c139720ce0 PR updates omit b67b364f61 TINKERPOP-2978: Implement list functions. add 3357af5380 Allowed io() to recognize .graphml file extension CTR add 8f82dfe708 Merge branch '3.6-dev' add 8ba85676aa Regenerated Gremlin test files after merge CTR add 10d498f338 [TINKERPOP-3006] Enable remote connection over HTTP for gremlin python (#2283) add 6a0f254510 Merge branch '3.6-dev' add 29bc907cc7 CTR Update site download page with 3.7.0 links add 732d1a2790 [TINKERPOP-3004] improve GremlinValueComparator performance (#2282) add 357e307ec5 Loosen assertion for error message on mergeE a bit CTR add 50b43d8ba9 Merge branch '3.6-dev' add 5bf274b03e Loosen assertion for error message on mergeE a bit CTR add 6c0254f205 Merge branch '3.6-dev' add 8663ca7e6b TINKERPOP-2811 Fixed bug with hasId() order for ElementIdStrategy add 0a28c8fedc Merge branch 'TINKERPOP-2811' into 3.6-dev add f6c15b3d09 Merge branch '3.6-dev' add 861455d0ca Bump eslint (#2305) add ba9d023b75 Merge branch '3.5-dev' into 3.6-dev add 9ddeb7e5cb Merge branch '3.6-dev' add 7716f565aa remove meaningless test (#2303) add e5a337bde6 Fixed deserialization of element properties for GraphBinary (#2304) add cd66436470 update concat() to accept traversal varargs and not treat inject as special case in argument (#2306) new 0d8bcb1453 TINKERPOP-2978: Implement list functions. This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (c139720ce0) \ N -- N -- N refs/heads/TINKERPOP-2978-3 (0d8bcb1453) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 9 + docs/site/home/community.html | 8 +- docs/site/home/download.html | 153 -- docs/site/home/index.html | 10 +- docs/src/dev/provider/gremlin-semantics.asciidoc | 12 +- docs/src/reference/the-traversal.asciidoc | 65 +++-- docs/src/upgrade/release-3.7.x.asciidoc| 31 +- .../grammar/DefaultGremlinBaseVisitor.java | 2 +- .../language/grammar/TraversalMethodVisitor.java | 8 +- .../traversal/dsl/graph/GraphTraversal.java| 15 +- .../gremlin/process/traversal/dsl/graph/__.java| 6 +- .../process/traversal/step/map/ConcatStep.java | 73 +++-- .../process/traversal/step/sideEffect/IoStep.java | 2 +- .../strategy/decoration/ElementIdStrategy.java | 7 +- .../traversal/translator/DotNetTranslator.java | 1 - .../traversal/translator/GroovyTranslator.java | 2 +- .../structure/io/binary/types/EdgeSerializer.java | 18 +- .../io/binary/types/VertexSerializer.java | 20 +- .../gremlin/util/GremlinValueComparator.java | 13 +- .../grammar/TraversalMethodVisitorTest.java| 28 ++ .../process/traversal/step/map/ConcatStepTest.java | 10 +- .../traversal/translator/GroovyTranslatorTest.java | 15 + .../Process/Traversal/GraphTraversal.cs| 20 +- .../src/Gremlin.Net/Process/Traversal/__.cs| 18 +- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 32 +-- gremlin-go/driver/cucumber/gremlin.go | 8 +- .../gremlin-javascript/package-lock.json | 74 +++-- .../gremlin-javascript/test/cucumber/gremlin.js| 8 +- gremlin-language/src/main/antlr4/Gremlin.g4| 2 +- gremlin-python/docker-compose.yml | 2 + .../gremlin_python/driver/aiohttp/transport.py | 98 +++ .../main/python/gremlin_python/driver/client.py| 33 ++- .../main/python/gremlin_python/driver/protocol.py | 95 ++- .../python/gremlin_python/driver/serializer.py | 7 +- .../python/gremlin_python/process/translator.py| 200 ++--- gremlin-python/src/main/python/radish/gremlin.py | 8 +- gremlin-python/src/main/python/tests/conftest.py | 58 +++- ...on.py => test_driver_remote_connection_http.py} | 138 + .../main/python/te
Re: [PR] TINKERPOP-2999 3.7.0 Remote Console Sends Incomplete Queries [tinkerpop]
kenhuuu commented on PR #2297: URL: https://github.com/apache/tinkerpop/pull/2297#issuecomment-1776282756 VOTE +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] TINKERPOP-2978: Implement list functions. [tinkerpop]
kenhuuu merged PR #2302: URL: https://github.com/apache/tinkerpop/pull/2302 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[tinkerpop] branch TINKERPOP-2978-3 deleted (was 0d8bcb1453)
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a change to branch TINKERPOP-2978-3 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git was 0d8bcb1453 TINKERPOP-2978: Implement list functions. The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[tinkerpop] 01/01: Merge pull request #2302
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 63364f11f5f16ad468a18b1b814e4cd8bfe45276 Merge: cd66436470 0d8bcb1453 Author: kenhuuu <106191785+kenh...@users.noreply.github.com> AuthorDate: Mon Oct 23 18:10:15 2023 -0700 Merge pull request #2302 TINKERPOP-2978: Implement list functions. .../dev/future/proposal-3-remove-closures.asciidoc | 34 ++- docs/src/dev/provider/gremlin-semantics.asciidoc | 246 +++- docs/src/reference/the-traversal.asciidoc | 142 +- docs/src/upgrade/release-3.7.x.asciidoc| 28 +- .../grammar/DefaultGremlinBaseVisitor.java | 28 ++ .../language/grammar/TraversalMethodVisitor.java | 56 .../traversal/dsl/graph/GraphTraversal.java| 105 ++- .../gremlin/process/traversal/dsl/graph/__.java| 60 +++- .../process/traversal/step/map/CombineStep.java| 96 +++ .../process/traversal/step/map/ConjoinStep.java| 80 ++ .../process/traversal/step/map/DifferenceStep.java | 98 +++ .../process/traversal/step/map/DisjunctStep.java | 109 .../process/traversal/step/map/IntersectStep.java | 99 +++ .../process/traversal/step/map/ProductStep.java| 102 +++ .../process/traversal/step/map/ReverseStep.java| 36 ++- .../traversal/step/map/TraversalMergeStep.java | 126 + .../process/traversal/util/BytecodeHelper.java | 14 + .../process/traversal/util/ListFunction.java | 199 + .../gremlin/util/iterator/IteratorUtils.java | 4 + .../grammar/TraversalMethodVisitorTest.java| 73 + .../traversal/step/map/CombineStepTest.java| 65 + .../{ReverseStepTest.java => ConjoinStepTest.java} | 36 ++- .../traversal/step/map/DifferenceStepTest.java | 65 + .../traversal/step/map/DisjunctStepTest.java | 65 + .../traversal/step/map/IntersectStepTest.java | 66 + .../traversal/step/map/ProductStepTest.java| 74 + .../traversal/step/map/ReverseStepTest.java| 20 +- .../traversal/step/map/TraversalMergeStepTest.java | 65 + .../Process/Traversal/GraphTraversal.cs| 67 - .../src/Gremlin.Net/Process/Traversal/__.cs| 60 +++- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 147 +- gremlin-go/driver/anonymousTraversal.go| 49 gremlin-go/driver/cucumber/gremlin.go | 147 +- gremlin-go/driver/graphTraversal.go| 43 +++ .../lib/process/graph-traversal.js | 70 + .../test/cucumber/feature-steps.js | 46 +++ .../gremlin-javascript/test/cucumber/gremlin.js| 147 +- gremlin-language/src/main/antlr4/Gremlin.g4| 55 +++- .../gremlin_python/process/graph_traversal.py | 56 gremlin-python/src/main/python/radish/gremlin.py | 147 +- .../tinkerpop/gremlin/features/StepDefinition.java | 17 +- .../gremlin/test/features/map/Combine.feature | 240 .../gremlin/test/features/map/Conjoin.feature | 155 ++ .../gremlin/test/features/map/Difference.feature | 254 + .../gremlin/test/features/map/Disjunct.feature | 230 +++ .../gremlin/test/features/map/Intersect.feature| 226 +++ .../gremlin/test/features/map/Merge.feature| 300 .../gremlin/test/features/map/Product.feature | 311 + .../gremlin/test/features/map/Reverse.feature | 114 +++- 49 files changed, 4959 insertions(+), 113 deletions(-)
[tinkerpop] branch master updated (cd66436470 -> 63364f11f5)
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from cd66436470 update concat() to accept traversal varargs and not treat inject as special case in argument (#2306) add 0d8bcb1453 TINKERPOP-2978: Implement list functions. new 63364f11f5 Merge pull request #2302 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../dev/future/proposal-3-remove-closures.asciidoc | 34 ++- docs/src/dev/provider/gremlin-semantics.asciidoc | 246 +++- docs/src/reference/the-traversal.asciidoc | 142 +- docs/src/upgrade/release-3.7.x.asciidoc| 28 +- .../grammar/DefaultGremlinBaseVisitor.java | 28 ++ .../language/grammar/TraversalMethodVisitor.java | 56 .../traversal/dsl/graph/GraphTraversal.java| 105 ++- .../gremlin/process/traversal/dsl/graph/__.java| 60 +++- .../process/traversal/step/map/CombineStep.java| 96 +++ .../process/traversal/step/map/ConjoinStep.java| 80 ++ .../process/traversal/step/map/DifferenceStep.java | 98 +++ .../process/traversal/step/map/DisjunctStep.java | 109 .../process/traversal/step/map/IntersectStep.java | 99 +++ .../process/traversal/step/map/ProductStep.java| 102 +++ .../process/traversal/step/map/ReverseStep.java| 36 ++- .../traversal/step/map/TraversalMergeStep.java | 126 + .../process/traversal/util/BytecodeHelper.java | 14 + .../process/traversal/util/ListFunction.java | 199 + .../gremlin/util/iterator/IteratorUtils.java | 4 + .../grammar/TraversalMethodVisitorTest.java| 73 + .../traversal/step/map/CombineStepTest.java| 65 + ...mpleLocalStepTest.java => ConjoinStepTest.java} | 45 ++- .../traversal/step/map/DifferenceStepTest.java | 65 + .../traversal/step/map/DisjunctStepTest.java | 65 + .../traversal/step/map/IntersectStepTest.java | 66 + .../traversal/step/map/ProductStepTest.java| 74 + .../traversal/step/map/ReverseStepTest.java| 20 +- .../traversal/step/map/TraversalMergeStepTest.java | 65 + .../Process/Traversal/GraphTraversal.cs| 67 - .../src/Gremlin.Net/Process/Traversal/__.cs| 60 +++- .../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 147 +- gremlin-go/driver/anonymousTraversal.go| 49 gremlin-go/driver/cucumber/gremlin.go | 147 +- gremlin-go/driver/graphTraversal.go| 43 +++ .../lib/process/graph-traversal.js | 70 + .../test/cucumber/feature-steps.js | 46 +++ .../gremlin-javascript/test/cucumber/gremlin.js| 147 +- gremlin-language/src/main/antlr4/Gremlin.g4| 55 +++- .../gremlin_python/process/graph_traversal.py | 56 gremlin-python/src/main/python/radish/gremlin.py | 147 +- .../tinkerpop/gremlin/features/StepDefinition.java | 17 +- .../gremlin/test/features/map/Combine.feature | 240 .../{filter/Any.feature => map/Conjoin.feature}| 124 .../gremlin/test/features/map/Difference.feature | 254 + .../gremlin/test/features/map/Disjunct.feature | 230 +++ .../gremlin/test/features/map/Intersect.feature| 226 +++ .../gremlin/test/features/map/Merge.feature| 300 .../gremlin/test/features/map/Product.feature | 311 + .../gremlin/test/features/map/Reverse.feature | 114 +++- 49 files changed, 4865 insertions(+), 185 deletions(-) create mode 100644 gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/CombineStep.java create mode 100644 gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ConjoinStep.java create mode 100644 gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/DifferenceStep.java create mode 100644 gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/DisjunctStep.java create mode 100644 gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/IntersectStep.java create mode 100644 gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProductStep.java create mode 100644 gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/TraversalMergeStep.java create mode 100644 gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/ListFunction.java create mode 100644 gremlin-core/src/test/java/org/apache/tinker