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

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

spmallette commented on code in PR #3211:
URL: https://github.com/apache/tinkerpop/pull/3211#discussion_r2441087017


##########
gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/data/Set.feature:
##########
@@ -0,0 +1,147 @@
+# 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.
+
+@StepClassData @DataSet
+Feature: Data - SET
+
+  Scenario: g_V_valueXnameX_aggregateXxX_capXxX_isXtypeOfXGType_SETX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("name").aggregate("x").cap("x").is(P.typeOf(GType.SET))
+      """
+    When iterated next
+    Then the result should be unordered
+      | result |
+      | marko |
+      | josh |
+      | peter |
+      | lop |
+      | vadas |
+      | ripple |
+
+  Scenario: g_V_valuesXageX_isXtypeOfXGType_SETXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("age").is(P.typeOf(GType.SET))
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_valuesXsetX_isXtypeOfXGType_SETXX

Review Comment:
   you can get to {{Set}} without having to inject or store one:
   
   ```
   gremlin> x = g.V().valueMap().select(keys).next()
   ==>name
   ==>age
   gremlin> x.class
   ==>class java.util.LinkedHashSet
   ```
   
   same for `List` and `Map` i guess....not sure if that changes your ideas 
about what tests go here and how they are structured. i guess storing them 
isn't bad, as long as we have suitable coverage for these types in general so 
that when providers opt-out of these tests there is still some protection.





> Introduce Type Predicate
> ------------------------
>
>                 Key: TINKERPOP-2234
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2234
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.4.2
>            Reporter: Stephen Mallette
>            Priority: Major
>
> Provide for a {{typeOf()}} predicate that allows for testing the type of an 
> object which would enable neat things like:
> {code}
> g.V().outE().has('weight',gt(0.1)).inV().path().unfold().is(typeOf(VERTEX))
> {code}
> See the linked DISCUSS thread for more information.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to