[
https://issues.apache.org/jira/browse/TINKERPOP-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18017113#comment-18017113
]
ASF GitHub Bot commented on TINKERPOP-3173:
-------------------------------------------
Cole-Greer opened a new pull request, #3195:
URL: https://github.com/apache/tinkerpop/pull/3195
https://issues.apache.org/jira/browse/TINKERPOP-3173
Replaces the old system of ternary boolean semantics with simple binary
semantics. The triggers for "ERROR" states from illegal comparisons are
unchanged (typically comparisons with NaN or between incomparable types such as
String and int). The difference now is that instead of the ERROR being
propagated according to ternary logic semantics until a reduction point is
reached, the error now immediately returns a value of FALSE.
This will be most visible in expressions which include negations. Prior to
this change, `g.inject(NaN).not(is(1))` would produce no results as !(NaN == 1)
-> !(ERROR) -> ERROR -> traverser is filtered out. After this change, the same
traversal will return NaN as the same expression now evaluates as !(NaN == 1)
-> !(FALSE) -> TRUE -> traverser is not filtered.
This commit also introduces NotP to model a negated P, as the old method of
getting the complement of the PBiPredicate may handle edge cases incorrectly:
!(1 < NaN) != (1 >= NaN) -> !(FALSE) != (FALSE)
> Simplify Comparability Semantics
> --------------------------------
>
> Key: TINKERPOP-3173
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3173
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.7.3
> Reporter: Cole Greer
> Priority: Major
>
> As recently discussed on the
> [devlist|https://lists.apache.org/thread/hsqw2tvc72dw4z40nnbbdmygrqx43syr],
> our current system of ternary boolean logic should be simplified to binary
> boolean logic where invalid comparisons simply return false.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)