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

Fix hidden sort aggregate as unique only when sorted on the same axis #1554

Merged
merged 1 commit into from
Sep 26, 2021

Conversation

texodus
Copy link
Member

@texodus texodus commented Sep 26, 2021

When a column which is in a pivot position is also selected as a sort column, but not a visible column, using the default aggregate (count or sum) will appear to arbitrarily re-order the pivot axis, since this aggregate value is not visible but the pivot value in the row or column header is. Because of this, we always use unique as an aggregate when this condition is detected. However, this check previously only checked that such a column was in any pivot position, when really it should only apply to pivots on the same axis as the sort (e.g. row pivots with a hidden sort, or column pivots with a hidden column sort). This PR addresses this issue and adds a test for the case.

@texodus texodus merged commit 4481b74 into master Sep 26, 2021
@texodus texodus deleted the fix-hidden-sort-on-pivot-axis branch September 26, 2021 21:02
@texodus texodus added the bug Concrete, reproducible bugs label Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Concrete, reproducible bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant