cube
cube copied to clipboard
fix(schema-compiler) Resolve rollup join pre-aggregation param allocator issue
Check List
- [x] Tests has been run in packages where changes made if available
- [x] Linter has been run for changed code
- [ ] Tests for the changes have been added if not covered yet
- [ ] Docs have been added / updated if required
Issue Reference this PR resolves Resolves: https://github.com/cube-js/cube/issues/8268
Description of Changes Made (if issue reference is not provided)
Resolves:
- Pre aggregation rollup_join query invalidations for cross datasource utilizing different parameter symbols.
- IE: Oracle, Postgres, Druid, MSSQL
Summary:
So this is a fun one, here's the situation. At first i thought this was entirely community druid problem but tracked it down to an underlying issue with rollup_joins.
If we rollup_join two datasources that contain a different paramAllocator symbol (IE: $1
and ?
) the default paramAllocator would inject the wrong parameters into the pre-aggregation sql code invalidating the cache on the API node and causing weird behaviour. This would only present itself when actually querying the data and thus causing issues.
Smoke tested:
- Refresh schedules refreshing pre-aggregations
- Generated pre-aggregations
Thanks ❤️