Skip to content

Fix bad transpose logic in aggregate - #561

Merged
thomasp85 merged 4 commits into
mainfrom
aggregate-in-flipped
Sep 24, 2026
Merged

thomasp85 merged 4 commits into
mainfrom
aggregate-in-flipped

Conversation

@thomasp85

Copy link
Copy Markdown
Collaborator

This PR fixes a bug I uncovered while working on my talk.

The following query would fail but is now fixed:

SELECT * FROM ggsql:penguins 
VISUALIZE bill_dep AS x, bill_len AS y 
DRAW point 
  MAPPING species AS fill 
DRAW range 
  MAPPING bill_dep AS xmin, bill_dep AS xmax 
  SETTING aggregate => ('y:mean', 'xmin:min', 'xmax:max') 
  PARTITION BY species

The issue is that aggregate does not correctly pick up the layer transposition and fails to resolve the position aesthetics

@thomasp85
thomasp85 requested a review from teunbrand September 23, 2026 11:54

@teunbrand teunbrand left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment about duplicate logic, one more conceptual.
Nothing too severe to stop a merge.

Comment thread src/plot/layer/geom/stat_aggregate.rs Outdated
Comment thread src/plot/layer/geom/stat_aggregate.rs
@thomasp85
thomasp85 merged commit 3a99442 into main Sep 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants