cube-js/cube

Let Cube.js API report why a query doesn't match a pre-aggregations

Open

#2,671 建立於 2021年5月7日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Rust (19,563 star) (1,965 fork)batch import
backend:serverhelp wanted

描述

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

貢獻者指南

Let Cube.js API report why a query doesn't match a pre-aggregations · cube-js/cube#2671 | Good First Issue