Introduce operator for checking whether a collection is a subset or equal to another collection

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • V4.01_CSD02
    • Affects Version/s: V4.01_CSD02
    • Component/s: URL Conventions
    • None
    • Environment:

      Applied

    • Hide

      Restrict "in" to mean just "member of"
      Add "hassubset" function:

      1) hassubset always requires that each element of the right argument occurs at least as many times in the left argument, and that order does not matter so:
      hassubset([1,2],[1,1,2]) => false
      hassubset should never take order (or gaps) into account:
      hassubset([4,1,3],[3,1]) => true
      hassubset([4,1,3],[4,3]) => true

      2) for ordered collections, add a "hassubsequence" function that takes order into account and ignores gaps:
      hassubsequence([4,1,3], [3,1]) => false
      hassubsequence([4,1,3],[4,3]) => true

      3) add support for ordered collections to contains (that takes gaps into account) as well as startswith, endswith, indexof, and substring.

      Show
      Restrict "in" to mean just "member of" Add "hassubset" function: 1) hassubset always requires that each element of the right argument occurs at least as many times in the left argument, and that order does not matter so: hassubset( [1,2] , [1,1,2] ) => false hassubset should never take order (or gaps) into account: hassubset( [4,1,3] , [3,1] ) => true hassubset( [4,1,3] , [4,3] ) => true 2) for ordered collections, add a "hassubsequence" function that takes order into account and ignores gaps: hassubsequence( [4,1,3] , [3,1] ) => false hassubsequence( [4,1,3] , [4,3] ) => true 3) add support for ordered collections to contains (that takes gaps into account) as well as startswith, endswith, indexof, and substring.
    • Show
      https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/4.01%20spec/ABNF/odata-abnf-construction-rules.txt?op=diff&rev=1047 https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/4.01%20spec/ABNF/odata-abnf-testcases.xml?op=diff&rev=1047 https://www.oasis-open.org/committees/download.php/60941/odata-v4.01-wd02-part2-url-conventions-2017-06-07.docx

      Currently we "overload" the in operator to be "subset of" if the left operand is a collection.

      This would block us from introducing collections of collections, and checking whether a collection is an item of a collection of collections.

            Assignee:
            handl
            Reporter:
            handl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: