[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (COEL-140) Structure of QueryResult in PQI is unclear
[ https://issues.oasis-open.org/browse/COEL-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Bruton updated COEL-140: ----------------------------- Description: When a data engine returns 200 from a query operation, the body contains the result of the query. I think this should take one of two forms: 1) When the query does NOT contain an Aggregate clause, the result is an array of Atoms. 2) When the query contains an Aggregate clause, the result is a table of data (like the output from a typical SQL query). For example, if we issued a query that included the aggregate clause: { … "Aggregate": { "Columns": [ {"ColName": "WHEN_DURATION", "Aggregator": "SUM"}, {"ColName": "HOW_RELIABILITY", "Aggregator": "AVG"}], "GroupBy": ["WHAT_ELEMENT","WHAT_SUBCLASS"]} "Project" : { "Include": ["WHAT_CLUSTER", "WHAT_CLASS"] } } == SELECT SUM(Duration, AVG(Reliability), Cluster, Class, Groupby Element, Subclass then the output is a table of values with four columns and could be represented in a number of ways: {"QueryResult": { "Table": [ [ {"ColName": "WHEN_DURATION", "Aggregator": "SUM","Value": 127.3}, {"ColName": "HOW_RELIABILITY","Aggregator": "AVG","Value": 83}, {"ColName": "WHAT_CLUSTER", "Value": 12}, {"ColName": "WHAT_CLASS", "Value": 23}, {"ColName": "WHAT_ELEMENT", "Value": 2031}, {"ColName": "WHAT_SUBCLASS", "Value": 1256} ],[ {"ColName": "WHEN_DURATION", "Aggregator": "SUM","Value": 993}, {"ColName": "HOW_RELIABILITY","Aggregator": "AVG","Value": 12}, {"ColName": "WHAT_CLUSTER", "Value": 12}, {"ColName": "WHAT_CLASS", "Value": 23}, {"ColName": "WHAT_ELEMENT", "Value": 2037}, {"ColName": "WHAT_SUBCLASS", "Value": 1334} ] ] }} or {"QueryResult": { "Table": [ {"SUM(WHEN_DURATION)": 127.3, "AVG(HOW_RELIABILITY)": 83, "WHAT_CLUSTER ": 12, "WHAT_CLASS": 23 , "WHAT_ELEMENT": 2031, "WHAT_SUBCLASS": 1256} , {"SUM(WHEN_DURATION)": 127.3, "AVG(HOW_RELIABILITY)": 83, "WHAT_CLUSTER ": 12, "WHAT_CLASS": 23 , "WHAT_ELEMENT": 2031, "WHAT_SUBCLASS": 1256} ]}} was: When a data engine returns 200 from a query operation, the body contains the result of the query. I think this should take one of two forms: 1) When the query does NOT contain an Aggregate clause, the result is an array of Atoms. 2) When the query contains an Aggregate clause, the result is a table of data (like the output from a typical SQL query). For example, if we issued a query that included the aggregate clause: { … "Aggregate": { "Columns": [ {"ColName": "WHEN_DURATION", "Aggregator": "SUM"}, {"ColName": "HOW_RELIABILITY", "Aggregator": "AVG"}], "GroupBy": ["WHAT_ELEMENT","WHAT_SUBCLASS"]} "Project" : { "Include": ["WHAT_CLUSTER", "WHAT_CLASS"] } } == SELECT SUM(Duration, AVG(Reliability), Groupby Element, Subclass then the output is a table of values with four columns and could be represented in a number of ways: {"QueryResult": { "Table": [ [ {"ColName": "WHEN_DURATION", "Aggregator": "SUM","Value": 127.3}, {"ColName": "HOW_RELIABILITY","Aggregator": "AVG","Value": 83}, {"ColName": "WHAT_CLUSTER", "Value": 12}, {"ColName": "WHAT_CLASS", "Value": 23}, {"ColName": "WHAT_ELEMENT", "Value": 2031}, {"ColName": "WHAT_SUBCLASS", "Value": 1256} ],[ {"ColName": "WHEN_DURATION", "Aggregator": "SUM","Value": 993}, {"ColName": "HOW_RELIABILITY","Aggregator": "AVG","Value": 12}, {"ColName": "WHAT_CLUSTER", "Value": 12}, {"ColName": "WHAT_CLASS", "Value": 23}, {"ColName": "WHAT_ELEMENT", "Value": 2037}, {"ColName": "WHAT_SUBCLASS", "Value": 1334} ] ] }} or {"QueryResult": { "Table": [ {"SUM(WHEN_DURATION)": 127.3, "AVG(HOW_RELIABILITY)": 83, "WHAT_CLUSTER ": 12, "WHAT_CLASS": 23 , "WHAT_ELEMENT": 2031, "WHAT_SUBCLASS": 1256} , {"SUM(WHEN_DURATION)": 127.3, "AVG(HOW_RELIABILITY)": 83, "WHAT_CLUSTER ": 12, "WHAT_CLASS": 23 , "WHAT_ELEMENT": 2031, "WHAT_SUBCLASS": 1256} ]}} > Structure of QueryResult in PQI is unclear > ------------------------------------------ > > Key: COEL-140 > URL: https://issues.oasis-open.org/browse/COEL-140 > Project: OASIS Classification of Everyday Living (COEL) TC > Issue Type: Bug > Reporter: Paul Bruton > Assignee: David Snelling > > When a data engine returns 200 from a query operation, the body contains the result of the query. I think this should take one of two forms: > 1) When the query does NOT contain an Aggregate clause, the result is an array of Atoms. > 2) When the query contains an Aggregate clause, the result is a table of data (like the output from a typical SQL query). > For example, if we issued a query that included the aggregate clause: > { … > "Aggregate": { > "Columns": [ > {"ColName": "WHEN_DURATION", > "Aggregator": "SUM"}, > {"ColName": "HOW_RELIABILITY", > "Aggregator": "AVG"}], > "GroupBy": ["WHAT_ELEMENT","WHAT_SUBCLASS"]} > "Project" : { > "Include": ["WHAT_CLUSTER", "WHAT_CLASS"] > } > } > == SELECT SUM(Duration, AVG(Reliability), Cluster, Class, Groupby Element, Subclass > then the output is a table of values with four columns and could be represented in a number of ways: > {"QueryResult": { > "Table": [ > [ {"ColName": "WHEN_DURATION", "Aggregator": "SUM","Value": 127.3}, > {"ColName": "HOW_RELIABILITY","Aggregator": "AVG","Value": 83}, > {"ColName": "WHAT_CLUSTER", "Value": 12}, > {"ColName": "WHAT_CLASS", "Value": 23}, > {"ColName": "WHAT_ELEMENT", "Value": 2031}, > {"ColName": "WHAT_SUBCLASS", "Value": 1256} > ],[ > {"ColName": "WHEN_DURATION", "Aggregator": "SUM","Value": 993}, > {"ColName": "HOW_RELIABILITY","Aggregator": "AVG","Value": 12}, > {"ColName": "WHAT_CLUSTER", "Value": 12}, > {"ColName": "WHAT_CLASS", "Value": 23}, > {"ColName": "WHAT_ELEMENT", "Value": 2037}, > {"ColName": "WHAT_SUBCLASS", "Value": 1334} ] ] }} > or > {"QueryResult": { > "Table": [ > {"SUM(WHEN_DURATION)": 127.3, > "AVG(HOW_RELIABILITY)": 83, > "WHAT_CLUSTER ": 12, > "WHAT_CLASS": 23 , > "WHAT_ELEMENT": 2031, > "WHAT_SUBCLASS": 1256} , > {"SUM(WHEN_DURATION)": 127.3, > "AVG(HOW_RELIABILITY)": 83, > "WHAT_CLUSTER ": 12, > "WHAT_CLASS": 23 , > "WHAT_ELEMENT": 2031, > "WHAT_SUBCLASS": 1256} ]}} -- This message was sent by Atlassian JIRA (v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]