OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Commented: (ODATA-166) Inconsistent lifted operators for $filter


    [ http://tools.oasis-open.org/issues/browse/ODATA-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31973#action_31973 ] 

Matthew Borges commented on ODATA-166:
--------------------------------------

I thought about this a little bit more and re-read the V2 and V3 spec to see what they say about eq and null and just want to comment on a couple of things:

1) The V2 and V3 spec both say that two null values are equal (see section 2.2.3.6.1.1.5) so the new proposal is inconsistent with older versions of the spec (I'm not saying that is necessarily a problem I am just mentioning it).  Neither the ABNF (in V2 or V3) nor the description of the eq operator place any special meaning on whether a null literal is used or a null value or restrict the null literal from being used with ge, le, lt, gt, etc.

2) I think overloading the eq operator to mean something special when the right hand operand is the null literal has some unintuitive properties.  For example, if b1 is a property with a null value, the last proposed definition of eq, ge, and le means:

b1 eq null is true
b1 eq b1 is false
b1 le b1 is false
b1 ge b1 is false

I think it would be more clear if we define the operators to be one of these two things:

1) 
- <nullvalue> eq null is true and <nullvalue> eq <nullvalue> is true
- <nullvalue> ge null is true and <nullvalue> ge <nullvalue> is true.
- <nullvalue> le null is true and <nullvalue> le <nullvalue> is true.
- All other comparison where either operand is a null literal or <nullvalue> are false.

OR

2) Comparing the null literal or <nullvalue> with eq, ge, ne, le, etc. is always false, and introduce an operator, is, like SQL for dealing with nulls.

> Inconsistent lifted operators for $filter
> -----------------------------------------
>
>                 Key: ODATA-166
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-166
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Bug
>          Components: OData Protocol v1.0
>    Affects Versions: WD01
>         Environment: [Proposed]
>            Reporter: Matthew Borges
>            Priority: Minor
>             Fix For: WD01
>
>
> I didn't see any mention of lifted operators in the working drafts.  We should define how each operator behaves when one (or both) operands is null.
> With that said, the V3 spec (section 2.2.3.6.1.1.5) is inconsistent with it's treatment of null:
> - For equality operators, null eq null is true and null eq <anything not null> is false (i.e. the result is true or false)
> - Any relational operators when compared with null are false (i.e. the result is true or false)
>    - This implies that null ge null and null le null is false which is inconsistent with null eq null is true
> - Logical operators treat null as false (i.e. the result is true or false)
> - Unary operators are null if the operand is null (i.e. in the case of not, the result is true, false, or null)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]