Let Cube.js API report why a query doesn't match a pre-aggregations
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Is your feature request related to a problem? Please describe.**
When a query doesn't match any pre-aggregation according to the [rollup selection rules](https://cube.dev/docs/pre-aggregations#rollup-rollup-selection-rules), it's often quite hard to understand why. The docs help, but a specific, concise note would help even more.
**Describe the solution you'd like**
Let Cube.js API report why a query doesn't match and use any of the existing pre-aggregations. Use that info to print a debug message in the console and show a note in the Developer Playground.
The implementation in Cube.js API can differ. I can think at least of these options:
* extend [load](https://cube.dev/docs/@cubejs-client-core#cubejs-api-load) and [dryRun](https://cube.dev/docs/@cubejs-client-core#cubejs-api-dry-run) methods to return such info; it will increase the amount of information returned by the load method which might be critical to the performance of this method; this can be worked around by providing such an inspection only if a certain flag is set in [LoadMethodOptions](https://cube.dev/docs/@cubejs-client-core#types-load-method-options)
* add a separate method to the API to check if a query matches a specific pre-aggregation or any of the existing pre-aggregations
**Describe alternatives you've considered**
—
**Additional context**
Here's an example of a Slack discussion where it was hard to figure it out why a query didn't match a pre-aggregation: https://cube-js.slack.com/archives/CC0403RRR/p1620286569181800
Contributor guide
Assessment
This issue has not been assessed yet.