-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
breaking change?: what do do with range equality? What is 'undefined'? #663
Comments
Not sure where the confusion is coming from. The operational semantics of unary tests and ranges are well defined in Table 55: Semantics of decision table syntax. The ones for the relational operators in Tables 52, 53, and 54. Based on the above <=5 and (null, 5] evaluate to different results hence they are not equivalent, hence cannot be equal, it would break the substitution principle. The |
From discussion on the meeting, this is correct: "I have a feeling that perhaps (<= 10) = (null..10] is now supposed to be false ... but <=10.start might still return null" |
@baldimir - that was my take. BUT ... just noting that Furthermore to the range equality discussion we also have this: #667. Whereby ranges can now be represented by (say) But, I think I may have the answer for equality .... strictly speaking, we can go back to this definition from the spec table 53:
I think what we've (I!) have been missing here is the "the same comparison operator" thing. I think this tells use that a range with a comparison operator could never be equal to a range without a comparison operator. So, Though, as "comparison operator" is not exposed as a range property it cannot be taken into account and thus you get the following strange situation in feel:
If we compare A and B for equality (in FEEL) like:
The answer is Table "Table 42: Examples of range properties values" should probably explicitly have an example for
BUUUUTTT .... I think we can say that, for equality reasons, we need to take the comparison operator into account on a range if it has one and that must be part of a DMN runtime impl of Hope that made sense. I'll fix up the tests to reflect the "the same comparison operator" thing. Greg. |
Furthermore ... we probably need to define / test what we would expect of the interval functions when they're presented with unary comparison ranges. For example (say):
get my drift? true, false, or null ? The definition of how many of these functions operate depends on range start / end / inclusivity .... |
Hi all,
We have tests in 0068-feel-quality that assert stuff like this
(<= 10) = (null..10]
istrue
for ranges. Before 1.5, the missing endpoint on<=10
was null. Now it is 'undefined'. Ironically, the word 'undefined' is not actually defined in the spec so, what it means is unknown. It is a value? Not sure. It give no guidance as what happens when something is undefined.But ... the undefined thing for ranges raises some questions.
Is
(<= 10) = (null..10]
nowfalse
?What is the value of
<=10.start
? I think it used to benull
, but now it is undefined. Is accessing thatstart
property now illegal? If no ... (here we go) .... is that result of<=10.start
actually an now error condition and therefore returns ....null
...See what I mean? I have a feeling that perhaps
(<= 10) = (null..10]
is now supposed to befalse
... but<=10.start
might still returnnull
.The text was updated successfully, but these errors were encountered: