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

Stephen Mallette commented on TINKERPOP-2312:
---------------------------------------------

It just occurred to me that if {{value()}} and {{group()}} did behave in this 
manner it would assume that an element that does not have a particular key 
would be the same as one that had the key with its value set to {{null}}. i 
suppose that could be desirable, though it would make it hard for the user to 
determine whether an element lacked the key or lacked a value for a key. I 
guess you'd have to use some combination of {{hasKey()}} and a {{null}} check 
to ultimately determine that. Sounds like that could be a more narrow use case 
though than the one where you have to add in extra filtering to avoid the error 
like the one shown in the description.

> Empty keys to group() should group to null
> ------------------------------------------
>
>                 Key: TINKERPOP-2312
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2312
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.5.0
>            Reporter: Stephen Mallette
>            Priority: Major
>
> With TINKERPOP-2235 in place, {{null}} becomes valid to the language which 
> means that we could fix:
> {code}
> gremlin> g.V().group().by('age')
> The property does not exist as the key has no associated value for the 
> provided element: v[3]:age
> Type ':help' or ':h' for help.
> Display stack trace? [yN]n
> {code}
> so that users dont' need to do added filtering magic to deal with those kinds 
> of exceptions. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to