Archiver join generator might not be able to join tables under circumstances #11697
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
c: Platform
For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
Milestone
See https://github.com/piwik/piwik/pull/11690/files#r116174106
When generating an archiver query with such tables:
The query won't be able to join the table because it would need to restructure the whole array and detect which tables are joined in each join etc. Eg in this case we would expect output to be like this:
In another case we would maybe move the
log_conversion
join further up if another table references it. egshould result in
This can get even more complicated the more tables there are joined etc and we need to consider which tables can be joined with which tables automatically. We cannot simply set a
log_link_visit_action
table after alog_visit
table but need to make sure they can be joined automatically.So far we throw an exception when this case happens so a developer can change the order manually in the archiver query. Ideally we would resolve this completely. Won't be trivial at all.
Please note that this should only happen when there are custom joins that are not on
idvisit
or when there are multiple joins. When usingidvisit
some of the complex logic is already implemented to resolve this.The text was updated successfully, but these errors were encountered: