[
https://issues.apache.org/jira/browse/TINKERPOP-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephen Mallette updated TINKERPOP-2605:
----------------------------------------
Description:
A number of areas where {{null}} is used in traversals result in some odd
looking errors. Identify these situations and improve them to be more user
friendly. Some specific items to take care of:
{code}
hasLabel(null) // currently results in exception, should just filter
P.within(null) // TINKERPOP-2598
sum() // NPE if null is present, should ignore nulls in calculation and return
null if all values are null
mean() // NPE if null is present, should ignore nulls in calculation and return
null if all values are null
max() // NPE if null is present, should ignore nulls in calculation and return
null if all values are null
min() // NPE if null is present, should ignore nulls in calculation and return
null if all values are null
inject(null) // NPE
hasValue(null) // NPE if accidentally applied to hasValue(P), should just filter
hasKey(null) // NPE, should just filter
g.inject(1,null).as('a') // NPE and won't allow labelling
V(null) // NPE, should just filter
mid-V(null) // NPE, should just filter
hasId(null) // NPE, should just filter
{code}
was:
A number of areas where {{null}} is used in traversals result in some odd
looking errors. Identify these situations and improve them to be more user
friendly. Some specific items to take care of:
{code}
hasLabel(null) // currently results in exception, should just filter
V(null) // currently results in exception, should just filter
P.within(null) // TINKERPOP-2598
sum() // NPE if null is present, should ignore nulls in calculation and return
null if all values are null
mean() // NPE if null is present, should ignore nulls in calculation and return
null if all values are null
max() // NPE if null is present, should ignore nulls in calculation and return
null if all values are null
min() // NPE if null is present, should ignore nulls in calculation and return
null if all values are null
inject(null) // NPE
hasValue(null) // NPE if accidentally applied to hasValue(P), should just filter
hasKey(null) // NPE, should just filter
hasId(null) // NPE, should just filter
g.inject(1,null).as('a') // NPE and won't allow labelling
{code}
> Further enforce and refine null semantics
> -----------------------------------------
>
> Key: TINKERPOP-2605
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2605
> Project: TinkerPop
> Issue Type: Improvement
> Components: process, test-suite
> Affects Versions: 3.5.1
> Reporter: Stephen Mallette
> Assignee: Stephen Mallette
> Priority: Major
>
> A number of areas where {{null}} is used in traversals result in some odd
> looking errors. Identify these situations and improve them to be more user
> friendly. Some specific items to take care of:
> {code}
> hasLabel(null) // currently results in exception, should just filter
> P.within(null) // TINKERPOP-2598
> sum() // NPE if null is present, should ignore nulls in calculation and
> return null if all values are null
> mean() // NPE if null is present, should ignore nulls in calculation and
> return null if all values are null
> max() // NPE if null is present, should ignore nulls in calculation and
> return null if all values are null
> min() // NPE if null is present, should ignore nulls in calculation and
> return null if all values are null
> inject(null) // NPE
> hasValue(null) // NPE if accidentally applied to hasValue(P), should just
> filter
> hasKey(null) // NPE, should just filter
> g.inject(1,null).as('a') // NPE and won't allow labelling
> V(null) // NPE, should just filter
> mid-V(null) // NPE, should just filter
> hasId(null) // NPE, should just filter
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)