-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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, 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 and dryRun 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
- 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