turnilo
turnilo copied to clipboard
GroupBy via plywood
Currently when we're generating query in https://github.com/allegro/turnilo/blob/master/src/common/utils/query/visualization-query.ts we get nested set of topN's. Thats because we allow for custom sorts and splits on splits. It is not possible to generate group-by query with different sorts on different split dimensions. Probably it is not possible to get top N values in respective splits.
We should check with what constraints we can generate group-by query.
That way we could generate faster queries for few common cases and for example let user pick bigger limits. Common split values would also let us create stacked bar charts/mosaic plots.
If that would be possible we need to discuss how present this option to the user. I don't think it should be transparent because changing sort could change limit settings behind user back. Probably different visualisations? Maybe different mode altogether?
We should check that before some work in #472
Technical debt to repay:
- https://github.com/allegro/turnilo/pull/712#discussion_r586205854
- https://github.com/allegro/turnilo/pull/712#discussion_r586210417 (This one needs some refactor. Logic used to calculate layout is distributed across whole Table component and make it hard to extract. Could more some of that composition)