[ https://issues.apache.org/jira/browse/TINKERPOP-2978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17778764#comment-17778764 ]
ASF GitHub Bot commented on TINKERPOP-2978: ------------------------------------------- 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 > Add List Manipulation Steps to Gremlin > -------------------------------------- > > Key: TINKERPOP-2978 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2978 > Project: TinkerPop > Issue Type: Improvement > Components: language > Reporter: Cole Greer > Priority: Major > > Today Gremlin requires that users fall back to closures to handle many common > list manipulation options that users want to do on data in the graph. This > is a problem for many users as many of the providers prevent the use of > closures due to the security risks so for these users there is no way to > manipulate lists directly. > A full list of proposed functions and semantics is detailed here: > https://github.com/apache/tinkerpop/blob/3.7.0/docs/src/dev/future/proposal-3-remove-closures.asciidoc -- This message was sent by Atlassian Jira (v8.20.10#820010)