[
https://issues.apache.org/jira/browse/TINKERPOP-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18023892#comment-18023892
]
ASF GitHub Bot commented on TINKERPOP-2234:
-------------------------------------------
Cole-Greer commented on code in PR #3211:
URL: https://github.com/apache/tinkerpop/pull/3211#discussion_r2392577130
##########
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/PTest.java:
##########
@@ -233,6 +233,12 @@ public static Iterable<Object[]> data() {
{P.within().or(P.within()), 0, false},
{P.within().or(P.without()), 0, true},
{P.without().or(P.without()), 0, true},
+
+ {P.typeOf(GType.NUMBER), 1, true},
+ {P.typeOf(GType.STRING), "hello", true},
+ {P.typeOf(Boolean.class), false, true},
+ {P.typeOf(GType.NULL), null, true},
Review Comment:
Can you include a few false cases here as well?
##########
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/PTest.java:
##########
@@ -233,6 +233,12 @@ public static Iterable<Object[]> data() {
{P.within().or(P.within()), 0, false},
{P.within().or(P.without()), 0, true},
{P.without().or(P.without()), 0, true},
+
+ {P.typeOf(GType.NUMBER), 1, true},
+ {P.typeOf(GType.STRING), "hello", true},
+ {P.typeOf(Boolean.class), false, true},
+ {P.typeOf(GType.NULL), null, true},
Review Comment:
Could you include a few false cases here as well?
> 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)