Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-1553

Clarify the algorithm for evaluating $compute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.01_ERRATA01
    • Component/s: URL Conventions
    • Labels:
      None
    • Proposal:
      Hide

      The value of $compute is a comma-separated list of compute instructions, each consisting of a common expression followed by the keyword as, followed by the name for the computed dynamic property. This name MUST differ from the names of declared or dynamic properties of the identified resources. Services MAY support compute instructions that address dynamic properties added by other compute instructions within the same $compute system query option, provided that the service can determine an evaluation sequence.

      Show
      The value of $compute is a comma-separated list of compute instructions, each consisting of a common expression followed by the keyword as, followed by the name for the computed dynamic property. This name MUST differ from the names of declared or dynamic properties of the identified resources. Services MAY support compute instructions that address dynamic properties added by other compute instructions within the same $compute system query option, provided that the service can determine an evaluation sequence.
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-specs/pull/174

      Description

      It seems warranted that compute expressions can use dynamic properties that were computed by previous compute expressions, as in $compute=A add B as C, C mul 2 as D.

      And the sequence of the compute expressions should not matter, therefore $compute=C mul 2 as D, A add B as C should produce the same result. The server must determine an appropriate sequence in which to evaluate the compute expressions, or fail if a cycle is detected.

        Attachments

          Activity

            People

            • Assignee:
              heiko.theissen Heiko Theissen
              Reporter:
              heiko.theissen Heiko Theissen
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: