Uploaded image for project: 'OASIS Classification of Everyday Living (COEL) TC'
  1. OASIS Classification of Everyday Living (COEL) TC
  2. COEL-138

PQI: Specification of Aggregate element in query is unclear

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Proposal:
      Hide

      I propose we go with structure (A) as the additional ColName elements are not necessary - group by can just be an array of column names

      Show
      I propose we go with structure (A) as the additional ColName elements are not necessary - group by can just be an array of column names

      Description

      I'm looking at using schema to document the Query and its responses. This is mostly OK, but I've run into a blocker with the Aggregate.

      The spec has the following structure:

      Aggregate (OPTIONAL)

      • Columns (list)
        • ColName: column name, see below
        • Aggregator: aggregator function, one of AVG,
          SUM, COUNT, MIN, MAX, STDDEV
      • GroupBy (list) (OPTIONAL)
        --ColName: column name

      That suggests an object containing two lists:

      {
      "Aggregate":

      { "Columns": [], "GroupBy": [] }

      }

      which could expand to something like this: (A)

      {
      "Aggregate": {
      "Columns": [

      { "ColName": "a", "Aggregator": "SUM" }

      ,

      { "ColName": "b", "Aggregator": "AVG" }

      ],
      "GroupBy": ["a", "b"]
      }
      }

      of if GroupBy has to have a ColName then it would be this: (B)

      {
      "Aggregate": {
      "Columns": [

      { "ColName": "a", "Aggregator": "SUM" }

      ,

      { "ColName": "b", "Aggregator": "AVG" }

      ],
      "GroupBy": [

      { "ColName": "a" }

      ,

      { "ColName": "b" }

      ]
      }
      }

      We have no examples of GroupBy and the only example of Aggregate (C, below) does not have an array, just a single item:

      {
      "Aggregate": {
      "Columns":

      { "ColName": "WHAT_CLUSTER", "Aggregator": "COUNT" }

      }
      }

        Attachments

          Activity

            People

            • Assignee:
              dsnelling David Snelling
              Reporter:
              paul.bruton Paul Bruton
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: