Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queries with granularity result in incomplete data when date range is not aligned with granularity and pre-aggregations are activated #103

Closed
gizmodus opened this issue May 6, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@gizmodus
Copy link

gizmodus commented May 6, 2019

Describe the bug
When sending a query with a start date that is not aligned with the specified granularity, the server does not send data of "incomplete" time partitions. This problem only appears when pre-aggregations are activated. If pre-aggregations are deactivated, the results are as expected.
Example: When a query with date range 21/04/2019 - 21/05/2019 and granularity "month" is sent, the server only returns data of May and data of April is missing.

To Reproduce
Steps to reproduce the behavior:

  1. Activate rollup pre-aggregations and send a query with a start date that is not aligned with granularity.
  2. The server only returns data of the complete weeks / months / years.

Expected behavior
The server should respond with the same data no matter whether pre-aggregations are activated or not.

Version:
@cubejs-backend/server-core: 0.8.6

@paveltiunov
Copy link
Member

@gizmodus Hey Reto! Thanks for posting this. I can confirm this behavior. There're multiple options to solve this. Strict one is to do not match rollup with monthly granularity if date range is not aligned. But in order to save all performance benefits we'd need to implement daily granularity match to monthly ones first.

@gizmodus
Copy link
Author

@paveltiunov Are there any news on this?

In my opinion, this issue is quite important. See screenshot below:
Results only appear for 20.03.2020 if the date filter is set to the 21.03.2020 otherwise it just stays empty.

image

@paveltiunov
Copy link
Member

@gizmodus Hey Reto! Are you using partitionGranularity? If so this one should be fixed. Could you please check?

@gizmodus
Copy link
Author

@paveltiunov We updated cube.js from 0.12.2 to 0.17.0 and the problem seems to have been fixed in the meantime. So it is working as expected now without any changes on the configuration side. Thanks for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants