Complex Query Support for Statistics

Registered by Ildiko Vancsa

The rich query functionality, implemented by the Complex filter expressions in API queries blueprint, is available for Samples, Alarms and Alarm History, however this functionality is applicable for Statistics as well. The current implementation supports selectable parametrized aggregate functions (e.g. cardinality) with at most a single parameter per function. The idea is to provide the possibility of using the complex query functionality for Statistics and use the flexibility of the JSON representation of the request body for supporting the definition of multiple parameters for a selectable aggregate. This extension will also support all the functions that are available via the /meters endpoint with simple query.

As the rich query functionality uses new REST resources, Statistics will be implemented to fit in this new structure, with the following supported functions:
* /query/samples/statistics
** avg
** count
** max
** min
** sum
** cardinality
* /query/alarms/statistics
** count
* /query/alarms/history/statistics
** count

The implementation of the complex query provides the possibility to use orderby and limit for Samples, which will be supported in case of Statistics as well.

The use of POST request for complex queries makes it possible to define groupby with multiple values in one request. This feature is NOT equal to the SQL subqueries.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
Ildiko Vancsa
Definition:
Superseded
Series goal:
None
Implementation:
Not started
Milestone target:
milestone icon next
Completed by
gordon chung

Related branches

Sprints

Whiteboard

superseded for gnocchi. I'm not sure if this is scalable as is.

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.